|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.taursys.xml.Component com.taursys.xml.Container
This class is a foundation container for MapperXML components. This class
defines all required properties and methods for a container and provides
basic implementation for many of them. The Container
provides
3 primary functions:
Component
management - provides methods to add, remove and
retrieve Components
.
DocumentAdapter
for the
Components
to render themselves to. This implementation simply
looks to its parent Container
to obtain the
DocumentAdapter
. Bottom level or master Containers
should override this method and provide access to a
DocumentAdapter
.
Dispatchers
for the various event types
to the Components
. This is done through the
getDispatcher
method which takes the fully qualified class
name of the Event. Components
need to access these
Dispatchers
whenever they are added or removed from this
Container
so they can add or remove themselves
from the various event notification lists. This provides an internal
HashMap
of Dispatchers
which are keyed by
their fully qualified event name. Implementations can maintain their own
Dispatchers
using the add/removeDispatcher
methods.
Constructor Summary | |
Container()
Constructs a new container |
Method Summary | |
void |
add(Component c)
Add a component to this container. |
void |
addDispatcher(java.lang.String eventType,
Dispatcher d)
Add the given Dispatcher for the given eventType
to this Container . |
boolean |
contains(Component c)
Recursively searches for given Component and returns true if found. |
DocumentComponent |
get(java.lang.String id)
Recursively searches for a DocumentComponent with the given ID. |
Component[] |
getComponents()
Returns an array of all the components for this container. |
Dispatcher |
getDispatcher(java.lang.String eventType)
Get the Dispatcher for the given eventType . |
protected java.util.HashMap |
getDispatchers()
Get the dispatchers that belong to this container |
DocumentAdapter |
getDocumentAdapter()
Returns the DocumentAdapter from the parent else null if no parent. |
Dispatcher |
getInputDispatcher()
Deprecated. use getDispatcher(String eventType) instead. This will be removed in the future. |
Dispatcher |
getParameterDispatcher()
Deprecated. use getDispatcher(String eventType) instead. This will be removed in the future. |
RecycleDispatcher |
getRecycleDispatcher()
Deprecated. use getDispatcher(String eventType) instead. This will be removed in the future. |
RenderDispatcher |
getRenderDispatcher()
Deprecated. use getDispatcher(String eventType) instead. This will be removed in the future. |
Dispatcher |
getTriggerDispatcher()
Deprecated. use getDispatcher(String eventType) instead. This will be removed in the future. |
void |
remove(Component c)
Removes the given component from this container and sets its parent to null. |
void |
removeDispatcher(java.lang.String eventType)
Remove the Dispatcher for the given eventType
from this Container . |
void |
setComponents(Component[] newComponents)
Sets of all the components for this container. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Container()
Method Detail |
public void add(Component c)
public void remove(Component c)
public boolean contains(Component c)
c
- Component to look for
public DocumentComponent get(java.lang.String id)
id
- the ID to search for
public Component[] getComponents()
public void setComponents(Component[] newComponents)
newComponents
- array of new Components for this Containerpublic DocumentAdapter getDocumentAdapter()
public void addDispatcher(java.lang.String eventType, Dispatcher d)
Dispatcher
for the given eventType
to this Container
.
eventType
- fully qualified class name of the Eventd
- the Dispatcher
for this event typepublic void removeDispatcher(java.lang.String eventType)
Dispatcher
for the given eventType
from this Container
.
eventType
- fully qualified class name of the Eventpublic Dispatcher getDispatcher(java.lang.String eventType)
Dispatcher
for the given eventType
.
The eventType
is the fully qualified class name of the Event
which that Dispatcher
dispatches. This method first looks
for the Dispatcher
in its set of Dispatchers
.
If not found, it invokes its parent Container
's
getDispatcher
. If this Container
's has no
parent, it returns null.
eventType
- fully qualified class name of the Event
Dispatcher
or null if not found.protected java.util.HashMap getDispatchers()
public Dispatcher getParameterDispatcher()
public Dispatcher getInputDispatcher()
public Dispatcher getTriggerDispatcher()
public RenderDispatcher getRenderDispatcher()
public RecycleDispatcher getRecycleDispatcher()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |