Search this API

y.option
Class CommentOptionItem

java.lang.Object
  extended by y.option.OptionItem
      extended by y.option.ObjectOptionItem
          extended by y.option.StringBasedOptionItem
              extended by y.option.CommentOptionItem
All Implemented Interfaces:
AttributeOwner, BackupValueOwner, PropertyChangeReporter, VetoableChangeReporter

public class CommentOptionItem
extends StringBasedOptionItem

A dummy option item that displays a commentary text.

 
Your browser does not support SVG content.

Field Summary
static java.lang.String ATTRIBUTE_FONT_SIZE
          Attribute key used to store a font size for the displayed comment within the editor.
 
Fields inherited from class y.option.StringBasedOptionItem
ATTRIBUTE_CONVERTER, PROPERTY_CONVERTER
 
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
CommentOptionItem(java.lang.String text, int fontSize)
          Creates a new instance of CommentOptionItem.
 
Method Summary
 java.lang.String getType()
          Returns "Comment".
 void resetValue()
          Does nothing.
 void setValue(java.lang.Object value)
          Does nothing.
 boolean wantsVisibleName()
          Returns false, since this item has no name.
 
Methods inherited from class y.option.StringBasedOptionItem
getConverter, getStringValue, setConverter, setStringValue
 
Methods inherited from class y.option.ObjectOptionItem
getBackupValue, getValue
 
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, getTipText, isEnabled, isValueUndefined, publishEnabled, publishValue, publishValueUndefined, removeAttribute, removeEditor, removeEditorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener, setAttribute, setClassType, setEnabled, setTipText, setValueUndefined
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_FONT_SIZE

public static final java.lang.String ATTRIBUTE_FONT_SIZE
Attribute key used to store a font size for the displayed comment within the editor. Values have to be of type Integer and positive.

Constructor Detail

CommentOptionItem

public CommentOptionItem(java.lang.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

getType

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

Overrides:
getType in class StringBasedOptionItem

resetValue

public void resetValue()
Does nothing.

Overrides:
resetValue in class ObjectOptionItem
See Also:
OptionItem.publishValue(Object)

setValue

public void setValue(java.lang.Object value)
Does nothing.

Overrides:
setValue in class StringBasedOptionItem
See Also:
OptionItem.publishValue(Object)

wantsVisibleName

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

Overrides:
wantsVisibleName in class OptionItem

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