|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.models.ColorNameList
public class ColorNameList
An associationlist of java.awt.SystemColor and com.sas.awt.Color objects as keys and name as values.
| Field Summary | |
|---|---|
protected boolean |
showSystemColors
|
| Fields inherited from class com.sas.collection.AssociationList |
|---|
items, keys |
| Fields inherited from class com.sas.collection.BaseCollection |
|---|
allContentsChangedListeners, mappingObject |
| Constructor Summary | |
|---|---|
ColorNameList()
The default constructor which fills the list with java defined com.sas.awt.Color and java.awt.SystemColor objects. |
|
ColorNameList(boolean showSystemColors)
This constructor fills the list with com.sas.awt.Color objects. |
|
ColorNameList(boolean showColors,
boolean showSystemColors)
This constructor fills the list com.sas.awt.Color objects if showColors is true and adds java.awt.SystemColor objects if showSystemColors is true. |
|
ColorNameList(java.util.Enumeration e)
A constructor that takes enumeration of java.awt.Color or com.sas.awt.Color objects and creates a list based on that. |
|
| Method Summary | |
|---|---|
void |
add(int hexValue)
Add a Color object to this list only if the object does not exist. |
void |
add(java.lang.Object c)
Add a color or system color object into this list only if the name is not in the list. |
void |
add(java.lang.String name,
java.awt.Color c)
Add a color name and a color object to this list only if the color is not in the list. |
void |
add(java.lang.String name,
int hexValue)
Add a color name and a color object to this list only if the color is not in the list. |
java.lang.Object |
clone()
Create a copy of the current model |
java.awt.Color |
getColor(java.lang.String colorName)
Return the Color corresponding to the name provided. |
java.lang.String |
getColorName(java.awt.Color color)
Return the color name corresponding to the Color provided. |
java.util.Enumeration |
getColors()
Returns an enumeration of com.sas.awt.Color and java.awt.SystemColor objects. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
|
boolean |
getShowSystemColors()
get the value of showSystemColors |
void |
setShowSystemColors(boolean bool)
Flag indicating whether to include the java.awt.SystemColors in the list or not. |
| Methods inherited from class com.sas.collection.AssociationList |
|---|
add, add, addItems, addItems, apply, applyToPairs, clone, contains, containsKey, count, count, countKey, dumpComponent, equals, equals, equals, fireContentsChanged, get, get, get, getIndex, getItems, getItems, getKey, getKey, getKey, getKeys, getKeys, getLastIndex, getPairs, getPairs, remove, removeAll, removeAll, removeAllAt, removeAt, removeAt, removeAt, set, set, set, setKey, setSize, sort, sort, toString, toString |
| Methods inherited from class com.sas.collection.BaseCollection |
|---|
addContentsChangedListener, anyContentsChangedListeners, disableEvents, enableEvents, enableEvents, fireContentsChanged, map, removeContentsChangedListener, unmap |
| Methods inherited from interface com.sas.collection.ContentsChangedSource |
|---|
addContentsChangedListener, removeContentsChangedListener |
| Methods inherited from interface com.sas.beans.PropertyChangeSource |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Field Detail |
|---|
protected boolean showSystemColors
| Constructor Detail |
|---|
public ColorNameList()
public ColorNameList(boolean showSystemColors)
showSystemColors - adds the java.awt.SystemColor if true.
public ColorNameList(boolean showColors,
boolean showSystemColors)
showSystemColors - adds the java.awt.SystemColor if true.public ColorNameList(java.util.Enumeration e)
Enumeration - of color and Systemcolor objects| Method Detail |
|---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
public void add(java.lang.String name,
int hexValue)
name - Name of the color to be added.hexValue - int referring to RGB value of the color
public void add(java.lang.String name,
java.awt.Color c)
name - Name of the color to be added.c - java.awt.Color objectpublic void add(int hexValue)
hexValue - RGB value of the color to be added.public void add(java.lang.Object c)
add in interface CollectionInterfaceadd in class AssociationListColor - or system color object to be added.
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface AssociationListInterfaceclone in interface CollectionInterfaceclone in interface DictionaryInterfaceclone in interface OrderedCollectionInterfaceclone in interface StaticCollectionInterfaceclone in interface StaticDictionaryInterfaceclone in interface StaticOrderedCollectionInterfaceclone in interface com.sas.PublicClonableclone in class AssociationListjava.lang.CloneNotSupportedException - if the clone fails.public void setShowSystemColors(boolean bool)
boolean - indicating true or falspublic boolean getShowSystemColors()
public java.awt.Color getColor(java.lang.String colorName)
colorName - a String corresponding to an item in the hashtable.
The String must be one of the items in this list.
Otherwise, the color corresponding to "black" is returned as
a default value.
java.util.NoSuchElementException - when there is no matching name in this
list.public java.lang.String getColorName(java.awt.Color color)
java.util.NoSuchElementException - when there is no matching Color in this
list.public java.util.Enumeration getColors()
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||