y.option
Class CommentOptionItem

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

public class CommentOptionItem
extends OptionItem

A dummy option item that displays a commentary text.

Currently provides a JTextArea as non-editable component


Field Summary
 
Fields inherited from class y.option.OptionItem
COLOR_UNDEFINED, name, UNDEFINED
 
Constructor Summary
CommentOptionItem(String text, int fontSize)
          Creates a new instance of CommentOptionItem.
 
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 "Comment"
 Object getValue()
          Returns the commentary text.
 void resetValue()
          Does nothing.
 void setValue(Object v)
          Does nothing.
 boolean wantsVisibleName()
          Returns false, since this item has no name.
 
Methods inherited from class y.option.OptionItem
checkEditorValue, getClassType, getEditor, getName, getStringValue, getTipText, isValueUndefined, setClassType, setStringValue, setTipText, setValueUndefined
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentOptionItem

public CommentOptionItem(String text,
                         int fontSize)
Creates a new instance of CommentOptionItem.

Parameters:
text - the commentary text to be displayed.
fontSize - the fontSize of the displayed comment within the editor.
Method Detail

getValue

public Object getValue()
Returns the commentary text.

Specified by:
getValue in class OptionItem

getType

public String getType()
Returns "Comment"

Specified by:
getType 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.

Specified by:
resetValue in class OptionItem

setValue

public void setValue(Object v)
Does nothing.

Specified by:
setValue in class OptionItem

wantsVisibleName

public boolean wantsVisibleName()
Returns false, since this item has no name.

Overrides:
wantsVisibleName 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