|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Component
interface for any component the component is an elementary part of any view see the composite pattern [GoF95] for any details
| Method Summary | |
|---|---|
Object |
clone()
returns a copy of the Component object |
String |
getActionListener(String event)
|
String |
getAttribute(String name)
returs the value of an attribute |
short |
getBrowserMode()
|
Object |
getContent()
|
String |
getId()
|
Label |
getLabel()
|
String |
getName()
|
Container |
getParent()
|
Element |
getParentElement()
|
Element |
getRoot()
returns the root element of the internal JDOM |
String |
getStyle()
|
short |
getViewMode()
|
void |
init(Element root)
initialize the component with a jdom-tree |
void |
init(String name,
String id,
String className)
initialize the component with a jdom-tree |
boolean |
removeAttribute(String name)
removes the attribute |
void |
setActionListener(String event,
String action)
sets the style |
Component |
setAttribute(String name,
String value)
sets the attribute to the component |
void |
setBrowserMode(short mode)
sets the browserMode |
void |
setContent(Object o)
sets the content of the component |
void |
setId(String id)
set the unique identifier to a given value. |
void |
setLabel(Label c)
sets the label component |
void |
setName(String name)
set the name to a given value. |
void |
setParent(Container parent)
sets the parent continer |
void |
setParentElement(Element parent)
sets the parent element of the components root |
void |
setStyle(String style)
sets the style |
void |
setViewMode(short mode)
sets the viewMode |
String |
show()
method for rendering the component as string |
void |
show(PrintWriter output)
prints the rendered component to a PrintWriter |
String |
toString()
|
| Method Detail |
|---|
void init(Element root)
root - - the root-element of the tree, must not be null
void init(String name,
String id,
String className)
name - - the name of the root elementid - - the id of the componentclassName - - the name of the component class
Component setAttribute(String name,
String value)
name - - the name of the attributevalue - - the value of the attributeString getAttribute(String name)
name - - the name of the attribute
boolean removeAttribute(String name)
name - - the name of the attribute
void setId(String id)
id - the new id of this componentString getId()
void setName(String name)
name - - the new name of this componentString getName()
void setLabel(Label c)
c - - the label componentLabel getLabel()
void setParent(Container parent)
parent - - the parent element of the containerContainer getParent()
void setParentElement(Element parent)
parent - - the parent elementElement getParentElement()
void setViewMode(short mode)
mode - - the new viewModeshort getViewMode()
void setBrowserMode(short mode)
mode - - the new browserModeshort getBrowserMode()
void setStyle(String style)
style - - the new styleString getStyle()
void setActionListener(String event,
String action)
event - - the event to listenaction - - the action to performString getActionListener(String event)
event - - the event to listen
String show()
void show(PrintWriter output)
output - - the PrintwriterString toString()
toString in class ObjectObject clone()
Element getRoot()
void setContent(Object o)
o - any object where the string representation is used for renderingObject getContent()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||