|
|||||||||
| Home >> All >> echopoint >> [ stylesheet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
echopoint.stylesheet
Class StyleSheetIntrospector

java.lang.Objectechopoint.stylesheet.StyleSheetIntrospector
- public class StyleSheetIntrospector
- extends java.lang.Object
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 {
...
| Field Summary | |
private static java.util.Map |
styleInfoCache
this hold our global cache of Class --> StyleInfo |
| 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. |
private static StyleInfo |
combineInterfaceStyleInfo(java.lang.Class searchClass,
StyleInfo classStyleInfo)
Called to get an interface StyleInfo. |
private static StyleInfo |
findClassStyleInfo(java.lang.Class searchClass)
Does the multistage lookup of StyleInfo data. |
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. |
private static StyleInfo |
isNestedStyleInfo(java.lang.Class searchClass)
Test a given class as to whether it implements StyleInfo and whether its public and static. |
private static StyleInfo |
lookForNestedStyleInifo(java.lang.Class searchClass)
Looks inside a class for all the nested StyleInfo classes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
styleInfoCache
private static java.util.Map styleInfoCache
- this hold our global cache of Class --> StyleInfo
| Constructor Detail |
StyleSheetIntrospector
public StyleSheetIntrospector()
| Method Detail |
addCachedStyleInfo
public static void addCachedStyleInfo(java.lang.Class clazz, StyleInfo styleInfo)
- Adds a StyleInfo object for the specified clazz into the global cache. Once
added it can be quickly gathered again. In general you will not need
to call this function because it all results of the getStyleInfo()
method are always globally cached.
flushCachedStyleInfo
public static void flushCachedStyleInfo()
- Flushes the global cache of StyleInfo information.
getStyleInfo
public static StyleInfo getStyleInfo(java.lang.Class searchClass) throws java.beans.IntrospectionException
- Introspects a class and learns about the style attributes it supports.
findClassStyleInfo
private static StyleInfo findClassStyleInfo(java.lang.Class searchClass)
- Does the multistage lookup of StyleInfo data.
combineInterfaceStyleInfo
private static StyleInfo combineInterfaceStyleInfo(java.lang.Class searchClass, StyleInfo classStyleInfo)
- Called to get an interface StyleInfo. If the there are
no StyleInfo classes in the interfaces then the original
classStyleInfo object is return.
lookForNestedStyleInifo
private static StyleInfo lookForNestedStyleInifo(java.lang.Class searchClass)
- Looks inside a class for all the nested StyleInfo classes
isNestedStyleInfo
private static StyleInfo isNestedStyleInfo(java.lang.Class searchClass)
- Test a given class as to whether it implements StyleInfo
and whether its public and static.
|
|||||||||
| Home >> All >> echopoint >> [ stylesheet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
echopoint.stylesheet.StyleSheetIntrospector