@Test public void testGetTags() { editor.setValue( null ); assertThat( editor.getTags(), is( equalTo( new String[] { null, "3.8.0", "3.8.3", "3.9.0", "3.9.1", "4.0.0" } ) ) ); editor.setAsText( "1.1.1" ); assertThat( editor.getTags(), is( equalTo( new String[] { null, "1.1.1", "3.8.0", "3.8.3", "3.9.0", "3.9.1", "4.0.0" } ) ) ); }
public String[] getTags() { final String asText = getAsText(); if ( asText == null ) { return TAGS.clone(); } final TreeSet<String> tags = new TreeSet<String>(); for ( final String s : TAGS ) { if ( s != null ) { tags.add( s ); } } tags.add( asText ); final String[] retval = new String[tags.size() + 1]; System.arraycopy( tags.toArray( new String[tags.size()] ), 0, retval, 1, tags.size() ); return retval; }
CompatibilityLevelPropertyEditor implements PropertyEditor { public String[] getTags() { final String asText = getAsText(); if ( asText == null ) { return TAGS.clone(); } final TreeSet<String> tags = new TreeSet<String>(); for ( final String s : TAGS ) { if ( s != null ) { tags.add( s ); } } tags.add( asText ); final String[] retval = new String[tags.size() + 1]; System.arraycopy( tags.toArray( new String[tags.size()] ), 0, retval, 1, tags.size() ); return retval; } }
CompatibilityLevelPropertyEditor implements PropertyEditor { public String[] getTags() { final String asText = getAsText(); if ( asText == null ) { return TAGS.clone(); } final TreeSet<String> tags = new TreeSet<String>(); for ( final String s : TAGS ) { if ( s != null ) { tags.add( s ); } } tags.add( asText ); final String[] retval = new String[tags.size() + 1]; System.arraycopy( tags.toArray( new String[tags.size()] ), 0, retval, 1, tags.size() ); return retval; } CompatibilityLevelPropertyEditor(); }
CompatibilityLevelPropertyEditor implements PropertyEditor { public String[] getTags() { final String asText = getAsText(); if ( asText == null ) { return TAGS.clone(); } final TreeSet<String> tags = new TreeSet<String>(); for ( final String s : TAGS ) { if ( s != null ) { tags.add( s ); } } tags.add( asText ); final String[] retval = new String[tags.size() + 1]; System.arraycopy( tags.toArray( new String[tags.size()] ), 0, retval, 1, tags.size() ); return retval; } CompatibilityLevelPropertyEditor(); void setValue( final Object value ); Object getValue(); String getAsText(); void setAsText( final String text ); String[] getTags(); boolean isPaintable(); void paintValue( final Graphics gfx, final Rectangle box ); Component getCustomEditor(); boolean supportsCustomEditor(); void addPropertyChangeListener( final PropertyChangeListener listener ); void removePropertyChangeListener( final PropertyChangeListener listener ); String getJavaInitializationString(); }
CompatibilityLevelPropertyEditor implements PropertyEditor { public String[] getTags() { final String asText = getAsText(); if ( asText == null ) { return TAGS.clone(); } final TreeSet<String> tags = new TreeSet<String>(); for ( final String s : TAGS ) { if ( s != null ) { tags.add( s ); } } tags.add( asText ); final String[] retval = new String[tags.size() + 1]; System.arraycopy( tags.toArray( new String[tags.size()] ), 0, retval, 1, tags.size() ); return retval; } CompatibilityLevelPropertyEditor(); void setValue( final Object value ); Object getValue(); String getAsText(); void setAsText( final String text ); String[] getTags(); boolean isPaintable(); void paintValue( final Graphics gfx, final Rectangle box ); Component getCustomEditor(); boolean supportsCustomEditor(); void addPropertyChangeListener( final PropertyChangeListener listener ); void removePropertyChangeListener( final PropertyChangeListener listener ); String getJavaInitializationString();  }