|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object echopoint.stylesheet.CssStyleSheetHelper
A CssStyleSheet helper class, which contains many method to validate and set style attributes as well as pre-built SymbolicValue[] arrays for common Echo constants.
Field Summary | |
static java.lang.Class |
classBooleanArray
A array class instance of Boolean[].class |
static java.lang.Class |
classByteArray
A array class instance of Byte[].class |
static java.lang.Class |
classCharacterArray
A array class instance of Character[].class |
static java.lang.Class |
classDoubleArray
A array class instance of Double[].class |
static java.lang.Class |
classFloatArray
A array class instance of Float[].class |
static java.lang.Class |
classIntegerArray
A array class instance of Integer[].class |
static java.lang.Class |
classLongArray
A array class instance of Long[].class |
static java.lang.Class |
classShortArray
A array class instance of Short[].class |
static java.lang.String[] |
ColorConstantStrings
Constant array for Color Contstant Strings |
static nextapp.echo.Color[] |
ColorConstantValues
Constant array for Color Constant values |
static SymbolicValue[] |
colors
Helper static SymbolicValue[] - Known nextapp.echo.Color constants |
static SymbolicValue[] |
containerPaneOrientation
Helper static SymbolicValue[] - ContainerPane.ORIENTATION_VERTICAL and ContainerPane.ORIENTATION_HORINZONTAL |
static SymbolicValue[] |
contentPaneScrollBarPolicy
Helper static SymbolicValue[] - ContentPane.SCROLL_BAR_NEVER,SCROLL_BAR_ALWAYS and SCROLL_BAR_AUTO |
static SymbolicValue[] |
ecBottomRight
Helper static SymbolicValue[] - EchoConstants BOTTOM, and RIGHT |
static java.lang.String[] |
EchoConstantsStrings
Constant array for EchoConstants Strings |
static int[] |
EchoConstantsValues
Constant array for EchoConstants values |
static SymbolicValue[] |
ecLeftCenterRight
Helper static SymbolicValue[] - EchoConstants LEFT, CENTER and RIGHT |
static SymbolicValue[] |
ecLeftRight
Helper static SymbolicValue[] - EchoConstants LEFT and RIGHT |
static SymbolicValue[] |
ecLeftTop
Helper static SymbolicValue[] - EchoConstants LEFT, and TOP |
static SymbolicValue[] |
ecTopBottom
Helper static SymbolicValue[] - EchoConstants TOP and BOTTOM |
static SymbolicValue[] |
ecTopCenterBottom
Helper static SymbolicValue[] - EchoConstants TOP, CENTER and BOTTOM |
static SymbolicValue[] |
ecTopLeftCenterBottomRight
Helper static SymbolicValue[] - EchoConstants TOP, LEFT, CENTER and BOTTOM, RIGHT |
static java.lang.String[] |
FontStrings
Constant array for Fonts strings |
static java.lang.String[] |
FontStyleStrings
Constant array for Fonts Style strings |
static int[] |
FontStyleValues
Constant array for Fonts Style values |
static java.lang.String[][] |
FontValues
Constant array for Fonts Values |
static SymbolicValue[] |
gridAllUnits
Helper static SymbolicValue[] - Grid.PIXEL_UNITS, PERCENT_INDIVIDUAL_PIXEL_TOTAL_UNITS and PERCENT_UNITS |
static SymbolicValue[] |
gridPixelPercentUnits
Helper static SymbolicValue[] - Grid.PIXEL_UNITS and Grid.PERCENT_UNITS |
static SymbolicValue[] |
textComponentBorderStyle
Helper static SymbolicValue[] - TextComponent.BORDER_DEFAULT, BORDER_NONE, BORDER_SOLID and BORDER_INSET |
Constructor Summary | |
CssStyleSheetHelper()
CssStyleSheetHelper constructor. |
Method Summary | |
static void |
applyStyleTo(java.lang.String styleString,
nextapp.echo.Component c)
Applies a CSS style sheet string in the form "attr1:val1;attr2:val2;...attrN:valN" to the given component. |
static int |
arrayIndex(java.lang.String s,
java.lang.String[] array)
Returns the index of the string in an array of strings, case insensitive or -1 if its not found |
static boolean |
eq(java.lang.String classSyleName,
java.lang.String attrName)
Returns true if the style attriute name matches. |
static ClipRect |
getClipRect(java.lang.String attrValue)
Returns the int [] clipping rect value of the given attrValue string. |
static java.lang.String |
getClipRectString(ClipRect value)
Returns a ClipRect string representation The allowable forms are : - rect(l,t,r,b) where l,t,r,b is an integer values |
static nextapp.echo.Color |
getColor(java.lang.String attrValue)
Returns the Color value of the given attrValue string. |
static java.lang.String |
getColorString(nextapp.echo.Color value)
Returns a Color string representation in the form : - #rrggbb where rr, gg, bb are hexidecimal integer values |
static int |
getConstant(java.lang.String attrValue,
java.lang.String[] constantStrings,
int[] constantValues)
Returns the int value of the given attrValue string. |
static CornerImages |
getCornerImages(java.lang.String attrValue)
Returns the CornerImages value of the given attrValue string. |
static java.lang.String |
getCornerImagesString(CornerImages value)
Returns a CornerImages string representation. |
static int |
getEchoConstant(java.lang.String attrValue)
Returns the int value of the given attrValue string. |
static nextapp.echo.Font |
getFont(java.lang.String attrValue)
Returns the Font value of the given attrValue string. |
static java.lang.String |
getFontString(nextapp.echo.Font value)
Returns a Font string representation in the form : - font(fontName, fontStyle, fontSize) where fontName - is one of the Echo font names fontStyle - PLAIN|BOLD|ITALIC|UNDERLINE fontSize - an integer size value |
static int |
getHexInteger(java.lang.String attrValue)
Returns the int value of the given hex attrValue string. |
static nextapp.echo.ImageReference |
getImage(java.lang.String attrValue)
Returns the ImageReference value of the given attrValue string. |
static java.lang.String |
getImageString(nextapp.echo.ImageReference value)
Returns an ImageReference string representation in the form : The allowable forms are : - image( url, width, height) where url is the string url path to then image and width and height are integer values |
static nextapp.echo.Insets |
getInsets(java.lang.String attrValue)
Returns the Insets value of the given attrValue string. |
static java.lang.String |
getInsetsString(nextapp.echo.Insets value)
Returns the a Insets string representation. |
static int[] |
getIntArray(java.lang.String attrValue)
Returns the int[] array value of the given attrValue string. |
static java.lang.String |
getIntArrayString(int[] value)
Returns an int[] array string representation in the form : - int(m1,m2...mN) where m are integer values |
static int |
getInteger(java.lang.String attrValue)
Returns the int value of the given attrValue string. |
static boolean |
isClipRect(java.lang.String attrValue)
Returns true if the attrValue is a valid representation of a Clipping Rectangle value. |
static boolean |
isColor(java.lang.String attrValue)
Returns true if the attrValue is a valid representation of a Color value. |
static boolean |
isConstant(java.lang.String attrValue,
java.lang.String[] constantStrings,
int[] contantValues)
Returns TRUE if the attrValue is an string or inetger value from the given string and integer contants. |
static boolean |
isCornerImages(java.lang.String attrValue)
Returns true if the attrValue is a valid representation of a CornerImages value. |
static boolean |
isEchoConstant(java.lang.String attrValue)
Returns TRUE if the attrValue is an EchoConstants value |
static boolean |
isFont(java.lang.String attrValue)
Returns true if the attrValue is a valid representation of a Font value. |
static boolean |
isHexInteger(java.lang.String attrValue)
Returns true if the attrValue is a valid representation of a base 16 Integer value. |
static boolean |
isImage(java.lang.String attrValue)
Returns true if the attrValue is a valid representation of a ImageReference value. |
static boolean |
isInsets(java.lang.String attrValue)
Returns true if the attrValue is a valid representation of a Insets value. |
static boolean |
isIntArray(java.lang.String attrValue)
Returns true if the attrValue is a valid representation of a int array value. |
static boolean |
isInteger(java.lang.String attrValue)
Returns true if the attrValue is a valid representation of a base 10 Integer value. |
static boolean |
isNullString(java.lang.String attrValue)
Returns TRUE if the attrValue is the null string |
static boolean |
setBooleanAttribute(nextapp.echo.Style style,
java.lang.String attrName,
java.lang.String attrValue)
A helper to set an Boolean attribute |
static boolean |
setClipRectAttribute(nextapp.echo.Style style,
java.lang.String attrName,
java.lang.String attrValue)
A helper to set a ClipRect attribute |
static boolean |
setColorAttribute(nextapp.echo.Style style,
java.lang.String attrName,
java.lang.String attrValue)
A helper to set a Color attribute |
static boolean |
setConstantAttribute(nextapp.echo.Style style,
java.lang.String attrName,
java.lang.String attrValue,
java.lang.String[] constantStrings,
int[] constantValues)
A helper to set an Constants int value |
static boolean |
setCornerImagesAttribute(nextapp.echo.Style style,
java.lang.String attrName,
java.lang.String attrValue)
A helper to set a CornerImages attribute |
static boolean |
setEchoConstantsAttribute(nextapp.echo.Style style,
java.lang.String attrName,
java.lang.String attrValue)
A helper to set an EchoConstants int value |
static boolean |
setFontAttribute(nextapp.echo.Style style,
java.lang.String attrName,
java.lang.String attrValue)
A helper to set a Font attribute |
static boolean |
setImageAttribute(nextapp.echo.Style style,
java.lang.String attrName,
java.lang.String attrValue)
A helper to set a HttpImageReference attribute |
static boolean |
setInsetsAttribute(nextapp.echo.Style style,
java.lang.String attrName,
java.lang.String attrValue)
A helper to set a Insets attribute |
static boolean |
setIntegerArrayAttribute(nextapp.echo.Style style,
java.lang.String attrName,
java.lang.String attrValue)
A helper to set a Integer Array attribute |
static boolean |
setIntegerAttribute(nextapp.echo.Style style,
java.lang.String attrName,
java.lang.String attrValue)
A helper to set an Integer attribute |
static boolean |
setStringAttribute(nextapp.echo.Style style,
java.lang.String attrName,
java.lang.String attrValue)
A helper to set an String attribute |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.Class classIntegerArray
public static java.lang.Class classLongArray
public static java.lang.Class classShortArray
public static java.lang.Class classDoubleArray
public static java.lang.Class classFloatArray
public static java.lang.Class classBooleanArray
public static java.lang.Class classCharacterArray
public static java.lang.Class classByteArray
public static SymbolicValue[] ecTopLeftCenterBottomRight
public static SymbolicValue[] ecLeftCenterRight
public static SymbolicValue[] ecLeftRight
public static SymbolicValue[] ecTopCenterBottom
public static SymbolicValue[] ecTopBottom
public static SymbolicValue[] ecLeftTop
public static SymbolicValue[] ecBottomRight
public static SymbolicValue[] gridPixelPercentUnits
public static SymbolicValue[] gridAllUnits
public static SymbolicValue[] containerPaneOrientation
public static SymbolicValue[] contentPaneScrollBarPolicy
public static SymbolicValue[] textComponentBorderStyle
public static SymbolicValue[] colors
public static java.lang.String[] ColorConstantStrings
public static nextapp.echo.Color[] ColorConstantValues
public static java.lang.String[] FontStrings
public static java.lang.String[][] FontValues
public static java.lang.String[] EchoConstantsStrings
public static int[] EchoConstantsValues
public static java.lang.String[] FontStyleStrings
public static int[] FontStyleValues
Constructor Detail |
public CssStyleSheetHelper()
Method Detail |
public static int arrayIndex(java.lang.String s, java.lang.String[] array)
public static boolean eq(java.lang.String classSyleName, java.lang.String attrName)
public static ClipRect getClipRect(java.lang.String attrValue)
The allowable forms are :
- rect(l,t,r,b) where l,t,r,b is an integer values
public static java.lang.String getClipRectString(ClipRect value)
The allowable forms are :
- rect(l,t,r,b) where l,t,r,b is an integer values
public static nextapp.echo.Color getColor(java.lang.String attrValue)
The allowable forms are :
- #rrggbb where rr, gg, bb are hexidecimal integer values
- rgb( r, g, b) where r,g,b are integer values
- color( r, g, b) where r,g,b are integer values
public static java.lang.String getColorString(nextapp.echo.Color value)
- #rrggbb where rr, gg, bb are hexidecimal integer values
public static int getConstant(java.lang.String attrValue, java.lang.String[] constantStrings, int[] constantValues)
public static CornerImages getCornerImages(java.lang.String attrValue)
The allowable forms are :
- corners(url1,url2) where url1 and url2 are image url values
- corners(url1,w,h,url2,w,h) where url1 and url2 are image url values and w,h are integer values
public static java.lang.String getCornerImagesString(CornerImages value)
The allowable forms are :
- corners(url1,url2) where url1 and url2 are image url values
- corners(url1,w,h,url2,w,h) where url1 and url2 are image url values and w,h are integer values
public static int getEchoConstant(java.lang.String attrValue)
public static nextapp.echo.Font getFont(java.lang.String attrValue)
The allowable forms are :
- fontName,fontStyle,fontSize
- font(fontName, fontStyle, fontSize)
where
fontName - is one of the Echo font names fontStyle - PLAIN|BOLD|ITALIC|UNDERLINE fontSize - an integer size value
public static java.lang.String getFontString(nextapp.echo.Font value)
- font(fontName, fontStyle, fontSize)
where
fontName - is one of the Echo font names fontStyle - PLAIN|BOLD|ITALIC|UNDERLINE fontSize - an integer size value
public static int getHexInteger(java.lang.String attrValue)
public static nextapp.echo.ImageReference getImage(java.lang.String attrValue)
The allowable forms are :
- image( url) where url is the string url path to then image
- image( url, width, height) where url is the string url path to then image and width and height are integer values
- img( url) where url is the string url path to then image
- img( url, width, height) where url is the string url path to then image and width and height are integer values
public static java.lang.String getImageString(nextapp.echo.ImageReference value)
The allowable forms are :
- image( url, width, height) where url is the string url path to then image and width and height are integer values
public static nextapp.echo.Insets getInsets(java.lang.String attrValue)
The allowable forms are :
- insets(i ) where i is an integer values
- insets(w, h) where w,h is an integer values
- insets(l,t,r,b) where l,t,r,b is an integer values
public static java.lang.String getInsetsString(nextapp.echo.Insets value)
The allowable forms are :
- insets(i ) where i is an integer values
- insets(w, h) where w,h is an integer values
- insets(l,t,r,b) where l,t,r,b is an integer values
public static int[] getIntArray(java.lang.String attrValue)
The allowable forms are :
- int(m1,m2...mN) where m are integer values
public static java.lang.String getIntArrayString(int[] value)
- int(m1,m2...mN) where m are integer values
public static int getInteger(java.lang.String attrValue)
public static boolean isClipRect(java.lang.String attrValue)
The allowable forms are :
- rect(l,t,r,b) where l,t,r,b is an integer values
public static boolean isColor(java.lang.String attrValue)
The allowable forms are :
- colorconstant where colorconstant in (red,blue,green...)
- #rrggbb where rr, gg, bb are hexidecimal integer values
- rgb( r, g, b) where r,g,b are integer values
- color( r, g, b) where r,g,b are integer values
public static boolean isConstant(java.lang.String attrValue, java.lang.String[] constantStrings, int[] contantValues)
public static boolean isCornerImages(java.lang.String attrValue)
The allowable forms are :
- corners(url1,url2) where url1 and url2 are image url values
- corners(url1,w,h,url2,w,h) where url1 and url2 are image url values and w,h are integer values
public static boolean isEchoConstant(java.lang.String attrValue)
public static boolean isFont(java.lang.String attrValue)
The allowable forms are :
- fontName,fontStyle,fontSize
- font(fontName, fontStyle, fontSize)
where
fontName - is one of the Echo font names fontStyle - PLAIN|BOLD|ITALIC|UNDERLINE or nothing fontSize - an integer size value
public static boolean isHexInteger(java.lang.String attrValue)
public static boolean isImage(java.lang.String attrValue)
The allowable forms are :
- image( url) where url is the string url path to then image
- image( url, width, height) where url is the string url path to then image and width and height are integer values
- img( url) where url is the string url path to then image
- img( url, width, height) where url is the string url path to then image and width and height are integer values
public static boolean isInsets(java.lang.String attrValue)
The allowable forms are :
- insets(i ) where i is an integer values
- insets(w, h) where w,h is an integer values
- insets(l,t,r,b) where l,t,r,b is an integer values
public static boolean isIntArray(java.lang.String attrValue)
The allowable forms are :
- int(m1,m2...mN) where m are integer values
public static boolean isInteger(java.lang.String attrValue)
public static boolean isNullString(java.lang.String attrValue)
public static boolean setBooleanAttribute(nextapp.echo.Style style, java.lang.String attrName, java.lang.String attrValue)
public static boolean setClipRectAttribute(nextapp.echo.Style style, java.lang.String attrName, java.lang.String attrValue)
public static boolean setColorAttribute(nextapp.echo.Style style, java.lang.String attrName, java.lang.String attrValue)
public static boolean setConstantAttribute(nextapp.echo.Style style, java.lang.String attrName, java.lang.String attrValue, java.lang.String[] constantStrings, int[] constantValues)
public static boolean setCornerImagesAttribute(nextapp.echo.Style style, java.lang.String attrName, java.lang.String attrValue)
public static boolean setEchoConstantsAttribute(nextapp.echo.Style style, java.lang.String attrName, java.lang.String attrValue)
public static boolean setFontAttribute(nextapp.echo.Style style, java.lang.String attrName, java.lang.String attrValue)
public static boolean setImageAttribute(nextapp.echo.Style style, java.lang.String attrName, java.lang.String attrValue)
public static boolean setInsetsAttribute(nextapp.echo.Style style, java.lang.String attrName, java.lang.String attrValue)
public static boolean setIntegerArrayAttribute(nextapp.echo.Style style, java.lang.String attrName, java.lang.String attrValue)
public static boolean setIntegerAttribute(nextapp.echo.Style style, java.lang.String attrName, java.lang.String attrValue)
public static boolean setStringAttribute(nextapp.echo.Style style, java.lang.String attrName, java.lang.String attrValue)
public static void applyStyleTo(java.lang.String styleString, nextapp.echo.Component c) throws StyleSheetParseException, StyleSheetInvalidValueException
For example the string might look like
"font:font(verdana,bold,8);background:#ffccdd;foreground:rgb(123,123,123)"
styleString
- - a style string in the form "attr1:val1;attr2:val2;...attrN:valN"c
- - the component to apply the StyleSheet to.
StyleSheetParseException
- - if the styleString cannot be parsed
StyleSheetInvalidValueException
- - if an invalid attribute or value is usedCssStyleSheet
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |