fi.hut.tml.xsmiles.gui.components
Interface XComponent

All Known Subinterfaces:
XButton, XCalendar, XCaption, XContainer, XDocument, XInput, XLinkComponent, XMedia, XRange, XSecret, XSelect, XSelectBoolean, XSelectMany, XSelectOne, XText, XTextArea, XUpload
All Known Implementing Classes:
AWTButton, AWTCaption, AWTComponent, AWTContainer, AWTInput, AWTLink, AWTRange, AWTSelectBase, AWTSelectBoolean, AWTSelectManyCompact, AWTSelectOne, AWTSelectOneCompact, AWTStylableComponent, AWTTextArea, AWTTextComponent, AWTUpload, HaviButton, HaviCaption, HaviInput, HaviSelectBase, HaviSelectBoolean, HaviSelectManyCompact, HaviSelectOne, HaviSelectOneCompact, HaviTextComponent, HaviUpload, SwingButton, SwingCalendar, SwingCaption, SwingContainer, SwingInput, SwingLink, SwingRange, SwingSelectBase, SwingSelectBoolean, SwingSelectManyCompact, SwingSelectOne, SwingSelectOneCompact, SwingSelectOneMinimal, SwingTextArea, SwingTextComponent, SwingUpload, XADocument, XAMedia, XComponentWrapper

public interface XComponent

Interface to plain GUI component The GUI component package contains an abstract set of components that can generally be used.

Author:
Mikko Honkala

Method Summary
 void addActionListener(java.awt.event.ActionListener al)
          At the moment ALL events are delegated through a simple actionListener
 void addFocusListener(java.awt.event.FocusListener fl)
           
 void addHelpListener(java.awt.event.ActionListener fl)
          add a listener for help events
 void addMouseListener(java.awt.event.MouseListener fl)
           
 java.awt.Component getComponent()
          Return the visual component for this extension element
 boolean getEnabled()
           
 int getHeight()
           
 java.awt.Dimension getSize()
          Returns the approximate size of this extension element
 org.w3c.dom.css.CSSStyleDeclaration getStyle()
          gets the css style
 int getWidth()
           
 int getX()
           
 int getY()
           
 void removeActionListener(java.awt.event.ActionListener al)
           
 void removeFocusListener(java.awt.event.FocusListener fl)
           
 void removeHelpListener(java.awt.event.ActionListener fl)
          remove a listener for help events
 void removeMouseListener(java.awt.event.MouseListener fl)
           
 void setBackground(java.awt.Color bg)
          set the background, if null, then reset to default
 void setBounds(int x, int y, int width, int height)
          Set the bounds of Container
 void setEnabled(boolean b)
           
 void setFocus()
          set the focus to this control
 void setForeground(java.awt.Color fg)
           
 void setHintText(java.lang.String text)
          set the hint text
 void setInputMode(java.lang.String inputmode)
          set the input mode attribute (from XForms)
 void setStyle(org.w3c.dom.css.CSSStyleDeclaration style)
          sets the CSS style for this component.
 void setVisible(boolean v)
          Set this drawing area visible.
 void setZoom(double zoom)
          set the zoom level (1.0 is the normal)
 

Method Detail

setStyle

public void setStyle(org.w3c.dom.css.CSSStyleDeclaration style)
sets the CSS style for this component. for components, which support this, all styling should be dont thru this


getStyle

public org.w3c.dom.css.CSSStyleDeclaration getStyle()
gets the css style


setVisible

public void setVisible(boolean v)
Set this drawing area visible.

Parameters:
v - true=visible, false=invisible

setEnabled

public void setEnabled(boolean b)
Parameters:
b - Active or not active

getEnabled

public boolean getEnabled()
Returns:

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Set the bounds of Container

Parameters:
x - X location
y - X location
width - X location
height - X location

getX

public int getX()
Returns:
The original coordinated, and the default size of component

getY

public int getY()

getWidth

public int getWidth()

getHeight

public int getHeight()

setHintText

public void setHintText(java.lang.String text)
set the hint text


addActionListener

public void addActionListener(java.awt.event.ActionListener al)
At the moment ALL events are delegated through a simple actionListener

Parameters:
al - Add the actionlistener

removeActionListener

public void removeActionListener(java.awt.event.ActionListener al)

addFocusListener

public void addFocusListener(java.awt.event.FocusListener fl)

removeFocusListener

public void removeFocusListener(java.awt.event.FocusListener fl)

addMouseListener

public void addMouseListener(java.awt.event.MouseListener fl)

removeMouseListener

public void removeMouseListener(java.awt.event.MouseListener fl)

addHelpListener

public void addHelpListener(java.awt.event.ActionListener fl)
add a listener for help events


removeHelpListener

public void removeHelpListener(java.awt.event.ActionListener fl)
remove a listener for help events


getComponent

public java.awt.Component getComponent()
Return the visual component for this extension element


getSize

public java.awt.Dimension getSize()
Returns the approximate size of this extension element


setZoom

public void setZoom(double zoom)
set the zoom level (1.0 is the normal)


setBackground

public void setBackground(java.awt.Color bg)
set the background, if null, then reset to default


setForeground

public void setForeground(java.awt.Color fg)

setInputMode

public void setInputMode(java.lang.String inputmode)
set the input mode attribute (from XForms)


setFocus

public void setFocus()
set the focus to this control



X-Smiles 1.2