|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.groiss.gui.AbstractComponent
public abstract class AbstractComponent
abstract implementation of the component interface with some common code for subclasses
| Field Summary | |
|---|---|
protected java.util.Hashtable |
actions
|
static short |
ACTIVE
some view modes |
protected short |
browserMode
for which browser should the component be rendered |
static short |
DEFAULT
some browser modes |
static java.lang.String |
ID
the id of attribute of a component |
static short |
IE
|
static short |
INVISIBLE
|
protected boolean |
isSensitive
shows if the component can listen to events |
protected Label |
label
the reference to the component, which is the label of this component |
static short |
NS
|
static java.lang.String |
ON_BLUR
|
static java.lang.String |
ON_CLICK
some defined common events |
static java.lang.String |
ON_DBLCLICK
|
static java.lang.String |
ON_FOCUS
some defined events for components that can get the focus |
static java.lang.String |
ON_KEY_DOWN
|
static java.lang.String |
ON_KEY_PRESS
|
static java.lang.String |
ON_KEY_UP
|
static java.lang.String |
ON_LOAD
some defined events specially for the htmlpage |
static java.lang.String |
ON_MOUSE_DOWN
|
static java.lang.String |
ON_MOUSE_MOVE
|
static java.lang.String |
ON_MOUSE_OUT
|
static java.lang.String |
ON_MOUSE_UP
|
static java.lang.String |
ON_RESET
|
static java.lang.String |
ON_SELECT
some defined events specially for textareas and inputfields |
static java.lang.String |
ON_SUBMIT
some defined events specially for the formcontainer |
static java.lang.String |
ON_UNLOAD
|
protected org.jdom.Element |
outputRoot
|
protected static HTMLOutputter |
outputter
the renderer for the JDOM-Tree |
protected Container |
parent
|
protected org.jdom.Element |
parentElem
the parent element of the components root |
static short |
READONLY
|
protected org.jdom.Element |
root
the root element of the internal JDOM-Tree of the component |
protected short |
viewMode
how should the component be rendered |
| Constructor Summary | |
|---|---|
AbstractComponent()
|
|
AbstractComponent(org.jdom.Element root)
constructs a new component from an existing JDOM the root element must have an id attribute |
|
AbstractComponent(java.lang.String name)
|
|
AbstractComponent(java.lang.String name,
java.lang.String id,
java.lang.String className)
constructs a new empty component and creates an internal JDOM that consists of an empty root element |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
returns a copy of the Component object |
java.lang.String |
getActionListener(java.lang.String event)
returs the value of an attribute |
java.lang.String |
getAttribute(java.lang.String name)
returs the value of an attribute |
short |
getBrowserMode()
|
abstract java.lang.Object |
getContent()
|
java.lang.String |
getId()
|
Label |
getLabel()
|
java.lang.String |
getName()
|
Container |
getParent()
|
org.jdom.Element |
getParentElement()
|
org.jdom.Element |
getRoot()
returns the root element of the internal JDOM |
java.lang.String |
getRootName()
|
java.lang.String |
getStyle()
|
short |
getViewMode()
|
void |
init(org.jdom.Element element)
Initialize the component with a jdom-tree. |
void |
init(java.lang.String name)
|
void |
init(java.lang.String name,
java.lang.String id,
java.lang.String className)
initialize the component with an new jdom-tree |
boolean |
removeAttribute(java.lang.String name)
Remove the attribute from the component. |
void |
setActionListener(java.lang.String event,
java.lang.String action)
Sets the action to an event. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
sets the attribute to the component |
void |
setBrowserMode(short mode)
sets the browserMode |
abstract void |
setContent(java.lang.Object o)
Sets the content of the component |
void |
setEncoding(boolean val)
|
void |
setExpandEmptyElements(boolean val)
|
void |
setId(java.lang.String id)
set the unique identifier to a given value. |
void |
setIndenting(boolean val)
|
void |
setLabel(Label c)
sets the label component |
void |
setName(java.lang.String name)
set the name to a given value. |
void |
setNewLines(boolean val)
|
void |
setParent(Container parent)
sets the parent container |
void |
setParentElement(org.jdom.Element parent)
sets the parent element of the components root |
void |
setRootName(java.lang.String name)
set the name of the root element to a given value. |
void |
setStyle(java.lang.String style)
Set the style |
void |
setViewMode(short mode)
sets the viewMode |
java.lang.String |
show()
method for rendering the component as string |
void |
show(java.io.PrintWriter pw)
prints the rendered component to a PrintWriter |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final short ACTIVE
public static final short READONLY
public static final short INVISIBLE
public static final short DEFAULT
public static final short NS
public static final short IE
public static final java.lang.String ON_CLICK
public static final java.lang.String ON_DBLCLICK
public static final java.lang.String ON_MOUSE_DOWN
public static final java.lang.String ON_MOUSE_UP
public static final java.lang.String ON_MOUSE_MOVE
public static final java.lang.String ON_MOUSE_OUT
public static final java.lang.String ON_KEY_PRESS
public static final java.lang.String ON_KEY_DOWN
public static final java.lang.String ON_KEY_UP
public static final java.lang.String ON_FOCUS
public static final java.lang.String ON_BLUR
public static final java.lang.String ON_LOAD
public static final java.lang.String ON_UNLOAD
public static final java.lang.String ON_SUBMIT
public static final java.lang.String ON_RESET
public static final java.lang.String ON_SELECT
protected short viewMode
protected short browserMode
protected boolean isSensitive
public static final java.lang.String ID
protected org.jdom.Element parentElem
protected Container parent
protected org.jdom.Element root
protected org.jdom.Element outputRoot
protected static HTMLOutputter outputter
protected Label label
protected java.util.Hashtable actions
| Constructor Detail |
|---|
public AbstractComponent()
public AbstractComponent(org.jdom.Element root)
public AbstractComponent(java.lang.String name,
java.lang.String id,
java.lang.String className)
name - - the name of the root elementid - - the id of the componentclassName - - the name of the component classpublic AbstractComponent(java.lang.String name)
| Method Detail |
|---|
public void init(org.jdom.Element element)
init in interface Componentelement - - the root-element of the tree, must not be nullpublic void init(java.lang.String name)
public void init(java.lang.String name,
java.lang.String id,
java.lang.String className)
init in interface Componentname - - the name of the root-element of the tree, must not be nullid - - the id of the componentclassName - - the name of the component class
public void setAttribute(java.lang.String name,
java.lang.String value)
setAttribute in interface Componentname - - the name of the attributevalue - - the value of the attributepublic java.lang.String getAttribute(java.lang.String name)
getAttribute in interface Componentname - - the name of the attribute
public boolean removeAttribute(java.lang.String name)
removeAttribute in interface Componentname - - the name of the attribute
public void setActionListener(java.lang.String event,
java.lang.String action)
setActionListener in interface Componentevent - the event to listenaction - the action to performpublic java.lang.String getActionListener(java.lang.String event)
getActionListener in interface Componentevent - - the event to listen
public void setId(java.lang.String id)
setId in interface Componentid - the new id of this componentpublic java.lang.String getId()
getId in interface Componentpublic void setName(java.lang.String name)
setName in interface Componentname - - the new name of this componentpublic java.lang.String getName()
getName in interface Componentpublic void setRootName(java.lang.String name)
name - - the new name of the root elementpublic java.lang.String getRootName()
public void setLabel(Label c)
setLabel in interface Componentc - - the label componentpublic Label getLabel()
getLabel in interface Componentpublic void setParentElement(org.jdom.Element parent)
setParentElement in interface Componentparent - - the parent elementpublic org.jdom.Element getParentElement()
getParentElement in interface Componentpublic void setParent(Container parent)
setParent in interface Componentparent - - the parent containerpublic Container getParent()
getParent in interface Componentpublic void setViewMode(short mode)
setViewMode in interface Componentmode - - the new viewModepublic short getViewMode()
getViewMode in interface Componentpublic void setBrowserMode(short mode)
setBrowserMode in interface Componentmode - - the new browserModepublic short getBrowserMode()
getBrowserMode in interface Componentpublic void setStyle(java.lang.String style)
setStyle in interface Componentstyle - - the new stylepublic java.lang.String getStyle()
getStyle in interface Componentpublic java.lang.String show()
Component
show in interface Component
public void show(java.io.PrintWriter pw)
throws ApplicationException
show in interface Componentpw - - the Printwriter
ApplicationExceptionpublic java.lang.String toString()
toString in interface ComponenttoString in class java.lang.Object
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface Componentclone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic org.jdom.Element getRoot()
getRoot in interface Component
public abstract void setContent(java.lang.Object o)
throws ApplicationException
setContent in interface Componento - any object where the string representation is used for rendering
ApplicationExceptionpublic abstract java.lang.Object getContent()
getContent in interface Componentpublic void setNewLines(boolean val)
public void setEncoding(boolean val)
public void setExpandEmptyElements(boolean val)
public void setIndenting(boolean val)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||