|
LPEX 4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.lpex.core.LpexPaletteAttributes
public final class LpexPaletteAttributes
This class provides a mechanism for converting style attributes to a specified palette.
Method Summary | |
---|---|
static String |
background(LpexView lpexView)
Use this method to determine the background color of the default style (parameter styleAttributes.default) that is used by the specified document view. |
static String |
convert(String styleAttributesString,
String fromBackground,
String toBackground)
Use this method to convert a style attributes string from one background color to another. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String background(LpexView lpexView)
public static String convert(String styleAttributesString, String fromBackground, String toBackground)
As an example, below is how the style character for comments ('c'
)
is defined in the Java document parser, in order to ensure correct colors for
the active palette. The parser uses the common
ATTRIBUTES_COMMENT
style attributes,
which are defined for BACKGROUND_COLOR
(white), first converted to the currently active palette.
// get the background color of view's active palette String toBackground = LpexPaletteAttributes.background(view); // convert style attributes from definition background to the active one String attributes = LpexPaletteAttributes.convert(ATTRIBUTES_COMMENT, BACKGROUND_COLOR, toBackground); // define the style character setStyle("c", attributes); |
LpexCommonParser.setStyle(java.lang.String, java.lang.String)
|
LPEX 4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |