com.lc.util
Class SafeEnumerationPropertyEditor
java.lang.Object
|
+--java.beans.PropertyEditorSupport
|
+--com.lc.util.SafeEnumerationPropertyEditor
- All Implemented Interfaces:
- java.beans.PropertyEditor
- public abstract class SafeEnumerationPropertyEditor
- extends java.beans.PropertyEditorSupport
Generic JavaBean property editor for a property derived from
SafeEnumeration
.
Warning : enumerations defined as nested classes don't
seem to be supported (at least by JBuilder 4.0).
- Version:
- $Revision: 1.1.1.1 $ $Date: 2002/02/19 22:12:03 $
- Author:
- Laurent Caillette
Method Summary |
java.lang.String |
getAsText()
Returns the value as it should appear in the property editor
- may be different of the value to insert into the Java code. |
abstract java.lang.Class |
getEnumerationClass()
Override this method to return the class implementing the
enumeration. |
java.lang.String |
getJavaInitializationString()
Returns the string representing the Java expression which should appear
in the source code. |
java.lang.String[] |
getTags()
Returns the list of the values to be displayed to the user. |
boolean |
isPaintable()
Indique si l'éditeur de propriété est suceptible d'être redessiné,
en tant que composant fenêtré défini dans cette classe. |
void |
setAsText(java.lang.String text)
Sets the value of the property, depending of the selected value on
the display. |
Methods inherited from class java.beans.PropertyEditorSupport |
addPropertyChangeListener, firePropertyChange, getCustomEditor, getValue, paintValue, removePropertyChangeListener, setValue, supportsCustomEditor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SafeEnumerationPropertyEditor
public SafeEnumerationPropertyEditor()
SafeEnumerationPropertyEditor
public SafeEnumerationPropertyEditor(java.lang.Object obj)
getEnumerationClass
public abstract java.lang.Class getEnumerationClass()
- Override this method to return the class implementing the
enumeration.
- Returns:
- A concrete class, derived from
SafeEnumeration
getAsText
public final java.lang.String getAsText()
- Returns the value as it should appear in the property editor
- may be different of the value to insert into the Java code.
- Overrides:
getAsText
in class java.beans.PropertyEditorSupport
- Returns:
- The text to display in the property editor.
getTags
public final java.lang.String[] getTags()
- Returns the list of the values to be displayed to the user.
- Overrides:
getTags
in class java.beans.PropertyEditorSupport
- Returns:
- A copy of the array of values to display.
setAsText
public final void setAsText(java.lang.String text)
- Sets the value of the property, depending of the selected value on
the display. If text value does not match with a known value,
then null is set.
- Overrides:
setAsText
in class java.beans.PropertyEditorSupport
- Parameters:
text
- The visible value, as selected by the user.
getJavaInitializationString
public final java.lang.String getJavaInitializationString()
- Returns the string representing the Java expression which should appear
in the source code.
- Overrides:
getJavaInitializationString
in class java.beans.PropertyEditorSupport
- Returns:
- A valid Java expression as a String.
isPaintable
public final boolean isPaintable()
- Indique si l'éditeur de propriété est suceptible d'être redessiné,
en tant que composant fenêtré défini dans cette classe. L'éditeur
de propriété que l'on souhaite voir s'afficher étant du type liste,
la valeur
false
est renvoyée.
Tells if the property editor may paint itself. Since this property
editor is supposed to be a list, it always returns false. *
- Overrides:
isPaintable
in class java.beans.PropertyEditorSupport
- Returns:
- false.