y.option
Class ColorOptionItem

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

public class ColorOptionItem
extends ObjectOptionItem

An option item for Color values.

 
Your browser does not support SVG content.

Field Summary
static String ATTRIBUTE_SHOW_ALPHA
          Attribute key used to store an editor hint specifying whether alpha values should be editable.
static String ATTRIBUTE_SHOW_MORE_COLORS
          Attribute key used to store an editor hint specifying whether a chooser for all color values should be provided.
static String ATTRIBUTE_SHOW_MRU_COLORS
          Attribute key used to store an editor hint specifying whether a chooser for most recently used colors should be provided.
static String ATTRIBUTE_SHOW_NO_COLOR
          Attribute key used to store an editor hint specifying whether a null color (e.g. to be interpreted as transparency) should be provided.
static String ATTRIBUTE_SHOW_SOME_COLORS
          Attribute key used to store an editor hint specifying whether a chooser a for small subset of frequently used colors should be provided.
 
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
ColorOptionItem(String name, Color value)
          Creates a new instance of ColorOptionItem.
ColorOptionItem(String name, Color value, boolean showNoColor, boolean showSomeColors, boolean showMostRecentlyUsedColors, boolean showMoreColors)
          Creates a new instance of ColorOptionItem.
 
Method Summary
 String getType()
          Returns "Color".
 boolean isShowMoreColors()
          Returns true, if the editor will provide a color chooser for all colors.
 boolean isShowMostRecentlyUsedColors()
          Returns true, if the editor will provide a color chooser popup for the most recently used colors.
 boolean isShowNoColor()
          Returns true, if the editor will allow to specify a null color.
 boolean isShowSomeColors()
          Returns true, if the editor will provide a color chooser popup for some colors.
 void setValue(Object value)
          Sets the value of this option item.
 
Methods inherited from class y.option.ObjectOptionItem
getBackupValue, getValue, resetValue
 
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
 

Field Detail

ATTRIBUTE_SHOW_ALPHA

public static final String ATTRIBUTE_SHOW_ALPHA
Attribute key used to store an editor hint specifying whether alpha values should be editable. Values have to be of type Boolean. By default this attribute is set to false.

See Also:
Constant Field Values

ATTRIBUTE_SHOW_SOME_COLORS

public static final String ATTRIBUTE_SHOW_SOME_COLORS
Attribute key used to store an editor hint specifying whether a chooser a for small subset of frequently used colors should be provided. Values have to be of type Boolean. By default this attribute is set to false.

See Also:
Constant Field Values

ATTRIBUTE_SHOW_MRU_COLORS

public static final String ATTRIBUTE_SHOW_MRU_COLORS
Attribute key used to store an editor hint specifying whether a chooser for most recently used colors should be provided. Values have to be of type Boolean. By default this attribute is set to false.

See Also:
Constant Field Values

ATTRIBUTE_SHOW_MORE_COLORS

public static final String ATTRIBUTE_SHOW_MORE_COLORS
Attribute key used to store an editor hint specifying whether a chooser for all color values should be provided. Values have to be of type Boolean. By default this attribute is set to true.

See Also:
Constant Field Values

ATTRIBUTE_SHOW_NO_COLOR

public static final String ATTRIBUTE_SHOW_NO_COLOR
Attribute key used to store an editor hint specifying whether a null color (e.g. to be interpreted as transparency) should be provided. Values have to be of type Boolean. By default this attribute is set to false.

See Also:
Constant Field Values
Constructor Detail

ColorOptionItem

public ColorOptionItem(String name,
                       Color value)
Creates a new instance of ColorOptionItem.

Parameters:
name - the name of this item
value - the initial Color value

ColorOptionItem

public ColorOptionItem(String name,
                       Color value,
                       boolean showNoColor,
                       boolean showSomeColors,
                       boolean showMostRecentlyUsedColors,
                       boolean showMoreColors)
Creates a new instance of ColorOptionItem.

Parameters:
name - the name of this item
value - the initial Color value
showNoColor - the editor will allow to specify a null color.
showSomeColors - the editor will provide a color chooser popup for some colors
showMostRecentlyUsedColors - the editor will provide a color chooser popup for the most recently used colors
showMoreColors - the editor will provide a color chooser for all colors
Method Detail

getType

public String getType()
Returns "Color".

Overrides:
getType in class ObjectOptionItem

setValue

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

Overrides:
setValue in class ObjectOptionItem
Throws:
IllegalArgumentException - if the specified value is not of type Color
See Also:
OptionItem.publishValue(Object)

isShowNoColor

public boolean isShowNoColor()
Returns true, if the editor will allow to specify a null color.


isShowSomeColors

public boolean isShowSomeColors()
Returns true, if the editor will provide a color chooser popup for some colors.


isShowMostRecentlyUsedColors

public boolean isShowMostRecentlyUsedColors()
Returns true, if the editor will provide a color chooser popup for the most recently used colors.


isShowMoreColors

public boolean isShowMoreColors()
Returns true, if the editor will provide a color chooser for all colors.


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