|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.option.OptionItem
Abstract class that serves as base class for all items that can be
added to an OptionHandler
.
The responsibility of an OptionItem is to provide an editor component for a specific kind of parameter or option type. It must also provide means to reset the value of the paramter to it's original value.
Field Summary | |
static Color |
COLOR_UNDEFINED
A Color that is used in the editor to signal that the value is not defined (yet) |
protected String |
name
|
static Object |
UNDEFINED
A value item that can be used to signal that there is no defined value yet. |
Constructor Summary | |
protected |
OptionItem()
Creates a new instance of OptionItem |
protected |
OptionItem(Class classType)
Creates a new instance of OptionItem |
protected |
OptionItem(Class classType,
String name)
Creates a new instance of OptionItem that has the given identifying name. |
protected |
OptionItem(String name)
Creates a new instance of OptionItem that has the given identifying name. |
Method Summary | |
abstract boolean |
adoptEditorValue()
Adopts the value from the editor component to the item. |
boolean |
checkEditorValue()
Whether or not the value entered in the editor is valid for this option item. |
Class |
getClassType()
Getter for property classType. |
abstract JComponent |
getEditor()
Returns the editor component for the this option item. |
JComponent |
getEditor(GuiFactory factory,
String parentName)
Returns the editor component for the this option item. |
String |
getName()
Returns the name of this OptionItem |
String |
getStringValue()
Returns the stringified value of this option item if the classType property is set, it uses the y.util.ObjectStringConversion class to perform its task, otherwise it will return null. |
String |
getTipText()
Returns the tooltip for the item editor. |
abstract String |
getType()
Returns a unique identifier for the type of this OptionItem |
abstract Object |
getValue()
Returns the value of this option item |
boolean |
isValueUndefined()
Returns whether or not the editor should start up displaying an undefined value. |
abstract void |
resetValue()
Resets the value of this item to its initial value. |
protected void |
setClassType(Class type)
|
void |
setStringValue(String value)
Sets the stringified value of this option item if the classType property is set, it uses the y.util.ObjectStringConversion class to perform its task, otherwise it will return null. |
void |
setTipText(String text)
Sets the tooltip text for the item editor. |
abstract void |
setValue(Object value)
Sets the value of this option item |
void |
setValueUndefined(boolean b)
Whether or not the editor should start up displaying an undefined value. |
boolean |
wantsVisibleName()
Whether or not the identifying name should be displayed along with this item. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String name
public static final Color COLOR_UNDEFINED
public static final Object UNDEFINED
Constructor Detail |
protected OptionItem()
protected OptionItem(Class classType)
protected OptionItem(String name)
protected OptionItem(Class classType, String name)
Method Detail |
protected void setClassType(Class type)
public String getName()
public void setTipText(String text)
public String getTipText()
public boolean wantsVisibleName()
true
public abstract String getType()
public abstract Object getValue()
public abstract void setValue(Object value)
public String getStringValue()
public void setStringValue(String value)
public abstract JComponent getEditor()
public JComponent getEditor(GuiFactory factory, String parentName)
public abstract boolean adoptEditorValue()
public abstract void resetValue()
public boolean checkEditorValue()
public void setValueUndefined(boolean b)
public boolean isValueUndefined()
public Class getClassType()
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |