|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.jwarp.flow.form.model.Component
A generic JWeb container object is a component that can contain other element components.
Components added to a container are tracked in a list. The order of the list will define the components' front-to-back stacking order within the container. If no index is specified when adding a component to a container, it will be added to the end of the list (and hence to the bottom of the stacking order).
Container| Field Summary | |
protected java.util.Vector |
componentListeners
|
protected java.lang.String |
description
|
protected boolean |
enabled
|
protected int |
id
|
protected java.util.Locale |
locale
|
protected java.lang.String |
name
|
protected IContainer |
parent
|
| Constructor Summary | |
protected |
Component(int id,
java.lang.String name,
IContainer parent)
|
protected |
Component(java.lang.String name,
IContainer parent)
|
| Method Summary | |
void |
addComponentListener(IComponentListener l)
Adds the specified container listener to receive container events from this container. |
java.lang.String |
getDescription()
Return the current description. |
java.lang.String |
getFullName()
Returns the name of this component container. |
int |
getID()
Return the model's id. |
java.util.Iterator |
getListeners(java.lang.Class listenerType)
Return an array of all the listeners that were added to the Container with addXXXListener(), where XXX is the name of the listenerType
argument. |
java.util.Locale |
getLocale()
Gets the locale of this component. |
java.lang.String |
getName()
Returns the name of this component container. |
IContainer |
getParent()
Get the parents component (if any) |
org.jdom.Element |
getXMLTree()
Get the actual XML result. |
void |
handleEvent(ComponentEvent e)
Take an event |
boolean |
isEnabled()
Returns true if the component is enabled. |
void |
removeComponentListener(IComponentListener l)
Removes the specified container listener so it no longer receives container events from this container. |
void |
setDescription(java.lang.String description)
Sets the description. |
void |
setEnabled(boolean val)
Enable/disable a component. |
void |
setFlowData(IFlowData data)
Set the flow data. |
void |
setLocale(java.util.Locale l)
Sets the locale of this component. |
void |
setName(java.lang.String name)
Sets the name of this component container. |
void |
setParent(IContainer parent)
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected boolean enabled
protected java.util.Vector componentListeners
protected java.util.Locale locale
protected int id
protected java.lang.String name
protected java.lang.String description
protected IContainer parent
| Constructor Detail |
protected Component(int id,
java.lang.String name,
IContainer parent)
protected Component(java.lang.String name,
IContainer parent)
| Method Detail |
public int getID()
IComponentgetID in interface IComponentorg.jwarp.flow.form.model.IComponentpublic IContainer getParent()
IComponentgetParent in interface IComponentorg.jwarp.flow.form.model.IComponentpublic void setParent(IContainer parent)
public java.util.Locale getLocale()
getLocale in interface IComponentIllegalComponentStateException - If the Component does not have its own locale and has not yet been added to
a containment hierarchy such that the locale can be determined from the containing parent.setLocale(java.util.Locale)public void setLocale(java.util.Locale l)
setLocale in interface IComponentl - The locale to become this component's locale.getLocale()public void setEnabled(boolean val)
setEnabled in interface IComponenttrue - to enable the component, false otherwisepublic boolean isEnabled()
isEnabled in interface IComponentpublic void addComponentListener(IComponentListener l)
addComponentListener in interface IComponentl - the container listenerpublic void removeComponentListener(IComponentListener l)
removeComponentListener in interface IComponentl - the container listenerpublic java.util.Iterator getListeners(java.lang.Class listenerType)
listenerType
argument. For example, to get all of the ContainerListener(s) for the
given Container c, one would write: ContainerListener[] cls = (ContainerListener[])(c.getListeners(ContainerListener.class))If no such listener list exists, then an empty array is returned.
getListeners in interface IComponentlistenerType - Type of listeners requestedpublic void handleEvent(ComponentEvent e)
handleEvent in interface IComponentorg.jwarp.flow.form.model.IComponentevent - The event to be handledpublic java.lang.String getName()
getName in interface IComponentpublic java.lang.String getFullName()
getFullName in interface IComponentpublic java.lang.String getDescription()
getDescription in interface IComponentpublic void setName(java.lang.String name)
name - The namepublic void setDescription(java.lang.String description)
The - descriptionpublic void setFlowData(IFlowData data)
IComponentsetFlowData in interface IComponentorg.jwarp.flow.form.model.IComponentdata - The flow dataFormInitException - If the component could be initialised
public org.jdom.Element getXMLTree()
throws FormInitException
IComponentgetXMLTree in interface IComponentorg.jwarp.flow.form.model.IComponentFormInitException - If the component is not initialised with any neded data
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||