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

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.general.ComponentBase
      extended byfi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
          extended byfi.hut.tml.xsmiles.gui.components.swing.SwingSelectBoolean
All Implemented Interfaces:
XComponent, XSelectBoolean

public class SwingSelectBoolean
extends SwingStylableComponent
implements XSelectBoolean

An implementation of XSelectBoolean = a single checkbox

Author:
Mikko Honkala

Field Summary
protected  javax.swing.JCheckBox button
           
protected  org.w3c.dom.css.CSSStyleDeclaration cachedStyle
           
protected  javax.swing.ImageIcon icon
           
protected  boolean layoutDone
           
protected  java.lang.String name
           
protected  boolean stylindDone
           
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
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
SwingSelectBoolean()
          A plain swing button
 
Method Summary
 void addItemListener(java.awt.event.ItemListener al)
           
 java.awt.Component createContent()
          creates the content component
 java.awt.Component getComponent()
          Return the visual component for this extension element
 java.awt.Color getDefaultBackgroundColor()
          the default background color for this component null = transparent.
 boolean getSelected()
           
 void init()
           
 void removeItemListener(java.awt.event.ItemListener al)
           
 void setCaptionText(java.lang.String text)
           
 void setLabel(java.lang.String t)
           
 void setSelected(boolean selected)
           
 void setStyle(org.w3c.dom.css.CSSStyleDeclaration a_style)
          sets the CSS style for this component.
 void setStyleLater(org.w3c.dom.css.CSSStyleDeclaration a_style)
           
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
addHelpListener, createHint, getFormatter, isCaption, removeHelpListener, setBackground, setHintRecursively, setHintText, sizeComponent
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
addActionListener, addFocusListener, addMouseListener, getAddableComponent, getDefaultSize, getEnabled, getHeight, getMinimumSize, getPreferredSize, getSizableComponent, getSize, getStylableComponent, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeMouseListener, setBounds, setDefaultSize, setEnabled, setFocus, setFont, setForeground, setInputMode, 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, addHelpListener, addMouseListener, getEnabled, getHeight, getSize, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeHelpListener, removeMouseListener, setBackground, setBounds, setEnabled, setFocus, setForeground, setHintText, setInputMode, setVisible, setZoom
 

Field Detail

button

protected javax.swing.JCheckBox button

name

protected java.lang.String name

icon

protected javax.swing.ImageIcon icon

layoutDone

protected boolean layoutDone

stylindDone

protected boolean stylindDone

cachedStyle

protected org.w3c.dom.css.CSSStyleDeclaration cachedStyle
Constructor Detail

SwingSelectBoolean

public SwingSelectBoolean()
A plain swing button

Method Detail

init

public void init()
Overrides:
init in class SwingStylableComponent

createContent

public java.awt.Component createContent()
creates the content component


getComponent

public java.awt.Component getComponent()
Description copied from interface: XComponent
Return the visual component for this extension element

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

getDefaultBackgroundColor

public java.awt.Color getDefaultBackgroundColor()
the default background color for this component null = transparent.

Overrides:
getDefaultBackgroundColor in class ComponentBase

setStyle

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

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

setStyleLater

public void setStyleLater(org.w3c.dom.css.CSSStyleDeclaration a_style)

setCaptionText

public void setCaptionText(java.lang.String text)

setLabel

public void setLabel(java.lang.String t)

addItemListener

public void addItemListener(java.awt.event.ItemListener al)
Specified by:
addItemListener in interface XSelectBoolean

removeItemListener

public void removeItemListener(java.awt.event.ItemListener al)
Specified by:
removeItemListener in interface XSelectBoolean

setSelected

public void setSelected(boolean selected)
Specified by:
setSelected in interface XSelectBoolean

getSelected

public boolean getSelected()
Specified by:
getSelected in interface XSelectBoolean


X-Smiles 1.2