Class StringOrNullEditor

  • All Implemented Interfaces:
    java.beans.PropertyEditor, org.openide.explorer.propertysheet.ExPropertyEditor

    public class StringOrNullEditor
    extends java.beans.PropertyEditorSupport
    implements org.openide.explorer.propertysheet.ExPropertyEditor
    Enhancement for default StringEditor supplied by NetBeans core capable to display null values. Mostly a copy of o.n.core/src/org/netbeans/beaninfo/editors/StringEditor.java with nullValue handling from o.n.core/src/org/netbeans/beaninfo/editors/ObjectEditor.java
    • Field Summary

      • Fields inherited from interface org.openide.explorer.propertysheet.ExPropertyEditor

        PROP_VALUE_VALID, PROPERTY_HELP_ID
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void attachEnv​(org.openide.explorer.propertysheet.PropertyEnv env)  
      java.lang.String getAsText()  
      java.awt.Component getCustomEditor()  
      java.lang.String getJavaInitializationString()  
      boolean isEditable()
      gets information if the text in editor should be editable or not
      void setAsText​(java.lang.String s)
      sets new value
      boolean supportsCustomEditor()  
      • Methods inherited from class java.beans.PropertyEditorSupport

        addPropertyChangeListener, firePropertyChange, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.beans.PropertyEditor

        addPropertyChangeListener, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setValue
    • Constructor Detail

      • StringOrNullEditor

        public StringOrNullEditor()
    • Method Detail

      • isEditable

        public boolean isEditable()
        gets information if the text in editor should be editable or not
      • getAsText

        public java.lang.String getAsText()
        Specified by:
        getAsText in interface java.beans.PropertyEditor
        Overrides:
        getAsText in class java.beans.PropertyEditorSupport
      • setAsText

        public void setAsText​(java.lang.String s)
        sets new value
        Specified by:
        setAsText in interface java.beans.PropertyEditor
        Overrides:
        setAsText in class java.beans.PropertyEditorSupport
      • getJavaInitializationString

        public java.lang.String getJavaInitializationString()
        Specified by:
        getJavaInitializationString in interface java.beans.PropertyEditor
        Overrides:
        getJavaInitializationString in class java.beans.PropertyEditorSupport
      • supportsCustomEditor

        public boolean supportsCustomEditor()
        Specified by:
        supportsCustomEditor in interface java.beans.PropertyEditor
        Overrides:
        supportsCustomEditor in class java.beans.PropertyEditorSupport
      • getCustomEditor

        public java.awt.Component getCustomEditor()
        Specified by:
        getCustomEditor in interface java.beans.PropertyEditor
        Overrides:
        getCustomEditor in class java.beans.PropertyEditorSupport
      • attachEnv

        public void attachEnv​(org.openide.explorer.propertysheet.PropertyEnv env)
        Specified by:
        attachEnv in interface org.openide.explorer.propertysheet.ExPropertyEditor