@Test public void computeLabelTest() { String label = pane.computeLabel( entry ); assertNotNull( label ); assertEquals( "labelValue", label ); }
String computeLabel( final ParameterDefinitionEntry entry ) { final String swingLabel = entry.getParameterAttribute( ParameterAttributeNames.Swing.NAMESPACE, ParameterAttributeNames.Swing.LABEL, parameterContext ); if ( swingLabel != null ) { return swingLabel; } String coreLabel = entry.getTranslatedParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.LABEL, parameterContext ); return coreLabel == null ? entry.getName() : coreLabel; }
ParameterReportControllerPane extends JPanel { String computeLabel( final ParameterDefinitionEntry entry ) { final String swingLabel = entry.getParameterAttribute( ParameterAttributeNames.Swing.NAMESPACE, ParameterAttributeNames.Swing.LABEL, parameterContext ); if ( swingLabel != null ) { return swingLabel; } String coreLabel = entry.getTranslatedParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.LABEL, parameterContext ); return coreLabel == null ? entry.getName() : coreLabel; } }
ParameterReportControllerPane extends JPanel { String computeLabel( final ParameterDefinitionEntry entry ) { final String swingLabel = entry.getParameterAttribute( ParameterAttributeNames.Swing.NAMESPACE, ParameterAttributeNames.Swing.LABEL, parameterContext ); if ( swingLabel != null ) { return swingLabel; } String coreLabel = entry.getTranslatedParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.LABEL, parameterContext ); return coreLabel == null ? entry.getName() : coreLabel; } ParameterReportControllerPane(); }
ParameterReportControllerPane extends JPanel { String computeLabel( final ParameterDefinitionEntry entry ) { final String swingLabel = entry.getParameterAttribute( ParameterAttributeNames.Swing.NAMESPACE, ParameterAttributeNames.Swing.LABEL, parameterContext ); if ( swingLabel != null ) { return swingLabel; } String coreLabel = entry.getTranslatedParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.LABEL, parameterContext ); return coreLabel == null ? entry.getName() : coreLabel; } ParameterReportControllerPane(); MasterReport getReport(); void setReport( final MasterReport report ); void hideControls(); ReportParameterValues getReportParameterValues(); void addChangeListener( final ChangeListener changeListener ); void removeChangeListener( final ChangeListener changeListener ); void setErrorMessage( final String error ); }
ParameterReportControllerPane extends JPanel { String computeLabel( final ParameterDefinitionEntry entry ) { final String swingLabel = entry.getParameterAttribute( ParameterAttributeNames.Swing.NAMESPACE, ParameterAttributeNames.Swing.LABEL, parameterContext ); if ( swingLabel != null ) { return swingLabel; } String coreLabel = entry.getTranslatedParameterAttribute( ParameterAttributeNames.Core.NAMESPACE, ParameterAttributeNames.Core.LABEL, parameterContext ); return coreLabel == null ? entry.getName() : coreLabel; } ParameterReportControllerPane(); MasterReport getReport(); void setReport( final MasterReport report ); void hideControls(); ReportParameterValues getReportParameterValues(); void addChangeListener( final ChangeListener changeListener ); void removeChangeListener( final ChangeListener changeListener ); void setErrorMessage( final String error ); static final Color ERROR_COLOR; }