|
SWT LPEX v3.0.5 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.lpex.hlasm.ColorDefinition
This class is used to associate a name with two RGB values. The name is used to identify a color, and the RGB values are foreground and background RGB values for the color. The color definitions are used to color HLASM instructions with user-defined colors.
Constructor Summary | |
---|---|
ColorDefinition()
Default constructor. |
|
ColorDefinition(char color_code,
String name,
String foreground,
String background,
String foreground_RGB,
String background_RGB)
Constructor. |
Method Summary | |
---|---|
int |
getBackgroundBlue()
Retrieve the blue component of the background color. |
int |
getBackgroundGreen()
Retrieve the green component of the background color. |
int |
getBackgroundRed()
Retrieve the red component of the background color. |
char |
getColorCode()
Get the color code. |
int |
getForegroundBlue()
Retrieve the blue component of the foreground color. |
int |
getForegroundGreen()
Retrieve the green component of the foreground color. |
int |
getForegroundRed()
Retrieve the red component of the foreground color. |
String |
getName()
Get the color name. |
String |
getRGBString()
Return the six RBG values for this color. |
boolean |
setBackground(String background)
Set the background. |
void |
setBackgroundRGB(int red,
int green,
int blue)
Set the highlight color. |
boolean |
setForeground(String foreground)
Set the foreground. |
void |
setForegroundRGB(int red,
int green,
int blue)
Set the text color. |
void |
setName(String name)
Set the color name. |
StringBuffer |
toXMLString()
Return an XML-tagged string for this color. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ColorDefinition()
public ColorDefinition(char color_code, String name, String foreground, String background, String foreground_RGB, String background_RGB)
color_code
- a style character that can be used by LPEX for this
color. The character should be one that is not
in use by the document parser or reserved by LPEXname
- a name that will be used to uniquely identify the colorforeground
- the color to be used for the text. Optional (null or
empty string for none). If given, the string should be
a number between 1 and 16 inclusive. The numbers
corespond to pre-defined colors as follows:
background
- specifies the color to be used to highlight the text.
Optional (null or empty string for none). If given,
the string should be a number between 1 and 16 inclusive.
The numbers corespond to the pre-defined colors mentioned
above. If not specified, a background_RGB should be
providedforeground_RGB
- the color to be used to color the text. This will
overide a foreground value.
The foreground color can be in any of 3 forms:
background_RGB
- the color to be used to highlight the text.
This will overide the background value.
The background color can be in any of the three forms that
can be used for foreground_RGBMethod Detail |
public String getName()
public void setName(String name)
name
- the name to setpublic int getForegroundRed()
public int getForegroundGreen()
public int getForegroundBlue()
public boolean setForeground(String foreground)
foreground
- the foreground color, specified in any of 3 forms:
public int getBackgroundRed()
public int getBackgroundGreen()
public int getBackgroundBlue()
public boolean setBackground(String background)
background
- the background color, specified in any of 3 forms:
public char getColorCode()
public String getRGBString()
public void setForegroundRGB(int red, int green, int blue)
red
- value between 0 and 255 inclusivegreen
- value between 0 and 255 inclusiveblue
- value between 0 and 255 inclusivepublic void setBackgroundRGB(int red, int green, int blue)
red
- value between 0 and 255 inclusivegreen
- value between 0 and 255 inclusiveblue
- value between 0 and 255 inclusivepublic StringBuffer toXMLString()
|
SWT LPEX v3.0.5 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |