fi.hut.tml.xsmiles.gui.components.swing
Class SwingStylableComponent

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.general.ComponentBase
      extended byfi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
Direct Known Subclasses:
SwingButton, SwingCalendar, SwingCaption, SwingRange, SwingSelectBase, SwingSelectBoolean, SwingTextComponent

public class SwingStylableComponent
extends ComponentBase

This ontains common functionality to style each of the components (caption, content)

Author:
Mikko Honkala

Field Summary
protected static javax.swing.KeyStroke HELPKEY
           
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
content, currentFont, currentZoom, defaultBGColor, defaultFont, defaultSize, fInputMode, hintText, minSize, style
 
Constructor Summary
SwingStylableComponent()
           
SwingStylableComponent(javax.swing.JComponent comp)
           
 
Method Summary
 void addHelpListener(java.awt.event.ActionListener fl)
          add a listener for help events
protected  void createHint()
           
 CSSFormatter getFormatter()
           
 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, getHeight, getMinimumSize, getPreferredSize, 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
 

Field Detail

HELPKEY

protected static javax.swing.KeyStroke HELPKEY
Constructor Detail

SwingStylableComponent

public SwingStylableComponent()

SwingStylableComponent

public SwingStylableComponent(javax.swing.JComponent 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

getFormatter

public CSSFormatter getFormatter()
Overrides:
getFormatter in class ComponentBase

setBackground

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

Overrides:
setBackground in class ComponentBase

setHintText

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

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

Overrides:
addHelpListener in class ComponentBase

removeHelpListener

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

Overrides:
removeHelpListener in class ComponentBase


X-Smiles 1.2