|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Interface to SMaker implementations. After an XML file containing the definition of one or more panels has been generated (for example by SEditor), the integration into the application is done by an instance of the ISMaker interface. In a first step the XML file is loaded and all Swing components may be instantiated by ISMaker. Then, the ISMaker provides access to each individual component. The objects (targets, for example Swing components) in the tree are accessed either by their ID or by a path, this is an array of node ids representing a tree path. It may be incomplete, for example to find the node "x", ["root", "a", "b", "x"] the incomplete path ["a", "x"] may be specified. The path must be used instead of the ID, if the ID is not unique within the tree.
| Method Summary | |
void |
addSMakerListener(SMakerListener listener)
Advanced: Sets a lister to get a notification about completion of loading the file, initializing the nodes and creating the components. |
void |
create()
Makes the component tree starting at the root node ready for display. |
void |
create(java.lang.String id)
Makes the component subtree (starting at the node identified by id) ready for display. |
void |
create(java.lang.String[] path)
Makes the component subtree (starting at the node identified by path) ready for display. |
java.lang.Object |
getRootTarget()
returns the root target object. |
java.lang.Object |
getTarget(java.lang.String id)
searches for a target object (for example a Swing component) of the component tree. |
java.lang.Object |
getTarget(java.lang.String[] path)
searches for a target object (for example a Swing component) of the component tree. |
java.lang.Object |
getTarget(java.lang.String[] path,
java.lang.Class cls)
searches for a target object (for example a Swing component) of the component tree. |
java.lang.Object |
getTarget(java.lang.String id,
java.lang.Class cls)
searches for a target object (for example a Swing component) of the component tree. |
void |
getTargets(java.util.Hashtable h,
java.lang.String[] path,
java.lang.Class cls)
Searches targets by their class. |
ISMaker |
newSMaker(java.lang.String id)
Factory method to construct a new SMaker object that represents a subtree of the original SMaker. |
void |
removeSMakerListener(SMakerListener listener)
Advanced: Removes a lister that received SMaker notifications. |
void |
setExceptionHandler(IExceptionHandler exh)
Sets an exception handler. |
void |
setTarget(java.lang.String[] path,
java.lang.Object target)
Sets or replaces a target object (for example a Swing component) of the component tree. |
void |
setTarget(java.lang.String id,
java.lang.Object target)
Sets or replaces a target object (for example a Swing component) of the component tree. |
| Method Detail |
public ISMaker newSMaker(java.lang.String id)
id - identifier of a node. The new SMaker represents a subtree starting at this node.public java.lang.Object getTarget(java.lang.String id)
id - identifier of the node.public java.lang.Object getTarget(java.lang.String[] path)
path - the path to a node.
public java.lang.Object getTarget(java.lang.String id,
java.lang.Class cls)
id - identifier of the node.cls - target must be of this class or a subclasspublic java.lang.Object getRootTarget()
public java.lang.Object getTarget(java.lang.String[] path,
java.lang.Class cls)
path - array of node ids representing a tree pathcls - target must be of this class or a subclass
public void getTargets(java.util.Hashtable h,
java.lang.String[] path,
java.lang.Class cls)
h - is a hashtable for the search resultspath - search starts at the node identified by path. If path==null,
the search starts at the root.cls - target class must be equal or be a subclass
public void setTarget(java.lang.String id,
java.lang.Object target)
id - identifier of the node.
public void setTarget(java.lang.String[] path,
java.lang.Object target)
path - the path to the node.public void create()
public void create(java.lang.String id)
id - identifier of the root node of the subtreepublic void create(java.lang.String[] path)
path - array of node ids to the root node of the subtree.public void setExceptionHandler(IExceptionHandler exh)
exh - exception handler implementationpublic void addSMakerListener(SMakerListener listener)
listener - the listener gets a notificationpublic void removeSMakerListener(SMakerListener listener)
listener - the listener that will be removed
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||