com.groiss.gui
Interface Component

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable
All Known Subinterfaces:
Container
All Known Implementing Classes:
AbstractComponent, AbstractContainer, Button, Checkbox, ComparableComponent, DivComponent, DropdownList, FieldSet, FileChooser, FormContainer, HiddenField, Image, Label, Link, PasswordField, RadioButton, RadioGroup, SelectList, SortableLink, SubmitButton, TabbedDialog, TableContainer, Tabs, Text, Textarea, Textfield, XHTMLPage

public interface Component
extends java.lang.Cloneable, java.io.Serializable

interface for any component the component is an elementary part of any view see the composite pattern [GoF95] for any details


Method Summary
 java.lang.Object clone()
          returns a copy of the Component object
 java.lang.String getActionListener(java.lang.String event)
           
 java.lang.String getAttribute(java.lang.String name)
          returs the value of an attribute
 short getBrowserMode()
           
 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 getStyle()
           
 short getViewMode()
           
 void init(org.jdom.Element root)
          initialize the component with a jdom-tree
 void init(java.lang.String name, java.lang.String id, java.lang.String className)
          initialize the component with a jdom-tree
 boolean removeAttribute(java.lang.String name)
          removes the attribute
 void setActionListener(java.lang.String event, java.lang.String action)
          sets the style
 Component setAttribute(java.lang.String name, java.lang.String value)
          sets the attribute to the component
 void setBrowserMode(short mode)
          sets the browserMode
 void setContent(java.lang.Object o)
          sets the content of the component
 void setId(java.lang.String id)
          set the unique identifier to a given value.
 void setLabel(Label c)
          sets the label component
 void setName(java.lang.String name)
          set the name to a given value.
 void setParent(Container parent)
          sets the parent continer
 void setParentElement(org.jdom.Element parent)
          sets the parent element of the components root
 void setStyle(java.lang.String style)
          sets 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 output)
          prints the rendered component to a PrintWriter
 java.lang.String toString()
           
 

Method Detail

init

void init(org.jdom.Element root)
initialize the component with a jdom-tree

Parameters:
root - - the root-element of the tree, must not be null

init

void init(java.lang.String name,
          java.lang.String id,
          java.lang.String className)
initialize the component with a jdom-tree

Parameters:
name - - the name of the root element
id - - the id of the component
className - - the name of the component class

setAttribute

Component setAttribute(java.lang.String name,
                       java.lang.String value)
sets the attribute to the component

Parameters:
name - - the name of the attribute
value - - the value of the attribute

getAttribute

java.lang.String getAttribute(java.lang.String name)
returs the value of an attribute

Parameters:
name - - the name of the attribute
Returns:
- the value of the attribute

removeAttribute

boolean removeAttribute(java.lang.String name)
removes the attribute

Parameters:
name - - the name of the attribute
Returns:
- true, if the attribute was found

setId

void setId(java.lang.String id)
set the unique identifier to a given value. Handle with care!

Parameters:
id - the new id of this component

getId

java.lang.String getId()
Returns:
- the unique identifier of the component

setName

void setName(java.lang.String name)
set the name to a given value.

Parameters:
name - - the new name of this component

getName

java.lang.String getName()
Returns:
- the name of the component

setLabel

void setLabel(Label c)
sets the label component

Parameters:
c - - the label component

getLabel

Label getLabel()
Returns:
- the label component of the component

setParent

void setParent(Container parent)
sets the parent continer

Parameters:
parent - - the parent element of the container

getParent

Container getParent()
Returns:
- the parent container of the component

setParentElement

void setParentElement(org.jdom.Element parent)
sets the parent element of the components root

Parameters:
parent - - the parent element

getParentElement

org.jdom.Element getParentElement()
Returns:
- the parent element of the components root

setViewMode

void setViewMode(short mode)
sets the viewMode

Parameters:
mode - - the new viewMode

getViewMode

short getViewMode()
Returns:
- the viewMode of the component

setBrowserMode

void setBrowserMode(short mode)
sets the browserMode

Parameters:
mode - - the new browserMode

getBrowserMode

short getBrowserMode()
Returns:
- the browserMode of the component

setStyle

void setStyle(java.lang.String style)
sets the style

Parameters:
style - - the new style

getStyle

java.lang.String getStyle()
Returns:
- the style of the component

setActionListener

void setActionListener(java.lang.String event,
                       java.lang.String action)
sets the style

Parameters:
event - - the event to listen
action - - the action to perform

getActionListener

java.lang.String getActionListener(java.lang.String event)
Parameters:
event - - the event to listen
Returns:
- the action to perform

show

java.lang.String show()
method for rendering the component as string


show

void show(java.io.PrintWriter output)
prints the rendered component to a PrintWriter

Parameters:
output - - the Printwriter

toString

java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
- the rendered component as string

clone

java.lang.Object clone()
returns a copy of the Component object

Returns:
the Component clone

getRoot

org.jdom.Element getRoot()
returns the root element of the internal JDOM

Returns:
the (root) Element object

setContent

void setContent(java.lang.Object o)
sets the content of the component

Parameters:
o - any object where the string representation is used for rendering

getContent

java.lang.Object getContent()
Returns:
- the content object of the component


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.