Search this API

y.option
Class ObjectOptionItem

java.lang.Object
  extended by y.option.OptionItem
      extended by y.option.ObjectOptionItem
All Implemented Interfaces:
AttributeOwner, BackupValueOwner, PropertyChangeReporter, VetoableChangeReporter
Direct Known Subclasses:
BoolOptionItem, ColorOptionItem, DoubleOptionItem, EnumOptionItem, ImageOptionItem, IntOptionItem, StringBasedOptionItem

public class ObjectOptionItem
extends OptionItem
implements BackupValueOwner

General purpose option item that can be used as a base class for custom option item classes.

 
Your browser does not support SVG content.

Field Summary
 
Fields inherited from class y.option.OptionItem
ATTRIBUTE_CONTEXT, ATTRIBUTE_GROUPS, ATTRIBUTE_LONG_DESCRIPTION, COLOR_UNDEFINED, name, PROPERTY_CLASS_TYPE, PROPERTY_ENABLED, PROPERTY_TIP_TEXT, PROPERTY_VALUE, PROPERTY_VALUE_UNDEFINED, UNDEFINED
 
Constructor Summary
ObjectOptionItem(java.lang.String name, java.lang.Object value)
          Creates a new instance of ObjectOptionItem.
 
Method Summary
 java.lang.Object getBackupValue()
          Returns the backup value of this item.
 java.lang.String getType()
          Returns "Object".
 java.lang.Object getValue()
          Returns the value of this item.
 void resetValue()
          Resets the value of this item to the backup value.
 void setValue(java.lang.Object value)
          Sets the value of this item.
 
Methods inherited from class y.option.OptionItem
addEditor, addEditorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, adoptEditorValue, checkEditorValue, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getAttribute, getClassType, getEditor, getEditor, getEditors, getName, getStringValue, getTipText, isEnabled, isValueUndefined, publishEnabled, publishValue, publishValueUndefined, removeAttribute, removeEditor, removeEditorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener, setAttribute, setClassType, setEnabled, setStringValue, setTipText, setValueUndefined, wantsVisibleName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectOptionItem

public ObjectOptionItem(java.lang.String name,
                        java.lang.Object value)
Creates a new instance of ObjectOptionItem.

Parameters:
name - the name of the item
value - the initial value of the item
Method Detail

getType

public java.lang.String getType()
Returns "Object".

Specified by:
getType in class OptionItem

getValue

public java.lang.Object getValue()
Returns the value of this item.

Specified by:
getValue in class OptionItem

setValue

public void setValue(java.lang.Object value)
Sets the value of this item.

Specified by:
setValue in class OptionItem
See Also:
OptionItem.publishValue(Object)

resetValue

public void resetValue()
Resets the value of this item to the backup value.

Specified by:
resetValue in class OptionItem
See Also:
OptionItem.publishValue(Object)

getBackupValue

public java.lang.Object getBackupValue()
Returns the backup value of this item.

Specified by:
getBackupValue in interface BackupValueOwner
Returns:
the backup value

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.