public static String getLabelFor ( InputComponent < ? , ? > input , boolean addColon ) { String label = input . getLabel ( ) ; // If no label was provided, use name if ( label == null ) { label = input . getName ( ) ; } // if a colon is required, add it if ( addColon && ! label . endsWith ( COLON ) ) { label += COLON ; } return label ; }
Returns the label for this component