|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.option.OptionItem y.option.ObjectOptionItem y.option.ColorOptionItem
public class ColorOptionItem
An option item for Color values.
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE_ALLOW_TEXT_INPUT
Attribute key used to store an editor hint specifying whether or not a text input component is made available in addition to the default popup menu. |
static java.lang.String |
ATTRIBUTE_DISPLAY_HEX_VALUES
Attribute key used to store an editor hint specifying whether colors are displayed as hexadecimal values instead of decimal tuples. |
static java.lang.String |
ATTRIBUTE_SHOW_ALPHA
Attribute key used to store an editor hint specifying whether alpha values should be editable. |
static java.lang.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 java.lang.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 java.lang.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 java.lang.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. |
static java.lang.String |
ATTRIBUTE_USE_ICON_AS_TRIGGER
Attribute key used to store an editor hint specifying whether or not the color display icon used with text input serves to open the default popup menu. |
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(java.lang.String name,
java.awt.Color value)
Creates a new instance of ColorOptionItem. |
|
ColorOptionItem(java.lang.String name,
java.awt.Color value,
boolean showNoColor,
boolean showSomeColors,
boolean showMostRecentlyUsedColors,
boolean showMoreColors)
Creates a new instance of ColorOptionItem. |
Method Summary | |
---|---|
java.lang.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(java.lang.Object value)
Sets the value of this option item. |
Methods inherited from class y.option.ObjectOptionItem |
---|
getBackupValue, getValue, resetValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ATTRIBUTE_SHOW_ALPHA
Boolean
.
By default this attribute is set to false.
- See Also:
- Constant Field Values
public static final java.lang.String ATTRIBUTE_SHOW_SOME_COLORS
Boolean
.
By default this attribute is set to false
.
public static final java.lang.String ATTRIBUTE_SHOW_MRU_COLORS
Boolean
.
By default this attribute is set to false
.
public static final java.lang.String ATTRIBUTE_SHOW_MORE_COLORS
Boolean
.
By default this attribute is set to true
.
public static final java.lang.String ATTRIBUTE_SHOW_NO_COLOR
Boolean
.
By default this attribute is set to false
.
public static final java.lang.String ATTRIBUTE_DISPLAY_HEX_VALUES
Boolean
.
By default this attribute is set to false
.
public static final java.lang.String ATTRIBUTE_ALLOW_TEXT_INPUT
Boolean
.
By default this attribute is set to false
.
public static final java.lang.String ATTRIBUTE_USE_ICON_AS_TRIGGER
Boolean
.
By default this attribute is set to false
.
Constructor Detail |
---|
public ColorOptionItem(java.lang.String name, java.awt.Color value)
name
- the name of this itemvalue
- the initial Color valuepublic ColorOptionItem(java.lang.String name, java.awt.Color value, boolean showNoColor, boolean showSomeColors, boolean showMostRecentlyUsedColors, boolean showMoreColors)
name
- the name of this itemvalue
- the initial Color valueshowNoColor
- the editor will allow to specify a
null
color.showSomeColors
- the editor will provide a color chooser
popup for some colorsshowMostRecentlyUsedColors
- the editor will provide a color chooser
popup for the most recently used colorsshowMoreColors
- the editor will provide a color chooser
for all colorsMethod Detail |
---|
public java.lang.String getType()
getType
in class ObjectOptionItem
public void setValue(java.lang.Object value)
setValue
in class ObjectOptionItem
java.lang.IllegalArgumentException
- if the specified value
is
not of type Color
OptionItem.publishValue(Object)
public boolean isShowNoColor()
true
, if the editor will allow to specify a
null
color.
public boolean isShowSomeColors()
true
, if the editor will provide a color chooser
popup for some colors.
public boolean isShowMostRecentlyUsedColors()
true
, if the editor will provide a color chooser
popup for the most recently used colors.
public boolean isShowMoreColors()
true
, if the editor will provide a color chooser
for all colors.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |