org.netbeans.core/2 3.32

org.netbeans.beaninfo.editors
Class BoolEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.netbeans.beaninfo.editors.ExPropertyEditorSupport
          extended by 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).


Nested Class Summary
 
Nested classes/interfaces inherited from class org.netbeans.beaninfo.editors.ExPropertyEditorSupport
ExPropertyEditorSupport.EnvException
 
Field Summary
 
Fields inherited from interface org.openide.explorer.propertysheet.ExPropertyEditor
PROP_VALUE_VALID, PROPERTY_HELP_ID
 
Constructor Summary
BoolEditor()
          Creates a new instance of BoolEditor
 
Method Summary
protected  void attachEnvImpl(PropertyEnv env)
          Perform the actual attaching of the PropertyEnv.
 String getAsText()
           
 String getJavaInitializationString()
           
 String[] getTags()
           
 void setAsText(String txt)
           
protected  void validateEnv(PropertyEnv env)
          Throws an EnvException if the stringValues key is not 2 items in length.
 
Methods inherited from class org.netbeans.beaninfo.editors.ExPropertyEditorSupport
arrToStr, attachEnv
 
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
 
Methods inherited from interface java.beans.PropertyEditor
addPropertyChangeListener, getCustomEditor, getValue, isPaintable, paintValue, removePropertyChangeListener, setValue, supportsCustomEditor
 

Constructor Detail

BoolEditor

public BoolEditor()
Creates a new instance of BoolEditor

Method Detail

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

org.netbeans.core/2 3.32

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.