Search this API

y.option
Class ComponentOptionItem

java.lang.Object
  extended by y.option.OptionItem
      extended by y.option.ComponentOptionItem
All Implemented Interfaces:
AttributeOwner, PropertyChangeReporter, VetoableChangeReporter

public class ComponentOptionItem
extends OptionItem

An option item that displays a given JComponent as its editor.

 
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
ComponentOptionItem(java.lang.String name, javax.swing.JComponent c)
          Creates a new instance of ComponentOptionItem.
 
Method Summary
 boolean adoptEditorValue()
          This implementation is a no-op for backwards compatibility.
 javax.swing.JComponent getEditor()
          Returns the editor component for the this option item.
 java.lang.String getType()
          Returns "Component".
 java.lang.Object getValue()
          Returns the editor component itself.
 void resetValue()
          Does nothing.
 void setValue(java.lang.Object v)
          Does nothing.
 
Methods inherited from class y.option.OptionItem
addEditor, addEditorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, checkEditorValue, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getAttribute, getClassType, 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

ComponentOptionItem

public ComponentOptionItem(java.lang.String name,
                           javax.swing.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 java.lang.String getType()
Returns "Component".

Specified by:
getType in class OptionItem

getValue

public java.lang.Object getValue()
Returns the editor component itself.

Specified by:
getValue in class OptionItem

setValue

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

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

adoptEditorValue

public boolean adoptEditorValue()
Description copied from class: OptionItem
This implementation is a no-op for backwards compatibility.

Overrides:
adoptEditorValue in class OptionItem
Returns:
true

resetValue

public void resetValue()
Does nothing. Unclear semantics.

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

getEditor

public javax.swing.JComponent getEditor()
Description copied from class: OptionItem
Returns the editor component for the this option item.

Note:
Use the getEditor(GuiFactory,String) variant instead.

Overrides:
getEditor in class OptionItem

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