public interface Component extends Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
static String |
LABELLEDBY |
Modifier and Type | Method and Description |
---|---|
Component |
addClass(String clazz)
add the given CSS class(es) to the list of existing CSS-classes
|
Object |
clone()
returns a copy of the Component object
|
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
|
Component |
removeClass(String clazz)
remove the given CSS class(es) from the list of existing CSS-classes
|
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
|
Component |
setClass(String clazz)
set the CSS-class attribute to the given value
|
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
|
Component |
toggleClass(String clazz,
boolean add)
remove or add the given CSS class(es) from the list of existing CSS-classes depending on a condition
|
String |
toString() |
static final String LABELLEDBY
void init(Element root)
root
- - the root-element of the tree, must not be nullvoid init(String name, String id, String className)
name
- - the name of the root elementid
- - the id of the componentclassName
- - the name of the component classComponent setAttribute(String name, String value)
name
- - the name of the attributevalue
- - the value of the attributeString getAttribute(String name)
name
- - the name of the attributeboolean removeAttribute(String name)
name
- - the name of the attributevoid 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 show()
void show(PrintWriter output)
output
- - the PrintwriterString toString()
Object clone()
Element getRoot()
void setContent(Object o)
o
- any object where the string representation is used for renderingObject getContent()
Component toggleClass(String clazz, boolean add)
clazz
- blank separated list of CSS classes to be added/removedadd
- - condition to add (true
) or remove (false
) the classesComponent removeClass(String clazz)
clazz
- blank separated list of CSS classes to be removedComponent addClass(String clazz)
clazz
- blank separated list of CSS classes to be added@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.