Package com.groiss.gui
Class AbstractContainer
java.lang.Object
com.groiss.gui.AbstractComponent
com.groiss.gui.AbstractContainer
- All Implemented Interfaces:
Component
,Container
,Serializable
,Cloneable
- Direct Known Subclasses:
Button
,DivComponent
,FieldSet
,FormContainer
,Label
,TableContainer
,Tabs
,XHTMLPage
Abstract implementation of the container interface.
with some common code for subclasses
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionThe components of the container.Fields inherited from class com.groiss.gui.AbstractComponent
ACTIVE, browserMode, DEFAULT, ID, IE, INVISIBLE, isSensitive, label, NS, ON_BLUR, ON_CHANGE, ON_CLICK, ON_DBLCLICK, ON_FOCUS, ON_KEY_DOWN, ON_KEY_PRESS, ON_KEY_UP, ON_LOAD, ON_MOUSE_DOWN, ON_MOUSE_MOVE, ON_MOUSE_OUT, ON_MOUSE_UP, ON_RESET, ON_SELECT, ON_SUBMIT, ON_UNLOAD, parent, parentElem, READONLY, root, viewMode
Fields inherited from interface com.groiss.gui.Component
LABELLEDBY
-
Constructor Summary
ConstructorDescriptionConstructs a new container from an existing JDOM.AbstractContainer
(String name) AbstractContainer
(String name, String id, String className) Constructs a new empty container and creates an internal JDOM that consists of an empty root element.AbstractContainer
(Element root) Constructs a new container from an existing JDOM. -
Method Summary
Modifier and TypeMethodDescriptionAdd a component.<T extends Component>
TgetAll()
<T extends Component>
Tprotected void
getComponents
(Element element, Element par) Search the JDOM for components and collect them. /* @param element - the root-element of the JDOM (or any other element in recursive calls)getWithParent
(String id) void
Initialize the component with a jdom-tree.Remove a component.void
setBrowserMode
(short mode) sets the browserModesubstitute
(String id, Component c) Methods inherited from class com.groiss.gui.AbstractComponent
addClass, clone, create, getAttribute, getBrowserMode, getContent, getId, getLabel, getName, getParent, getParentElement, getRoot, getRootName, getStyle, getViewMode, init, init, removeAttribute, removeClass, setActionListener, setAttribute, setClass, setContent, setEncoding, setExpandEmptyElements, setId, setIndenting, setLabel, setName, setNewLines, setParent, setParentElement, setRootName, setStyle, setViewMode, show, show, toggleClass, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.groiss.gui.Component
addClass, clone, getAttribute, getBrowserMode, getContent, getId, getLabel, getName, getParent, getParentElement, getRoot, getStyle, getViewMode, init, removeAttribute, removeClass, setActionListener, setAttribute, setClass, setContent, setId, setLabel, setName, setParent, setParentElement, setStyle, setViewMode, show, show, toggleClass, toString
-
Field Details
-
components
The components of the container.
-
-
Constructor Details
-
AbstractContainer
public AbstractContainer()Constructs a new container from an existing JDOM. the root element must have an id attribute -
AbstractContainer
Constructs a new container from an existing JDOM. the root element must have an id attribute -
AbstractContainer
Constructs a new empty container and creates an internal JDOM that consists of an empty root element.- Parameters:
name
- - the name of the root elementid
- - the id of the containerclassName
- - the name of the container class
-
AbstractContainer
-
-
Method Details
-
add
Add a component. -
remove
Remove a component. -
substitute
- Specified by:
substitute
in interfaceContainer
- Parameters:
id
- - the id of the component which should be substitutedc
- - the new component- Returns:
- - the substituted component or null, if no component with the given id was found
-
getComponents
Search the JDOM for components and collect them. /* @param element - the root-element of the JDOM (or any other element in recursive calls) -
init
Description copied from class:AbstractComponent
Initialize the component with a jdom-tree.- Specified by:
init
in interfaceComponent
- Overrides:
init
in classAbstractComponent
- Parameters:
element
- - the root-element of the tree, must not be null
-
get
-
getWithParent
-
getByName
-
getAll
-
getAllDeep
- Specified by:
getAllDeep
in interfaceContainer
- Returns:
- - all components of the container recursively
-
getAll
-
setBrowserMode
public void setBrowserMode(short mode) Description copied from class:AbstractComponent
sets the browserMode- Specified by:
setBrowserMode
in interfaceComponent
- Overrides:
setBrowserMode
in classAbstractComponent
- Parameters:
mode
- - the new browserMode
-