|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo.Style echopoint.stylesheet.SmartStyle
The SmartStyle
class is a Style that knows which
style attributes have been accessed when the applyStyle() method
is called and can then use reflection to set any unaccessed style
attributes into a Component.
All contained style attributes are marked as NOT accessed until such time as they are accessed via one of the getter methods. This is most likely done in the Component.applyStyle() method.
Any unaccessed style attributes can then be applied to the Component via bean introspection and reflection. This will look to see that the Component has a setter method of the right name (the style attribute name) and right type (the style attribute value type). If so then a reflection will will be performed to set the style attribute.
Constructor Summary | |
SmartStyle()
Creates a new SmartStyle object. |
Method Summary | |
java.lang.Object |
getAttribute(java.lang.String key)
|
boolean |
getBooleanAttribute(java.lang.String key)
|
int |
getIntegerAttribute(java.lang.String key)
|
java.lang.String |
getStringAttribute(java.lang.String key)
|
java.lang.String[] |
getUnAccessedAttributes()
Returns an array of all style attribute names that have not ben accessed. |
void |
setAttribute(java.lang.String key,
boolean value)
|
void |
setAttribute(java.lang.String key,
int value)
|
void |
setAttribute(java.lang.String key,
java.lang.Object value)
|
void |
setUnAccessedAttributes(nextapp.echo.Component c)
Will perform "relection set" on a Component for any attributes that have not be accessed for this style. |
Methods inherited from class nextapp.echo.Style |
hasAttribute, isImmutable, setImmutable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SmartStyle()
Method Detail |
public java.lang.Object getAttribute(java.lang.String key)
Style.getAttribute(java.lang.String)
public boolean getBooleanAttribute(java.lang.String key)
Style.getBooleanAttribute(java.lang.String)
public int getIntegerAttribute(java.lang.String key)
Style.getIntegerAttribute(java.lang.String)
public java.lang.String getStringAttribute(java.lang.String key)
Style.getStringAttribute(java.lang.String)
public void setAttribute(java.lang.String key, boolean value)
Style.setAttribute(java.lang.String, boolean)
public void setAttribute(java.lang.String key, int value)
Style.setAttribute(java.lang.String, int)
public void setAttribute(java.lang.String key, java.lang.Object value)
Style.setAttribute(java.lang.String, java.lang.Object)
public java.lang.String[] getUnAccessedAttributes()
public void setUnAccessedAttributes(nextapp.echo.Component c)
Once this call completes, all style attributes that have been succesffuly set will be marked as accessed.
c
- - the Component to perform reflection on
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |