|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo.Style
public class Style
A representation of stylistic properties that may be applied to
Components.
| Constructor Summary | |
|---|---|
Style()
Creates a new style object. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getAttribute(java.lang.String key)
Returns the attribute associate with the given key as an object. |
java.util.Map |
getAttributesMap()
|
boolean |
getBooleanAttribute(java.lang.String key)
Returns the attribute associated with the given key as a primitive boolean value. |
int |
getIntegerAttribute(java.lang.String key)
Returns the attribute associated with the given key as a primitive integer value. |
java.lang.String |
getStringAttribute(java.lang.String key)
Returns the attribute associated with the given key as a string. |
boolean |
hasAttribute(java.lang.String key)
Returns true if the specified key is associated with an attribute. |
boolean |
isImmutable()
Returns true if this object has been made immutable. |
void |
setAttribute(java.lang.String key,
boolean value)
Sets an attribute. |
void |
setAttribute(java.lang.String key,
int value)
Sets an attribute. |
void |
setAttribute(java.lang.String key,
java.lang.Object value)
Sets an attribute. |
void |
setImmutable()
Sets this Style to be immutable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Style()
| Method Detail |
|---|
public java.lang.Object getAttribute(java.lang.String key)
key - The name of the attribute to return.
public boolean getBooleanAttribute(java.lang.String key)
Boolean object for
this method to execute successfully.
key - The name of the attribute to return.
NullPointerException - if the key is not present.
ClassCastException - if the attribute value is not a
Boolean object.public int getIntegerAttribute(java.lang.String key)
Integer object for
this method to execute successfully.
key - The name of the attribute to return.
NullPointerException - if the key is not present.
ClassCastException - if the attribute value is not an
Integer object.public java.lang.String getStringAttribute(java.lang.String key)
getAttribute() with the exception
that it casts the attribute to a String. If the key maps
to an object other than a String, a
ClassCastException will be thrown.
key - The name of the attribute to return.
ClassCastException - if the attribute value is not a
String.public boolean hasAttribute(java.lang.String key)
key - The key to analyze.
public boolean isImmutable()
public void setAttribute(java.lang.String key,
boolean value)
Boolean
object.
key - The key to be set.value - The new value of the key.
java.lang.IllegalStateException - if the style is immutable.
public void setAttribute(java.lang.String key,
int value)
Integer
object.
key - The key to be set.value - The new value of the key.
java.lang.IllegalStateException - if the style is immutable.
public void setAttribute(java.lang.String key,
java.lang.Object value)
key - The key to be set.value - The new value of the key.
java.lang.IllegalStateException - if the style is immutable.public void setImmutable()
IllegalStateExceptions.
public java.util.Map getAttributesMap()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||