public abstract class AbstractContainer extends AbstractComponent implements Container
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.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
Constructor and Description |
---|
AbstractContainer()
constructs a new container from an existing JDOM
the root element must have an id attribute
|
AbstractContainer(Element root)
constructs a new container from an existing JDOM
the root element must have an id attribute
|
AbstractContainer(java.lang.String name) |
AbstractContainer(java.lang.String name,
java.lang.String id,
java.lang.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) |
<T extends Component> |
get(java.lang.String id) |
java.util.Collection<Component> |
getAll() |
java.util.Collection<Component> |
getAll(java.lang.String name) |
java.util.Collection<Component> |
getAllDeep() |
<T extends Component> |
getByName(java.lang.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(java.lang.String id) |
void |
init(Element element)
Initialize the component with a jdom-tree.
|
Component |
remove(java.lang.String id) |
void |
setBrowserMode(short mode)
sets the browserMode
|
Component |
substitute(java.lang.String id,
Component c) |
clone, create, getAttribute, getBrowserMode, getContent, getId, getLabel, getName, getParent, getParentElement, getRoot, getRootName, getStyle, getViewMode, init, init, removeAttribute, setActionListener, setAttribute, setContent, setEncoding, setExpandEmptyElements, setId, setIndenting, setLabel, setName, setNewLines, setParent, setParentElement, setRootName, setStyle, setViewMode, show, show, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clone, getAttribute, getBrowserMode, getContent, getId, getLabel, getName, getParent, getParentElement, getRoot, getStyle, getViewMode, init, removeAttribute, setActionListener, setAttribute, setContent, setId, setLabel, setName, setParent, setParentElement, setStyle, setViewMode, show, show, toString
protected java.util.Map<java.lang.String,Component> components
public AbstractContainer()
public AbstractContainer(Element root)
public AbstractContainer(java.lang.String name, java.lang.String id, java.lang.String className)
name
- - the name of the root elementid
- - the id of the containerclassName
- - the name of the container classpublic AbstractContainer(java.lang.String name)
public Component remove(java.lang.String id)
public Component substitute(java.lang.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 <T extends Component> T get(java.lang.String id)
public <T extends Component> T getByName(java.lang.String name)
public java.util.Collection<Component> getAll()
public java.util.Collection<Component> getAllDeep()
getAllDeep
in interface Container
public java.util.Collection<Component> getAll(java.lang.String name)
public void setBrowserMode(short mode)
AbstractComponent
setBrowserMode
in interface Component
setBrowserMode
in class AbstractComponent
mode
- - the new browserMode@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.