oracle.ide.propertyeditors
Class DirectoryEditor
java.lang.Object
|
+--java.beans.PropertyEditorSupport
|
+--oracle.ide.propertyeditors.DirectoryEditor
- All Implemented Interfaces:
- java.beans.PropertyEditor
- public class DirectoryEditor
- extends java.beans.PropertyEditorSupport
The DirectoryEditor class provides PropertyEditor support for properties
that represent a directory on the file system.
DirectoryEditor instances provide a custom editor for changing this
directory value.
Method Summary |
java.awt.Component |
getCustomEditor()
A PropertyEditor may chose to make available a full custom Component
that edits its property value. |
java.lang.String |
getJavaInitializationString()
This method is intended for use when generating Java code to set
the value of the property. |
java.lang.Object |
getValue()
Gets the value of the property. |
boolean |
supportsCustomEditor()
Determines whether the propertyEditor can provide a custom editor. |
Methods inherited from class java.beans.PropertyEditorSupport |
addPropertyChangeListener, firePropertyChange, getAsText, getTags, isPaintable, paintValue, removePropertyChangeListener, setAsText, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectoryEditor
public DirectoryEditor()
getCustomEditor
public java.awt.Component getCustomEditor()
- A PropertyEditor may chose to make available a full custom Component
that edits its property value. It is the responsibility of the
PropertyEditor to hook itself up to its editor Component itself and
to report property value changes by firing a PropertyChange event.
The higher-level code that calls getCustomEditor may either embed
the Component in some larger property sheet, or it may put it in
its own individual dialog, or ...
- Overrides:
getCustomEditor
in class java.beans.PropertyEditorSupport
- Returns:
- A java.awt.Component that will allow a human to directly
edit the current property value. May be null if this is
not supported.
supportsCustomEditor
public boolean supportsCustomEditor()
- Determines whether the propertyEditor can provide a custom editor.
- Overrides:
supportsCustomEditor
in class java.beans.PropertyEditorSupport
- Returns:
- True if the propertyEditor can provide a custom editor.
getValue
public java.lang.Object getValue()
- Gets the value of the property.
- Overrides:
getValue
in class java.beans.PropertyEditorSupport
- Returns:
- The value of the property.
getJavaInitializationString
public java.lang.String getJavaInitializationString()
- This method is intended for use when generating Java code to set
the value of the property. It should return a fragment of Java code
that can be used to initialize a variable with the current property
value.
Example results are "2", "new Color(127,127,34)", "Color.orange", etc.
- Overrides:
getJavaInitializationString
in class java.beans.PropertyEditorSupport
- Returns:
- A fragment of Java code representing an initializer for the
current value.