y.option
Class ComponentOptionItem

java.lang.Object
  |
  +--y.option.OptionItem
        |
        +--y.option.ComponentOptionItem

public class ComponentOptionItem
extends OptionItem

An option item that displays a given JComponent as it's editor.


Field Summary
 
Fields inherited from class y.option.OptionItem
COLOR_UNDEFINED, name, UNDEFINED
 
Constructor Summary
ComponentOptionItem(String name, JComponent c)
          Creates a new instance of ComponentOptionItem.
 
Method Summary
 boolean adoptEditorValue()
          Adopts the value from the editor component to the item.
 JComponent getEditor()
          Returns the editor component for the this option item.
 String getType()
          Returns "Component"
 Object getValue()
          Returns the editor component itself
 void resetValue()
          Does nothing.
 void setValue(Object v)
          Does nothing.
 
Methods inherited from class y.option.OptionItem
checkEditorValue, getClassType, getEditor, getName, getStringValue, getTipText, isValueUndefined, setClassType, setStringValue, setTipText, setValueUndefined, wantsVisibleName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentOptionItem

public ComponentOptionItem(String name,
                           JComponent c)
Creates a new instance of ComponentOptionItem.

Parameters:
name - the name of this item
c - the component being displayed as editor.
Method Detail

getType

public String getType()
Returns "Component"

Specified by:
getType in class OptionItem

getValue

public Object getValue()
Returns the editor component itself

Specified by:
getValue in class OptionItem

setValue

public void setValue(Object v)
Does nothing. Unclear semantics.

Specified by:
setValue in class OptionItem

adoptEditorValue

public boolean adoptEditorValue()
Description copied from class: OptionItem
Adopts the value from the editor component to the item.

Specified by:
adoptEditorValue in class OptionItem

resetValue

public void resetValue()
Does nothing. Unclear semantics.

Specified by:
resetValue in class OptionItem

getEditor

public JComponent getEditor()
Description copied from class: OptionItem
Returns the editor component for the this option item. Note: Use the getEditor(GuiFactory,String) variant instead.

Specified by:
getEditor in class OptionItem

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

2003