|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echoservlet.html.Style
public class Style
A representation of a CSS style that may be associated with multiple types of elements.
| Field Summary | |
|---|---|
static java.lang.String |
PERCENT_UNITS
A unit suffix for percent units. |
static java.lang.String |
PIXEL_UNITS
A unit suffix for pixel units. |
static java.lang.String |
POINT_UNITS
A unit suffix for point units. |
| Fields inherited from interface nextapp.echoservlet.html.Renderable |
|---|
INDENT_STRING |
| Constructor Summary | |
|---|---|
Style(java.lang.String id)
Creates a new style with the given identifier. |
|
| Method Summary | |
|---|---|
void |
addAttribute(java.lang.String name,
int value)
Adds an integer attribute (with no units) to this style. |
void |
addAttribute(java.lang.String name,
int value,
java.lang.String units)
Adds an integer attribute with the specified units to this style. |
void |
addAttribute(java.lang.String name,
java.lang.String value)
Adds a text attribute to the style. |
void |
addElementType(java.lang.String elementType)
Adds an element type to the style. |
void |
addPseudoAttribute(java.lang.String pseudonym,
java.lang.String name,
int value)
Adds a pseudoclass integer attribute to the style. |
void |
addPseudoAttribute(java.lang.String pseudonym,
java.lang.String name,
java.lang.String value)
Adds a pseudoclass attribute to the style. |
java.lang.String |
getId()
|
void |
render(java.io.PrintWriter pw,
int depth,
boolean parentWhitespaceRelevant)
Renders this style to the given PrintWriter. |
void |
renderAsStyleAttribute(java.io.PrintWriter pw)
|
void |
setId(java.lang.String id)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PERCENT_UNITS
public static final java.lang.String PIXEL_UNITS
public static final java.lang.String POINT_UNITS
| Constructor Detail |
|---|
public Style(java.lang.String id)
id - The identifier of this style.| Method Detail |
|---|
public void addElementType(java.lang.String elementType)
elementType - The element to be added, e.g.
"a", "input", or "td".
public void addAttribute(java.lang.String name,
java.lang.String value)
name - The name of the attribute.value - The value of the attribute.
public void addAttribute(java.lang.String name,
int value)
name - The name of the attribute.value - The value of the attribute.
public void addAttribute(java.lang.String name,
int value,
java.lang.String units)
name - The name of the attribute.value - The value of the attribute.units - The units of the value.
public void addPseudoAttribute(java.lang.String pseudonym,
java.lang.String name,
java.lang.String value)
pseudonym - The name of the pseudoclass.name - The name of the attribute.value - The value of the attribute.
public void addPseudoAttribute(java.lang.String pseudonym,
java.lang.String name,
int value)
pseudonym - The name of the pseudoclass.name - The name of the attribute.value - The value of the attribute.
public void render(java.io.PrintWriter pw,
int depth,
boolean parentWhitespaceRelevant)
PrintWriter.
render in interface Renderablepw - The PrintWriter to render to.depth - The indentation depth that should be applied to the element
being rendered.parentWhitespaceRelevant - A flag that indicates whether the
containing element is sensitive to white space.Renderable.render(PrintWriter, int, boolean)public void renderAsStyleAttribute(java.io.PrintWriter pw)
public java.lang.String getId()
public void setId(java.lang.String id)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||