|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.groiss.gui.AbstractComponent com.groiss.gui.AbstractContainer
public abstract class AbstractContainer
abstract implementation of the container interface with some common code for subclasses
Field Summary | |
---|---|
protected java.util.Map<java.lang.String,Component> |
components
the components of the container |
Fields inherited from class com.groiss.gui.AbstractComponent |
---|
actions, 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, outputter, parent, parentElem, READONLY, root, viewMode |
Constructor Summary | |
---|---|
AbstractContainer()
constructs a new container from an existing JDOM the root element must have an id attribute |
|
AbstractContainer(org.jdom.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 |
Method Summary | ||
---|---|---|
Component |
add(Component c)
|
|
|
get(java.lang.String id)
|
|
java.util.Collection<Component> |
getAll()
|
|
java.util.Collection<Component> |
getAll(java.lang.String name)
|
|
java.util.Collection<Component> |
getAllDeep()
|
|
|
getByName(java.lang.String name)
|
|
protected void |
getComponents(org.jdom.Element element,
org.jdom.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(org.jdom.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)
|
Methods inherited from class com.groiss.gui.AbstractComponent |
---|
clone, create, getActionListener, 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 |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.groiss.gui.Component |
---|
clone, getActionListener, 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 |
Field Detail |
---|
protected java.util.Map<java.lang.String,Component> components
Constructor Detail |
---|
public AbstractContainer()
public AbstractContainer(org.jdom.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)
Method Detail |
---|
public Component add(Component c)
add
in interface Container
c
- - the component to add
public Component remove(java.lang.String id)
remove
in interface Container
id
- - the id of the component
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 component
protected void getComponents(org.jdom.Element element, org.jdom.Element par)
public void init(org.jdom.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)
get
in interface Container
id
- - the id of the component
protected Pair<Component,Container> getWithParent(java.lang.String id)
public <T extends Component> T getByName(java.lang.String name)
getByName
in interface Container
name
- - the name of the component
public java.util.Collection<Component> getAll()
getAll
in interface Container
public java.util.Collection<Component> getAllDeep()
getAllDeep
in interface Container
public java.util.Collection<Component> getAll(java.lang.String name)
getAll
in interface Container
public void setBrowserMode(short mode)
AbstractComponent
setBrowserMode
in interface Component
setBrowserMode
in class AbstractComponent
mode
- - the new browserMode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |