org.openide.explorer.propertysheet.editors
Class TypeEditor

java.lang.Object
  extended byjava.beans.PropertyEditorSupport
      extended byorg.openide.explorer.propertysheet.editors.TypeEditor
All Implemented Interfaces:
EnhancedPropertyEditor, ExPropertyEditor, PropertyEditor

public class TypeEditor
extends PropertyEditorSupport
implements EnhancedPropertyEditor, ExPropertyEditor

Property editor for the org.netbeans.src.Type


Field Summary
 
Fields inherited from interface org.openide.explorer.propertysheet.ExPropertyEditor
PROP_VALUE_VALID, PROPERTY_HELP_ID
 
Constructor Summary
TypeEditor()
          Creates new editor
 
Method Summary
 void attachEnv(PropertyEnv env)
          This method is called by the IDE to pass the environment to the property editor.
 String getAsText()
           
 Component getInPlaceCustomEditor()
           
 String getJavaInitializationString()
           
 String[] getTags()
           
 boolean hasInPlaceCustomEditor()
           
 void setAsText(String string)
          Set the property value by parsing a given String.
 void setValue(Object v)
           
 boolean supportsEditingTaggedValues()
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getValue, isPaintable, paintValue, removePropertyChangeListener, 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, supportsCustomEditor
 

Constructor Detail

TypeEditor

public TypeEditor()
Creates new editor

Method Detail

getAsText

public String getAsText()
Specified by:
getAsText in interface PropertyEditor
Returns:
The property value as a human editable string.

Returns null if the value can't be expressed as an editable string.

If a non-null value is returned, then the PropertyEditor should be prepared to parse that string back in setAsText().


setAsText

public void setAsText(String string)
               throws IllegalArgumentException
Set the property value by parsing a given String.

Specified by:
setAsText in interface PropertyEditor
Parameters:
string - The string to be parsed.
Throws:
IllegalArgumentException

setValue

public void setValue(Object v)
Specified by:
setValue in interface PropertyEditor
Parameters:
v - new value

getJavaInitializationString

public String getJavaInitializationString()
Specified by:
getJavaInitializationString in interface PropertyEditor
Returns:
A fragment of Java code representing an initializer for the current value.

getTags

public String[] getTags()
Specified by:
getTags in interface PropertyEditor
Returns:
The tag values for this property.

getInPlaceCustomEditor

public Component getInPlaceCustomEditor()
Specified by:
getInPlaceCustomEditor in interface EnhancedPropertyEditor
Returns:
Returns custom property editor to be showen inside the property sheet.

hasInPlaceCustomEditor

public boolean hasInPlaceCustomEditor()
Specified by:
hasInPlaceCustomEditor in interface EnhancedPropertyEditor
Returns:
true if this PropertyEditor provides a enhanced in-place custom property editor, false otherwise

supportsEditingTaggedValues

public boolean supportsEditingTaggedValues()
Specified by:
supportsEditingTaggedValues in interface EnhancedPropertyEditor
Returns:
true if this property editor provides tagged values and a custom strings in the choice should be accepted too, false otherwise

attachEnv

public void attachEnv(PropertyEnv env)
This method is called by the IDE to pass the environment to the property editor.

Specified by:
attachEnv in interface ExPropertyEditor

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.