public abstract class AbstractContainer extends AbstractComponent implements Container
Modifier and Type | Field and Description |
---|---|
protected Map<String,Component> |
components
The components of the container.
|
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
LABELLEDBY
Constructor and Description |
---|
AbstractContainer()
Constructs a new container from an existing JDOM.
|
AbstractContainer(Element root)
Constructs 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.
|
Modifier and Type | Method and Description |
---|---|
Component |
add(Component c)
Add a component.
|
<T extends Component> |
get(String id) |
Collection<Component> |
getAll() |
Collection<Component> |
getAll(String name) |
Collection<Component> |
getAllDeep() |
<T extends Component> |
getByName(String name) |
protected 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)
|
protected Pair<Component,Container> |
getWithParent(String id) |
void |
init(Element element)
Initialize the component with a jdom-tree.
|
Component |
remove(String id)
Remove a component.
|
void |
setBrowserMode(short mode)
sets the browserMode
|
Component |
substitute(String id,
Component c) |
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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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
public AbstractContainer()
public AbstractContainer(Element root)
public AbstractContainer(String name, String id, String className)
name
- - the name of the root elementid
- - the id of the containerclassName
- - the name of the container classpublic AbstractContainer(String name)
public Component substitute(String id, Component c)
substitute
in interface Container
id
- - the id of the component which should be substitutedc
- - the new componentprotected void getComponents(Element element, Element par)
public void init(Element element)
AbstractComponent
init
in interface Component
init
in class AbstractComponent
element
- - the root-element of the tree, must not be nullpublic Collection<Component> getAll()
public Collection<Component> getAllDeep()
getAllDeep
in interface Container
public Collection<Component> getAll(String name)
public void setBrowserMode(short mode)
AbstractComponent
setBrowserMode
in interface Component
setBrowserMode
in class AbstractComponent
mode
- - the new browserMode@enterprise 10.0.38589 Copyright © 2001-2024 Groiss Informatics GmbH. All Rights Reserved.