public static String getIconClasses(final String icon, final IconPosition position) {
		StringBuilder builder = new StringBuilder();
		if (position == null) {
			builder.append(CLASS_ICON);
		} else {
			switch (position) {
				case BEFORE:
					builder.append(CLASS_ICON_BEFORE_CONTENT);
					break;
				case AFTER:
					builder.append(CLASS_ICON_AFTER_CONTENT);
					break;
				default:
					builder.append(CLASS_ICON);
					break;
			}
		}
		if (!(icon == null || Util.empty(icon))) {
			builder.append(" ");
			builder.append(icon);
		}
		return builder.toString();
	}
public static String getIconClasses ( final String icon , final IconPosition position ) { StringBuilder builder = new StringBuilder ( ) ; if ( position == null ) { builder . append ( CLASS_ICON ) ; } else { switch ( position ) { case BEFORE : builder . append ( CLASS_ICON_BEFORE_CONTENT ) ; break ; case AFTER : builder . append ( CLASS_ICON_AFTER_CONTENT ) ; break ; default : builder . append ( CLASS_ICON ) ; break ; } } if ( ! ( icon == null || Util . empty ( icon ) ) ) { builder . append ( " " ) ; builder . append ( icon ) ; } return builder . toString ( ) ; }
@param icon the HTML className representing an icon
@param position where the icon should go in relation to the content of the component
@return a HTML className String which will set up a component to contain an icon in the desired position.