|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.awt.Color
public class Color
A class representing Color. It has a default colorList that stores the name and RGB value pairs for the java defined colors. User can create a color object by specifying a name and its RGB value - this will be stored in the colorList for lookup at later time. eg. new Color("myColor", 0x808000)
RGBList
,
Serialized FormField Summary | |
---|---|
static Color |
control
|
static Color |
controlHighlight
|
static Color |
controlShadow
|
static Color |
controlText
|
protected java.lang.String |
name
name of this color |
protected static java.lang.String |
NODETYPE
Node type color |
static Color |
windowBorder
|
Constructor Summary | |
---|---|
Color()
Default constructor |
|
Color(java.awt.Color jc)
Deprecated. use newColor(java.awt.Color) |
|
Color(int hexValue)
A constructor that takes a RGB value and creates a color object. |
|
Color(int r,
int g,
int b)
A constructor that takes three integers and creates a com.sas.awt.Color object. |
|
Color(java.lang.String name)
A constructor that takes a String and creates a new color object. |
|
Color(java.lang.String name,
int hexValue)
A constructor that takes a String and a RGB value and puts it in the list and creates a color object. |
Method Summary | |
---|---|
static void |
addColor(java.lang.String name,
int hexValue)
Add a color and corresponding RGB value to the list. |
java.lang.Object |
clone()
Clones the component |
int |
countNodeChildren(int maximumChildCount)
Always returns 0 |
boolean |
equals(java.lang.Object color)
Compares this object against the specified object. |
com.sas.visuals.IconInterface |
getDefaultIcon()
Returns the default icon for the current node. |
com.sas.visuals.IconInterface |
getExpandedIcon()
Returns the expanded icon for the current node. |
com.sas.visuals.IconInterface |
getExpandedSelectedIcon()
Sets the expandedSelected icon for the current node. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
Returns the ExtendedBeanInfo for this class. |
java.awt.Insets |
getInsets()
Get the insets of the current color. |
java.lang.String |
getName()
Gets the name of this color object |
com.sas.models.SimpleNodeInterface |
getNodeChild(int index)
Returns the child node at the specified index. |
int |
getNodeChildCount()
Returns the number of children available. |
com.sas.models.SimpleNodeInterface[] |
getNodeChildren(int startIndex,
int count)
Returns the specified range of children for the current node. |
java.lang.String |
getNodeExpandedText()
Returns the value of the nodeExpandedText property. |
java.lang.String |
getNodeText()
Returns the value of the nodeText property. |
java.lang.String |
getNodeType()
Returns the value of the nodeType property. |
java.awt.Dimension |
getPreferredSize()
Return the preferredSize of the area to be painted. |
int |
getRGB()
Gets the RGB value of this color component. |
com.sas.visuals.IconInterface |
getSelectedIcon()
Returns the selected icon for the current node. |
boolean |
isHexString()
Returns true if the name of this color object is a hexString |
boolean |
isLeafNode()
Indicates whether the current node is a leaf. |
static void |
merge(com.sas.models.RGBList rgbList)
Merge the new list with the current list. |
static Color |
newColor(java.awt.Color jcolor)
Return the com.sas.awt.Color Object corresponding to the java.awt.color object passed in. |
static Color |
newColor(int rgb)
Return the Color Object corresponding to the rgb value from the list. |
static Color |
newColor(java.lang.String colorName)
Return the com.sas.awt.Color Object corresponding to the name provided. |
void |
paint(java.awt.Component component,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paint the current color in the specified bounds. |
static void |
removeAll()
Removes all the items from the colorlist |
java.lang.String |
toString()
Gets the string representation of this color object. |
Field Detail |
---|
public static Color windowBorder
public static Color controlHighlight
public static Color controlShadow
public static Color control
public static Color controlText
protected java.lang.String name
protected static java.lang.String NODETYPE
Constructor Detail |
---|
public Color()
public Color(java.lang.String name)
color
- namepublic Color(int hexValue)
hexValue
- RGB in hexadecimal form.public Color(java.lang.String name, int hexValue)
name
- of the colorRGB
- value corresponding to the name of the color.public Color(int r, int g, int b)
r
- red component of the colorg
- green component of the colorb
- blue component of the colorpublic Color(java.awt.Color jc)
r
- red component of the colorg
- green component of the colorb
- blue component of the colorMethod Detail |
---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
public static void addColor(java.lang.String name, int hexValue)
name
- Name of the color to be added.hexValue
- int referring to RGB value of the colorpublic static Color newColor(java.awt.Color jcolor)
jcolor
- a java.awt.Color object.
public static Color newColor(java.lang.String colorName)
colorName
- a String specifying the color name.
public static Color newColor(int rgb)
rgb
- an integer representing the hex value of a color
public static void merge(com.sas.models.RGBList rgbList)
rgbList
- to merge with this listpublic static void removeAll()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface com.sas.PublicClonable
clone
in class ColorComponent
java.lang.CloneNotSupportedException
- if the model attached to the component being cloned
will not allow the clone to attach.public boolean equals(java.lang.Object color)
equals
in class java.awt.Color
obj
- the object to compare with.
public java.lang.String getName()
public int getRGB()
getRGB
in class java.awt.Color
public boolean isHexString()
public java.lang.String toString()
toString
in class java.awt.Color
public java.lang.String getNodeExpandedText()
getNodeExpandedText
in interface com.sas.models.NodeInterface
public java.lang.String getNodeText()
getNodeText
in interface com.sas.models.NodeInterface
public java.lang.String getNodeType()
getNodeType
in interface com.sas.models.NodeInterface
public int countNodeChildren(int maximumChildCount)
countNodeChildren
in interface com.sas.models.SimpleNodeInterface
NodeIconInterface
public int getNodeChildCount()
getNodeChildCount
in interface com.sas.models.SimpleNodeInterface
public boolean isLeafNode()
isLeafNode
in interface com.sas.models.SimpleNodeInterface
public com.sas.models.SimpleNodeInterface getNodeChild(int index)
getNodeChild
in interface com.sas.models.SimpleNodeInterface
index
- the 0-based index of the child node to retrieve
public com.sas.models.SimpleNodeInterface[] getNodeChildren(int startIndex, int count)
getNodeChildren
in interface com.sas.models.SimpleNodeInterface
startIndex
- 0-based index which identifies the start of the rangecount
- the amount of children to get
public com.sas.visuals.IconInterface getDefaultIcon()
getDefaultIcon
in interface com.sas.models.NodeIconInterface
public com.sas.visuals.IconInterface getExpandedIcon()
getExpandedIcon
in interface com.sas.models.NodeIconInterface
public com.sas.visuals.IconInterface getSelectedIcon()
getSelectedIcon
in interface com.sas.models.NodeIconInterface
public com.sas.visuals.IconInterface getExpandedSelectedIcon()
getExpandedSelectedIcon
in interface com.sas.models.NodeIconInterface
public java.awt.Dimension getPreferredSize()
getPreferredSize
in interface com.sas.visuals.IconInterface
public void paint(java.awt.Component component, java.awt.Graphics g, int x, int y, int width, int height)
paint
in interface com.sas.visuals.PainterInterface
comp
- the component used to determine the color used to paintg
- the Graphics contextx
- the x position of the bounds to paint the color iny
- the y position of the bounds to paint the color inwidth
- the width of the bounds to paint the color inheight
- the height of the bounds to paint the color inpublic java.awt.Insets getInsets()
getInsets
in interface com.sas.visuals.PainterInterface
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |