|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.util.CssStyle
public class CssStyle
Cascading Style Sheet "style" wrapper
Field Summary | |
---|---|
static java.lang.String |
FONT_STYLE_ITALIC
|
static java.lang.String |
FONT_WEIGHT_BOLD
|
static java.lang.String |
TEXT_DECORATION_BLINK
|
static java.lang.String |
TEXT_DECORATION_OVERLINE
|
static java.lang.String |
TEXT_DECORATION_UNDERLINE
|
Constructor Summary | |
---|---|
CssStyle()
|
|
CssStyle(CssStyle other)
|
Method Summary | |
---|---|
protected java.lang.String |
_wrapText_TAG(java.lang.String TAG,
java.lang.String text)
Returns a span wrapped HTML text |
void |
clear()
Clears all state |
java.lang.String |
getBackgroundColor()
Gets the text background color |
java.lang.String |
getFontStyle()
Gets the text font style |
java.lang.String |
getFontWeight()
Gets the text font weight |
java.lang.String |
getForegroundColor()
Gets the text foreground color |
java.lang.String |
getStyleString()
Gets the "style" value Note: the prefixing style= and quotes are not included. |
java.lang.String |
getTextDecoration()
Gets the text decoration |
boolean |
hasBackgroundColor()
Returns true if the background color attribute has been defined |
boolean |
hasFontStyle()
Returns true if the text font style attribute has been defined |
boolean |
hasFontWeight()
Returns true if the text font weight attribute has been defined |
boolean |
hasForegroundColor()
Returns true if the foreground color attribute has been defined |
boolean |
hasStyle()
Returns true if this CssStyle contains style information |
boolean |
hasTextDecoration()
Returns true if the text decoration attribute has been defined |
CssStyle |
setBackgroundColor(java.lang.String color)
Sets the text background color |
CssStyle |
setFontStyle(java.lang.String fs)
Sets the text font style ("font-style:") |
CssStyle |
setFontStyleItalic()
Sets the text font style to "italic" |
CssStyle |
setFontWeight(java.lang.String fw)
Sets the text font weight ("font-weight:") |
CssStyle |
setFontWeightBold()
Sets the text font weight to "bold" |
CssStyle |
setForegroundColor(ColorTools.RGB rgb)
Sets the text foregound color |
CssStyle |
setForegroundColor(java.lang.String color)
Sets the text foregound color |
CssStyle |
setTextDecoration(java.lang.String decor)
Sets the text decoration style ("text-decoration:") |
CssStyle |
setTextDecorationBlink()
Sets the text decoration style to "blink" |
CssStyle |
setTextDecorationOverline()
Sets the text decoration style to "overline" |
CssStyle |
setTextDecorationUnderline()
Sets the text decoration style to "underline" |
java.lang.String |
toString()
Returns the "style" String representation of this instance |
java.lang.String |
wrapText_div(java.lang.String text)
Returns a div wrapped HTML text |
java.lang.String |
wrapText_span(java.lang.String text)
Returns a span wrapped HTML text |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TEXT_DECORATION_UNDERLINE
public static final java.lang.String TEXT_DECORATION_OVERLINE
public static final java.lang.String TEXT_DECORATION_BLINK
public static final java.lang.String FONT_WEIGHT_BOLD
public static final java.lang.String FONT_STYLE_ITALIC
Constructor Detail |
---|
public CssStyle()
public CssStyle(CssStyle other)
Method Detail |
---|
public void clear()
public CssStyle setForegroundColor(ColorTools.RGB rgb)
rgb
- The ColorTools.RGB value of the text foreground color
public CssStyle setForegroundColor(java.lang.String color)
color
- The String representation of the text foreground color
public boolean hasForegroundColor()
public java.lang.String getForegroundColor()
public CssStyle setBackgroundColor(java.lang.String color)
color
- The String representation of the text background color
public boolean hasBackgroundColor()
public java.lang.String getBackgroundColor()
public CssStyle setTextDecoration(java.lang.String decor)
decor
- text decoraton style (ie. "underline", "overline", "line-through", "blink")
public CssStyle setTextDecorationUnderline()
public CssStyle setTextDecorationOverline()
public CssStyle setTextDecorationBlink()
public boolean hasTextDecoration()
public java.lang.String getTextDecoration()
public CssStyle setFontWeight(java.lang.String fw)
fw
- The text font weight (ie. "bold", "normal", "100".."900")
public CssStyle setFontWeightBold()
public boolean hasFontWeight()
public java.lang.String getFontWeight()
public CssStyle setFontStyle(java.lang.String fs)
fs
- The text font style (ie. "normal", "italic", "oblique")
public CssStyle setFontStyleItalic()
public boolean hasFontStyle()
public java.lang.String getFontStyle()
public boolean hasStyle()
public java.lang.String getStyleString()
style=
and quotes are not included.
public java.lang.String toString()
toString
in class java.lang.Object
protected java.lang.String _wrapText_TAG(java.lang.String TAG, java.lang.String text)
span
wrapped HTML text
span
wrapped HTML textpublic java.lang.String wrapText_span(java.lang.String text)
span
wrapped HTML text
span
wrapped HTML textpublic java.lang.String wrapText_div(java.lang.String text)
div
wrapped HTML text
div
wrapped HTML text
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |