|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object echopoint.stylesheet.StyleSheetIntrospector
The StyleSheetIntrospector
is used to introspect on a given
Component class and find out style attribute information on that class.
The StyleSheetIntrospector
looks for a Components's "style info"
support class that implements StyleInfo
In much the same way as the java.beans.Introspector looks for BeanInfo classes
the StyleSheetIntrospector
will first look for a class named
componentClassStyleInfo in the same package as component which implements
the echopoint.stylesheet.StyleInfo interface.
If it cant find that class, it will look for the first public static nested class inside the Component class that implements the echopoint.stylesheet.StyleInfo interface.
So for example if you component class is call "x.y.z.BlueBell" then the
StyleSheetIntrospector
will look for a class
called "x.y.z.BlueBellStyleInfo".
As in:
public class BlueBellStyleInfo implements echopoint.stylesheet.StyleInfo {
If it cannot that, it will look for a nested class within
"x.y.z.BlueBell" that is public, static and that
implements
...
}
echopoint.stylesheet.StyleInfo
.
As in:
public class BlueBell extends nextapp.echo.Component {
public static NestedStyleInfo implements echopoint.stylesheet.StyleInfo {
...
}
...
}
After the above processing is complete, the introspector will examine the interfaces that the class
implements. It will introspect inside all of its interfaces for public nested static
class that implements echopoint.stylesheet.StyleInfo
. The union of these
StyleInfo implementing classes will then be returned for that component class.
For example given :
The introspector will examine the Slip, Slop Slap interfaces to see if they
have nested public static StyleInfo classes. Any sub-interfaces that these
interfaces may themselves extended will also be searched. The union of these
StyleInfo objects will be returned as the StyleInfo for the original component
public class MyComponent extends Component implements Slip, Slop, Slap {
...
Constructor Summary | |
StyleSheetIntrospector()
|
Method Summary | |
static void |
addCachedStyleInfo(java.lang.Class clazz,
StyleInfo styleInfo)
Adds a StyleInfo object for the specified clazz into the global cache. |
static void |
flushCachedStyleInfo()
Flushes the global cache of StyleInfo information. |
static StyleInfo |
getStyleInfo(java.lang.Class searchClass)
Introspects a class and learns about the style attributes it supports. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StyleSheetIntrospector()
Method Detail |
public static void addCachedStyleInfo(java.lang.Class clazz, StyleInfo styleInfo)
clazz
- - the class that the StyleInfo appliesstyleInfo
- - the styleInfo in questionpublic static void flushCachedStyleInfo()
public static StyleInfo getStyleInfo(java.lang.Class searchClass) throws java.beans.IntrospectionException
searchClass
- - the component class that is to be introspected
java.beans.IntrospectionException
- - if an exception occurs during introspection.
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |