fi.hut.tml.xsmiles.gui.components.awt
Class AWTStylableComponent

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.general.ComponentBase
      extended byfi.hut.tml.xsmiles.gui.components.awt.AWTStylableComponent
All Implemented Interfaces:
XComponent
Direct Known Subclasses:
AWTButton, AWTCaption, AWTRange, AWTSelectBase, AWTSelectBoolean, AWTTextComponent, SwingLink

public class AWTStylableComponent
extends ComponentBase
implements XComponent

The baseclass for the AWT implementation of the cross library GUI controls

Author:
honkkis, juha

Field Summary
protected static java.awt.Window hiddenFrame
          the hidden frame is used to add components briefly there in order to get correct preferred size.
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
content, currentFont, currentZoom, defaultBGColor, defaultFont, defaultSize, fInputMode, hintText, minSize, style
 
Constructor Summary
AWTStylableComponent()
           
AWTStylableComponent(java.awt.Component comp)
           
 
Method Summary
 void addHelpListener(java.awt.event.ActionListener fl)
          add a listener for help events
protected  void createHint()
           
protected  java.awt.Container getHiddenFrame()
           
 java.awt.Dimension getPreferredSize(java.awt.Component comp)
          in AWT, we must do extra tricks to get the preferred size before the component is on screen
 void init()
           
 boolean isCaption()
           
 void removeHelpListener(java.awt.event.ActionListener fl)
          remove a listener for help events
 void setBackground(java.awt.Color bg)
          set the background, if null, then reset to default
protected  void setHintRecursively(java.awt.Component[] comps, java.lang.String hinttext)
           
 void setHintText(java.lang.String hint)
          Sets the components Tooltip (Hint) text
 void sizeComponent(double zoom, java.awt.Dimension size)
           
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
addActionListener, addFocusListener, addMouseListener, getAddableComponent, getComponent, getDefaultBackgroundColor, getDefaultSize, getEnabled, getFormatter, getHeight, getMinimumSize, getSizableComponent, getSize, getStylableComponent, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeMouseListener, setBounds, setDefaultSize, setEnabled, setFocus, setFont, setForeground, setInputMode, setStyle, setVisible, setZoom, sizeComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fi.hut.tml.xsmiles.gui.components.XComponent
addActionListener, addFocusListener, addMouseListener, getComponent, getEnabled, getHeight, getSize, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeMouseListener, setBounds, setEnabled, setFocus, setForeground, setInputMode, setStyle, setVisible, setZoom
 

Field Detail

hiddenFrame

protected static java.awt.Window hiddenFrame
the hidden frame is used to add components briefly there in order to get correct preferred size.

Constructor Detail

AWTStylableComponent

public AWTStylableComponent()

AWTStylableComponent

public AWTStylableComponent(java.awt.Component comp)
Method Detail

init

public void init()

isCaption

public boolean isCaption()

sizeComponent

public void sizeComponent(double zoom,
                          java.awt.Dimension size)
Overrides:
sizeComponent in class ComponentBase

getHiddenFrame

protected java.awt.Container getHiddenFrame()

getPreferredSize

public java.awt.Dimension getPreferredSize(java.awt.Component comp)
in AWT, we must do extra tricks to get the preferred size before the component is on screen

Overrides:
getPreferredSize in class ComponentBase

setBackground

public void setBackground(java.awt.Color bg)
Description copied from interface: XComponent
set the background, if null, then reset to default

Specified by:
setBackground in interface XComponent
Overrides:
setBackground in class ComponentBase

setHintText

public void setHintText(java.lang.String hint)
Sets the components Tooltip (Hint) text

Specified by:
setHintText in interface XComponent
Overrides:
setHintText in class ComponentBase

createHint

protected void createHint()

setHintRecursively

protected void setHintRecursively(java.awt.Component[] comps,
                                  java.lang.String hinttext)

addHelpListener

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

Specified by:
addHelpListener in interface XComponent
Overrides:
addHelpListener in class ComponentBase

removeHelpListener

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

Specified by:
removeHelpListener in interface XComponent
Overrides:
removeHelpListener in class ComponentBase


X-Smiles 1.2