vnas.sm
Class SMaker

java.lang.Object
  |
  +--vnas.sm.SMaker
Direct Known Subclasses:
JavaSMaker, XMLSMaker

public class SMaker
extends java.lang.Object
implements ISMaker

Basic implementation of the ISMaker interface.

See Also:
ISMaker

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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newSMaker

public ISMaker newSMaker(java.lang.String id)
Description copied from interface: ISMaker
Factory method to construct a new SMaker object that represents a subtree of the original SMaker. The child SMakers are useful if the parent SMaker contains more than one layout (for example the layout for sever dialog boxes and internal frames and the child SMakers contain only one of these layouts. Don't call the create() method of the parent but invoke create() of the childs as soon as needed.
Specified by:
newSMaker in interface ISMaker
See Also:
ISMaker.newSMaker(String)

setTarget

public void setTarget(java.lang.String id,
                      java.lang.Object target)
Description copied from interface: ISMaker
Sets or replaces a target object (for example a Swing component) of the component tree. Should be called before calling the create() method.
Specified by:
setTarget in interface ISMaker
See Also:
ISMaker.setTarget(String id, Object target)

setTarget

public void setTarget(java.lang.String[] path,
                      java.lang.Object target)
Description copied from interface: ISMaker
Sets or replaces a target object (for example a Swing component) of the component tree. Should be called before calling the create() method.
Specified by:
setTarget in interface ISMaker
See Also:
ISMaker.setTarget(String[] path, Object target)

getTarget

public java.lang.Object getTarget(java.lang.String id)
Description copied from interface: ISMaker
searches for a target object (for example a Swing component) of the component tree.
Specified by:
getTarget in interface ISMaker
See Also:
ISMaker.getTarget(String id)

getTarget

public java.lang.Object getTarget(java.lang.String[] path)
Description copied from interface: ISMaker
searches for a target object (for example a Swing component) of the component tree.
Specified by:
getTarget in interface ISMaker
See Also:
ISMaker.getTarget(String[] path)

getTarget

public java.lang.Object getTarget(java.lang.String id,
                                  java.lang.Class cls)
Description copied from interface: ISMaker
searches for a target object (for example a Swing component) of the component tree.
Specified by:
getTarget in interface ISMaker
See Also:
ISMaker.getTarget(String id, Class cls)

getTarget

public java.lang.Object getTarget(java.lang.String[] path,
                                  java.lang.Class cls)
Description copied from interface: ISMaker
searches for a target object (for example a Swing component) of the component tree.
Specified by:
getTarget in interface ISMaker
See Also:
ISMaker.getTarget(String[] path, Class cls)

getRootTarget

public java.lang.Object getRootTarget()
Description copied from interface: ISMaker
returns the root target object.
Specified by:
getRootTarget in interface ISMaker
See Also:
ISMaker.getRootTarget()

getTargets

public void getTargets(java.util.Hashtable h,
                       java.lang.String[] path,
                       java.lang.Class cls)
Description copied from interface: ISMaker
Searches targets by their class. The search result is returned in a hashtable, where the key is the node ID and the value is the target object.
Specified by:
getTargets in interface ISMaker
See Also:
ISMaker.getTargets(Hashtable h, String[] path, Class cls)

create

public void create()
Description copied from interface: ISMaker
Makes the component tree starting at the root node ready for display. Calls constructors, adds child components to their parents, applies layout managers etc. One of the create() methods must be called before retrieving references to GUI components.
Specified by:
create in interface ISMaker
See Also:
ISMaker.create()

create

public void create(java.lang.String id)
Description copied from interface: ISMaker
Makes the component subtree (starting at the node identified by id) ready for display. Calls constructors, adds child components to their parents, applies layout managers etc. One of the create() methods must be called before retrieving references to GUI components.
Specified by:
create in interface ISMaker
See Also:
ISMaker.create(String id)

create

public void create(java.lang.String[] path)
Description copied from interface: ISMaker
Makes the component subtree (starting at the node identified by path) ready for display. Calls constructors, adds child components to their parents, applies layout managers etc. One of the create() methods must be called before retrieving references to GUI components.
Specified by:
create in interface ISMaker
See Also:
ISMaker.create(String[] path)

setExceptionHandler

public void setExceptionHandler(IExceptionHandler exh)
Description copied from interface: ISMaker
Sets an exception handler. If an exception is catched, the handleException() method of the handler will be called.
Specified by:
setExceptionHandler in interface ISMaker
See Also:
ISMaker.setExceptionHandler(IExceptionHandler exh)

addSMakerListener

public void addSMakerListener(SMakerListener listener)
Description copied from interface: ISMaker
Advanced: Sets a lister to get a notification about completion of loading the file, initializing the nodes and creating the components.
Specified by:
addSMakerListener in interface ISMaker
See Also:
ISMaker.addSMakerListener(SMakerListener listener)

removeSMakerListener

public void removeSMakerListener(SMakerListener listener)
Description copied from interface: ISMaker
Advanced: Removes a lister that received SMaker notifications.
Specified by:
removeSMakerListener in interface ISMaker
See Also:
ISMaker.removeSMakerListener(SMakerListener listener)