|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.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 Map<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(Element root)
constructs a new container from an existing JDOM the root element must have an id attribute |
|
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 |
|
| Method Summary | ||
|---|---|---|
Component |
add(Component c)
|
|
|
get(String id)
|
|
Collection<Component> |
getAll()
|
|
Collection<Component> |
getAll(String name)
|
|
Collection<Component> |
getAllDeep()
|
|
|
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)
|
|
void |
setBrowserMode(short mode)
sets the browserMode |
|
Component |
substitute(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 Map<String,Component> components
| Constructor Detail |
|---|
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)
| Method Detail |
|---|
public Component add(Component c)
add in interface Containerc - - the component to add
public Component remove(String id)
remove in interface Containerid - - the id of the component
public Component substitute(String id,
Component c)
substitute in interface Containerid - - the id of the component which should be substitutedc - - the new component
protected void getComponents(Element element,
Element par)
public void init(Element element)
AbstractComponent
init in interface Componentinit in class AbstractComponentelement - - the root-element of the tree, must not be nullpublic <T extends Component> T get(String id)
get in interface Containerid - - the id of the component
protected Pair<Component,Container> getWithParent(String id)
public <T extends Component> T getByName(String name)
getByName in interface Containername - - the name of the component
public Collection<Component> getAll()
getAll in interface Containerpublic Collection<Component> getAllDeep()
getAllDeep in interface Containerpublic Collection<Component> getAll(String name)
getAll in interface Containerpublic void setBrowserMode(short mode)
AbstractComponent
setBrowserMode in interface ComponentsetBrowserMode in class AbstractComponentmode - - the new browserMode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||