|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.osbcp.css.CSS
public class CSS
Java representation of CSS which can be exported to a stylesheet file.
Field Summary | |
---|---|
static AUTO |
AUTO
Convenient variable that represents the AUTO unit |
Constructor Summary | |
---|---|
CSS()
Constructor that creates a new CSS instance. |
Method Summary | |
---|---|
CSS |
addPseudoSelector(PseudoSelector pseudoSelector,
CSS css)
Adds a pseudo selector to the current CSS. |
CSS |
clear(java.lang.String key)
Clears a specific CSS attribute. |
static CM |
CM(int length)
Creates a new centimeter (cm) CSS unit. |
CSS |
copy()
Copies the current CSS object to a new CSS object. |
static EM |
EM(int length)
Creates a new em CSS unit. |
static EX |
EX(int length)
Creates a new ex CSS unit. |
static void |
export(java.lang.Class<?> stylesheetClass,
java.io.File stylesheetFile,
boolean includeComments)
Exports all the CSS declared in a specific class to a specific file. |
java.lang.String |
getClassName()
Returns the class name for the CSS, based on the declared attributes. |
java.util.Map<java.lang.String,java.io.Serializable> |
getSheet()
Returns all the current declared CSS attributes. |
static IN |
IN(int length)
Creates a new inch (in) CSS unit. |
static MM |
MM(int length)
Creates a new millimeter (mm) CSS unit. |
static PC |
PC(int length)
Creates a new pica (pc) CSS unit. |
static PCT |
PCT(int length)
Creates a new percent (%) CSS unit. |
static PT |
PT(int length)
Creates a new point (pt) CSS unit. |
static PX |
PX(int length)
Creates a new pixel (px) CSS unit. |
void |
setAttributeSelector(java.io.Serializable attribute)
Sets the attribute selector. |
void |
setAttributeSelector(java.io.Serializable attribute,
java.io.Serializable value)
Sets the attribute selector. |
CSS |
setBackground(java.io.Serializable color,
java.io.Serializable url,
BackgroundRepeat repeat,
BackgroundPosition position)
Sets the background property. |
CSS |
setBackgroundAttachment(BackgroundAttachment attachment)
Sets the background-attachment property. |
CSS |
setBackgroundColor(java.io.Serializable color)
Sets the background-color property. |
CSS |
setBackgroundImage(java.io.Serializable url)
Sets the background-image property. |
CSS |
setBackgroundPosition(BackgroundPosition position)
Sets the background-position property. |
CSS |
setBackgroundPosition(Unit xpos,
Unit ypos)
Sets the background-position property. |
CSS |
setBackgroundRepeat(BackgroundRepeat repeat)
Sets the background-repeat property. |
CSS |
setBorder(BorderWidth width,
BorderStyle style,
java.io.Serializable color)
Sets the border property. |
CSS |
setBorder(Unit width,
BorderStyle style,
java.io.Serializable color)
Sets the border property. |
CSS |
setBorderBottom(BorderWidth width,
BorderStyle style,
java.io.Serializable color)
Sets the border-bottom property. |
CSS |
setBorderBottom(Unit width,
BorderStyle style,
java.io.Serializable color)
Sets the border-bottom property. |
CSS |
setBorderBottomColor(java.io.Serializable color)
Sets the border-bottom-color property. |
CSS |
setBorderBottomStyle(BorderStyle style)
Sets the border-bottom-style property. |
CSS |
setBorderBottomWidth(BorderWidth width)
Sets the border-bottom-width property. |
CSS |
setBorderBottomWidth(Unit width)
Sets the border-bottom-width property. |
CSS |
setBorderColor(java.io.Serializable color)
Sets the border-color property. |
CSS |
setBorderLeft(BorderWidth width,
BorderStyle style,
java.io.Serializable color)
Sets the border-left property. |
CSS |
setBorderLEft(Unit width,
BorderStyle style,
java.io.Serializable color)
Sets the border-left property. |
CSS |
setBorderLeftColor(java.io.Serializable color)
Sets the border-left-color property. |
CSS |
setBorderLeftStyle(BorderStyle style)
Sets the border-left-style property. |
CSS |
setBorderLeftWidth(BorderWidth width)
Sets the border-left-width property. |
CSS |
setBorderLeftWidth(Unit width)
Sets the border-left-width property. |
CSS |
setBorderRight(BorderWidth width,
BorderStyle style,
java.io.Serializable color)
Sets the border-right property. |
CSS |
setBorderRight(Unit width,
BorderStyle style,
java.io.Serializable color)
Sets the border-right property. |
CSS |
setBorderRightColor(java.io.Serializable color)
Sets the border-right-color property. |
CSS |
setBorderRightStyle(BorderStyle style)
Sets the border-right-style property. |
CSS |
setBorderRightWidth(BorderWidth width)
Sets the border-right-width property. |
CSS |
setBorderRightWidth(Unit width)
Sets the border-right-width property. |
CSS |
setBorderStyle(BorderStyle style)
Sets the border-style property. |
CSS |
setBorderTop(BorderWidth width,
BorderStyle style,
java.io.Serializable color)
Sets the border-top property. |
CSS |
setBorderTop(Unit width,
BorderStyle style,
java.io.Serializable color)
Sets the border-top property. |
CSS |
setBorderTopColor(java.io.Serializable color)
Sets the border-top-color property. |
CSS |
setBorderTopStyle(BorderStyle style)
Sets the border-top-style property. |
CSS |
setBorderTopWidth(BorderWidth width)
Sets the border-top-width property. |
CSS |
setBorderTopWidth(Unit width)
Sets the border-top-width property. |
CSS |
setBorderWidth(BorderWidth width)
Sets the border-width property. |
CSS |
setBorderWidth(Unit width)
Sets the border-width property. |
CSS |
setBottom(Unit bottom)
Sets the bottom property. |
CSS |
setClear(Clear clear)
Sets the clear property. |
CSS |
setClipShape(Unit top,
Unit right,
Unit bottom,
Unit left)
Sets the clip property. |
CSS |
setColor(java.io.Serializable color)
Sets the color property. |
CSS |
setCursor(Cursor cursor)
Sets the cursor property. |
CSS |
setCursor(java.io.Serializable url)
Sets the cursor property. |
CSS |
setDirection(TextDirection direction)
Sets the direction property. |
CSS |
setDisplay(Display display)
Sets the display property. |
CSS |
setFloat(Float f)
Sets the float property. |
CSS |
setFontFamily(java.io.Serializable family)
Sets the font-family property. |
CSS |
setFontSize(Unit size)
Sets the font-size property. |
CSS |
setFontStyle(FontStyle style)
Sets the font-style property. |
CSS |
setFontVariant(FontVariant variant)
Sets the font-variant property. |
CSS |
setFontWeight(FontWeight weight)
Sets the font-weight property. |
CSS |
setHeight(Unit height)
Sets the height property. |
CSS |
setLeft(Unit left)
Sets the left property. |
CSS |
setLetterSpacing(Unit spacing)
Sets the letter-spacing property. |
CSS |
setLineHeight(Unit height)
Sets the line-height property. |
CSS |
setListStyleImage(java.io.Serializable url)
Sets the list-style-image property. |
CSS |
setListStylePosition(ListStylePosition position)
Sets the list-style-position property. |
CSS |
setListStyleType(ListStyleType type)
Sets the list-style-type property. |
CSS |
setMargin(Unit margin)
Sets the margin property. |
CSS |
setMargin(Unit topBottom,
Unit rightLeft)
Sets the margin property. |
CSS |
setMargin(Unit top,
Unit rightLeft,
Unit bottom)
Sets the margin property. |
CSS |
setMargin(Unit top,
Unit right,
Unit bottom,
Unit left)
Sets the margin property. |
CSS |
setMarginBottom(Unit margin)
Sets the margin-bottom property. |
CSS |
setMarginLeft(Unit margin)
Sets the margin-left property. |
CSS |
setMarginRight(Unit margin)
Sets the margin-right property. |
CSS |
setMarginTop(Unit margin)
Sets the margin-top property. |
CSS |
setMaxHeight(Unit height)
Sets the max-height property. |
CSS |
setMaxWidth(Unit width)
Sets the max-width property. |
CSS |
setMinHeight(Unit height)
Sets the min-height property. |
CSS |
setMinWidth(Unit width)
Sets the min-width property. |
CSS |
setOutline(java.io.Serializable color,
OutlineStyle style,
OutlineWidth width)
Sets the outline property. |
CSS |
setOutline(java.io.Serializable color,
OutlineStyle style,
Unit width)
Sets the outline property. |
CSS |
setOutlineColor(java.io.Serializable color)
Sets the outline-color property. |
CSS |
setOutlineStyle(OutlineStyle style)
Sets the outline-style property. |
CSS |
setOutlineStyle(OutlineWidth width)
Sets the outline-width property. |
CSS |
setOutlineWidth(Unit width)
Sets the outline-width property. |
CSS |
setOverflow(Overflow overflow)
Sets the overflow property. |
CSS |
setPadding(Unit padding)
Sets the padding property. |
CSS |
setPadding(Unit topBottom,
Unit rightLeft)
Sets the padding property. |
CSS |
setPadding(Unit top,
Unit rightLeft,
Unit bottom)
Sets the padding property. |
CSS |
setPadding(Unit top,
Unit right,
Unit bottom,
Unit left)
Sets the padding property. |
CSS |
setPaddingBottom(Unit margin)
Sets the padding-bottom property. |
CSS |
setPaddingLeft(Unit margin)
Sets the padding-left property. |
CSS |
setPaddingRight(Unit margin)
Sets the padding-right property. |
CSS |
setPaddingTop(Unit margin)
Sets the padding-top property. |
CSS |
setPosition(Position position)
Sets the position property. |
CSS |
setRight(Unit right)
Sets the right property. |
CSS |
setTextAlign(TextAlign alignment)
Sets the text-align property. |
CSS |
setTextDecoration(TextDecoration decoration)
Sets the text-decoration property. |
CSS |
setTextIndent(Unit indent)
Sets the text-indent property. |
CSS |
setTextShadow(Unit hShadow,
Unit vShadow,
Unit blur,
java.io.Serializable color)
Sets the text-shadow property. |
CSS |
setTextTransform(TextTransform transform)
Sets the text-transform property. |
CSS |
setTop(Unit top)
Sets the top property. |
CSS |
setVerticalAlign(Unit alignment)
Sets the vertical-align property. |
CSS |
setVerticalAlign(VerticalAlign alignment)
Sets the vertical-align property. |
CSS |
setWhiteSpace(WhiteSpace space)
Sets the white-space property. |
CSS |
setWidth(Unit width)
Sets the width property. |
CSS |
setVisibility(Visibility visibility)
Sets the visibility property. |
CSS |
setWordSpacing(Unit spacing)
Sets the word-spacing property. |
CSS |
setZIndex(int zIndex)
Sets the z-index property. |
java.lang.String |
toString()
Returns the CSS properties on a single row, for example: background-color: color; text-align: right; color: blue; |
java.lang.String |
toStringBlock()
Returns the CSS properties in a structured block, for example: #4cafc7ba191a3557d9fe40b67957dbaa { background-color: color; } |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static AUTO AUTO
Constructor Detail |
---|
public CSS()
Method Detail |
---|
public java.lang.String getClassName()
public CSS copy()
public CSS clear(java.lang.String key)
key
- The CSS attribute name to be cleared
public java.util.Map<java.lang.String,java.io.Serializable> getSheet()
public void setAttributeSelector(java.io.Serializable attribute)
attribute
- The attribute.public void setAttributeSelector(java.io.Serializable attribute, java.io.Serializable value)
attribute
- The attribute.value
- The value.public static void export(java.lang.Class<?> stylesheetClass, java.io.File stylesheetFile, boolean includeComments) throws java.lang.Exception
stylesheetClass
- The class that contains the declared CSS fields.stylesheetFile
- The output file to be created and written to.includeComments
- True if comments should be written as well.
java.lang.Exception
- If any error occurspublic java.lang.String toStringBlock()
#4cafc7ba191a3557d9fe40b67957dbaa { background-color: color; }
public java.lang.String toString()
background-color: color; text-align: right; color: blue;
toString
in class java.lang.Object
public static CM CM(int length)
length
- The numeric length value.
public static EM EM(int length)
length
- The numeric length value.
public static EX EX(int length)
length
- The numeric length value.
public static IN IN(int length)
length
- The numeric length value.
public static MM MM(int length)
length
- The numeric length value.
public static PC PC(int length)
length
- The numeric length value.
public static PCT PCT(int length)
length
- The numeric length value.
public static PT PT(int length)
length
- The numeric length value.
public static PX PX(int length)
length
- The numeric length value.
public CSS addPseudoSelector(PseudoSelector pseudoSelector, CSS css)
pseudoSelector
- The pseudo selector the CSS should add.css
- The CSS associated with the pseudo selector.
public CSS setBackground(java.io.Serializable color, java.io.Serializable url, BackgroundRepeat repeat, BackgroundPosition position)
color
- The color value to be set.url
- The url value to be set.repeat
- The repeat value to be set.position
- The position value to be set.
public CSS setBackgroundColor(java.io.Serializable color)
color
- The color value to be set.
public CSS setBackgroundImage(java.io.Serializable url)
url
- The url value to be set.
public CSS setBackgroundRepeat(BackgroundRepeat repeat)
repeat
- The repeat value to be set.
public CSS setBackgroundAttachment(BackgroundAttachment attachment)
attachment
- The attachment value to be set.
public CSS setBackgroundPosition(BackgroundPosition position)
position
- The position value to be set.
public CSS setBackgroundPosition(Unit xpos, Unit ypos)
xpos
- The horizontal position.ypos
- The vertical position.
public CSS setColor(java.io.Serializable color)
color
- The color value to be set.
public CSS setTextAlign(TextAlign alignment)
alignment
- The alignment value to be set.
public CSS setDirection(TextDirection direction)
direction
- The direction value to be set.
public CSS setLetterSpacing(Unit spacing)
spacing
- The spacing value to be set.
public CSS setLineHeight(Unit height)
height
- The height value to be set.
public CSS setTextDecoration(TextDecoration decoration)
decoration
- The decoration value to be set.
public CSS setTextIndent(Unit indent)
indent
- The indent value to be set.
public CSS setTextShadow(Unit hShadow, Unit vShadow, Unit blur, java.io.Serializable color)
hShadow
- The horizontal shadow value to be set.vShadow
- The vertical shadow value to be set.blur
- The blue value to be set.color
- The color value to be set.
public CSS setTextTransform(TextTransform transform)
transform
- The transform value to be set.
public CSS setVerticalAlign(VerticalAlign alignment)
alignment
- The alignment value to be set.
public CSS setVerticalAlign(Unit alignment)
alignment
- The alignment value to be set.
public CSS setWhiteSpace(WhiteSpace space)
space
- The space value to be set.
public CSS setWordSpacing(Unit spacing)
spacing
- The spacing value to be set.
public CSS setFontFamily(java.io.Serializable family)
family
- The family value to be set.
public CSS setFontSize(Unit size)
size
- The family value to be set.
public CSS setFontStyle(FontStyle style)
style
- The style value to be set.
public CSS setFontVariant(FontVariant variant)
variant
- The variant value to be set.
public CSS setFontWeight(FontWeight weight)
weight
- The weight value to be set.
public CSS setListStyleType(ListStyleType type)
type
- The type value to be set.
public CSS setListStylePosition(ListStylePosition position)
position
- The position value to be set.
public CSS setListStyleImage(java.io.Serializable url)
url
- The url value to be set.
public CSS setBorder(Unit width, BorderStyle style, java.io.Serializable color)
width
- The position value to be set.style
- The style value to be set.color
- The color value to be set.
public CSS setBorder(BorderWidth width, BorderStyle style, java.io.Serializable color)
width
- The position value to be set.style
- The style value to be set.color
- The color value to be set.
public CSS setBorderWidth(Unit width)
width
- The width value to be set.
public CSS setBorderWidth(BorderWidth width)
width
- The width value to be set.
public CSS setBorderStyle(BorderStyle style)
style
- The style value to be set.
public CSS setBorderColor(java.io.Serializable color)
color
- The color value to be set.
public CSS setBorderTop(Unit width, BorderStyle style, java.io.Serializable color)
width
- The width value to be set.style
- The style value to be set.color
- The color value to be set.
public CSS setBorderTop(BorderWidth width, BorderStyle style, java.io.Serializable color)
width
- The width value to be set.style
- The style value to be set.color
- The color value to be set.
public CSS setBorderTopWidth(Unit width)
width
- The width value to be set.
public CSS setBorderTopWidth(BorderWidth width)
width
- The width value to be set.
public CSS setBorderTopStyle(BorderStyle style)
style
- The style value to be set.
public CSS setBorderTopColor(java.io.Serializable color)
color
- The color value to be set.
public CSS setBorderRight(Unit width, BorderStyle style, java.io.Serializable color)
width
- The width value to be set.style
- The style value to be set.color
- The color value to be set.
public CSS setBorderRight(BorderWidth width, BorderStyle style, java.io.Serializable color)
width
- The width value to be set.style
- The style value to be set.color
- The color value to be set.
public CSS setBorderRightWidth(Unit width)
width
- The width value to be set.
public CSS setBorderRightWidth(BorderWidth width)
width
- The width value to be set.
public CSS setBorderRightStyle(BorderStyle style)
style
- The style value to be set.
public CSS setBorderRightColor(java.io.Serializable color)
color
- The color value to be set.
public CSS setBorderLEft(Unit width, BorderStyle style, java.io.Serializable color)
width
- The width value to be set.style
- The style value to be set.color
- The color value to be set.
public CSS setBorderLeft(BorderWidth width, BorderStyle style, java.io.Serializable color)
width
- The width value to be set.style
- The style value to be set.color
- The color value to be set.
public CSS setBorderLeftWidth(Unit width)
width
- The width value to be set.
public CSS setBorderLeftWidth(BorderWidth width)
width
- The width value to be set.
public CSS setBorderLeftStyle(BorderStyle style)
style
- The style value to be set.
public CSS setBorderLeftColor(java.io.Serializable color)
color
- The color value to be set.
public CSS setBorderBottom(Unit width, BorderStyle style, java.io.Serializable color)
width
- The width value to be set.style
- The style value to be set.color
- The color value to be set.
public CSS setBorderBottom(BorderWidth width, BorderStyle style, java.io.Serializable color)
width
- The width value to be set.style
- The style value to be set.color
- The color value to be set.
public CSS setBorderBottomWidth(Unit width)
width
- The width value to be set.
public CSS setBorderBottomWidth(BorderWidth width)
width
- The width value to be set.
public CSS setBorderBottomStyle(BorderStyle style)
style
- The style value to be set.
public CSS setBorderBottomColor(java.io.Serializable color)
color
- The color value to be set.
public CSS setOutline(java.io.Serializable color, OutlineStyle style, Unit width)
color
- The color value to be set.style
- The style value to be set.width
- The width value to be set.
public CSS setOutline(java.io.Serializable color, OutlineStyle style, OutlineWidth width)
color
- The color value to be set.style
- The style value to be set.width
- The width value to be set.
public CSS setOutlineColor(java.io.Serializable color)
color
- The color value to be set.
public CSS setOutlineStyle(OutlineStyle style)
style
- The style value to be set.
public CSS setOutlineWidth(Unit width)
width
- The width value to be set.
public CSS setOutlineStyle(OutlineWidth width)
width
- The width value to be set.
public CSS setMargin(Unit margin)
margin
- The margin value to be set.
public CSS setMargin(Unit topBottom, Unit rightLeft)
topBottom
- The top and bottom values to be set.rightLeft
- The right and left values to be set.
public CSS setMargin(Unit top, Unit rightLeft, Unit bottom)
top
- The top value to be set.rightLeft
- The right and left values to be set.bottom
- The bottom value to be set.
public CSS setMargin(Unit top, Unit right, Unit bottom, Unit left)
top
- The top value to be set.right
- The right value to be set.bottom
- The bottom value to be set.left
- The left value to be set.
public CSS setMarginBottom(Unit margin)
margin
- The margin value to be set.
public CSS setMarginLeft(Unit margin)
margin
- The margin value to be set.
public CSS setMarginRight(Unit margin)
margin
- The margin value to be set.
public CSS setMarginTop(Unit margin)
margin
- The margin value to be set.
public CSS setPadding(Unit padding)
padding
- The padding value to be set.
public CSS setPadding(Unit topBottom, Unit rightLeft)
topBottom
- The top and bottom values to be set.rightLeft
- The right and left values to be set.
public CSS setPadding(Unit top, Unit rightLeft, Unit bottom)
top
- The top value to be set.rightLeft
- The right and left values to be set.bottom
- The bottom value to be set.
public CSS setPadding(Unit top, Unit right, Unit bottom, Unit left)
top
- The top value to be set.right
- The right value to be set.bottom
- The bottom value to be set.left
- The left value to be set.
public CSS setPaddingBottom(Unit margin)
margin
- The margin value to be set.
public CSS setPaddingLeft(Unit margin)
margin
- The margin value to be set.
public CSS setPaddingRight(Unit margin)
margin
- The margin value to be set.
public CSS setPaddingTop(Unit margin)
margin
- The margin value to be set.
public CSS setWidth(Unit width)
width
- The width value to be set.
public CSS setMinWidth(Unit width)
width
- The minimal width value to be set.
public CSS setMaxWidth(Unit width)
width
- The maximum width value to be set.
public CSS setHeight(Unit height)
height
- The height value to be set.
public CSS setMinHeight(Unit height)
height
- The height value to be set.
public CSS setMaxHeight(Unit height)
height
- The height value to be set.
public CSS setBottom(Unit bottom)
bottom
- The bottom value to be set.
public CSS setLeft(Unit left)
left
- The left value to be set.
public CSS setRight(Unit right)
right
- The right value to be set.
public CSS setTop(Unit top)
top
- The top value to be set.
public CSS setClipShape(Unit top, Unit right, Unit bottom, Unit left)
top
- The top value to be set.right
- The right value to be set.bottom
- The bottom value to be set.left
- The left value to be set.
public CSS setCursor(Cursor cursor)
cursor
- The cursor value to be set.
public CSS setCursor(java.io.Serializable url)
url
- The cursor url value to be set.
public CSS setOverflow(Overflow overflow)
overflow
- The overflow value to be set.
public CSS setPosition(Position position)
position
- The position value to be set.
public CSS setZIndex(int zIndex)
zIndex
- The z-index value to be set.
public CSS setClear(Clear clear)
clear
- The clear value to be set.
public CSS setFloat(Float f)
f
- The float value to be set.
public CSS setDisplay(Display display)
display
- The display value to be set.
public CSS setVisibility(Visibility visibility)
visibility
- The visibility to be set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |