org.netbeans.beaninfo.editors
Class BoolEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.netbeans.beaninfo.editors.ExPropertyEditorSupport
org.netbeans.beaninfo.editors.BoolEditor
- All Implemented Interfaces:
- PropertyEditor, ExPropertyEditor
public class BoolEditor
- extends ExPropertyEditorSupport
Replacement editor for boolean primitive values which supports
internationalization and alternate string values that
can be supplied to the property editor via adding an array
returning an array of two Strings (false then true) from
env.getFeatureDescriptor().getValue(). These
string values will then be used for getAsText, setAsText, and getTags.
These strings should be correctly internationalized if supplied
by a module. String value matching in setAsText is non-case-sensitive
("TRUE" and "tRue" are equivalent).
|
Constructor Summary |
BoolEditor()
Creates a new instance of BoolEditor |
| Methods inherited from class java.beans.PropertyEditorSupport |
addPropertyChangeListener, firePropertyChange, getCustomEditor, getSource, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BoolEditor
public BoolEditor()
- Creates a new instance of BoolEditor
attachEnvImpl
protected void attachEnvImpl(PropertyEnv env)
- Description copied from class:
ExPropertyEditorSupport
- Perform the actual attaching of the PropertyEnv.
- Specified by:
attachEnvImpl in class ExPropertyEditorSupport
validateEnv
protected void validateEnv(PropertyEnv env)
- Throws an EnvException if the stringValues key is not 2 items in length.
- Specified by:
validateEnv in class ExPropertyEditorSupport
getJavaInitializationString
public String getJavaInitializationString()
- Specified by:
getJavaInitializationString in interface PropertyEditor- Overrides:
getJavaInitializationString in class PropertyEditorSupport
getTags
public String[] getTags()
- Specified by:
getTags in interface PropertyEditor- Overrides:
getTags in class PropertyEditorSupport
getAsText
public String getAsText()
- Specified by:
getAsText in interface PropertyEditor- Overrides:
getAsText in class PropertyEditorSupport
setAsText
public void setAsText(String txt)
- Specified by:
setAsText in interface PropertyEditor- Overrides:
setAsText in class PropertyEditorSupport