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

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.general.ComponentBase
      extended byfi.hut.tml.xsmiles.gui.components.awt.AWTStylableComponent
          extended byfi.hut.tml.xsmiles.gui.components.awt.AWTButton
All Implemented Interfaces:
XButton, XComponent
Direct Known Subclasses:
AWTUpload

public class AWTButton
extends AWTStylableComponent
implements XButton

Author:
Mikko Honkala, Juha Vierine

Field Summary
protected  java.awt.Button button
           
protected  java.lang.String iconUrl
           
protected  java.lang.String name
           
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.awt.AWTStylableComponent
hiddenFrame
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
content, currentFont, currentZoom, defaultBGColor, defaultFont, defaultSize, fInputMode, hintText, minSize, style
 
Constructor Summary
AWTButton(java.lang.String iconUrl)
          A plain swing button
AWTButton(java.lang.String a_name, java.lang.String iconUrl)
          A iconed swing button
 
Method Summary
 void addActionListener(java.awt.event.ActionListener al)
          At the moment ALL events are delegated through a simple actionListener
 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 = default.
 void init()
           
 void removeActionListener(java.awt.event.ActionListener al)
           
 void setActionCommand(java.lang.String ac)
           
 void setCaptionText(java.lang.String text)
           
 void setImage(java.lang.String fn)
           
 void setImageDisabled(java.lang.String fn)
           
 void setImagePressed(java.lang.String fn)
           
 void setImageRollOver(java.lang.String fn)
           
 void setLabel(java.lang.String t)
          ?@param t Set the label of this component
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.awt.AWTStylableComponent
addHelpListener, createHint, getHiddenFrame, getPreferredSize, isCaption, removeHelpListener, setBackground, setHintRecursively, setHintText, sizeComponent
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
addFocusListener, addMouseListener, getAddableComponent, getDefaultSize, getEnabled, getFormatter, getHeight, getMinimumSize, getSizableComponent, getSize, getStylableComponent, getStyle, getWidth, getX, getY, 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
addFocusListener, addHelpListener, addMouseListener, getEnabled, getHeight, getSize, getStyle, getWidth, getX, getY, removeFocusListener, removeHelpListener, removeMouseListener, setBackground, setBounds, setEnabled, setFocus, setForeground, setHintText, setInputMode, setStyle, setVisible, setZoom
 

Field Detail

button

protected java.awt.Button button

name

protected java.lang.String name

iconUrl

protected java.lang.String iconUrl
Constructor Detail

AWTButton

public AWTButton(java.lang.String iconUrl)
A plain swing button


AWTButton

public AWTButton(java.lang.String a_name,
                 java.lang.String iconUrl)
A iconed swing button

Method Detail

init

public void init()
Overrides:
init in class AWTStylableComponent

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 = default.

Overrides:
getDefaultBackgroundColor in class ComponentBase

setCaptionText

public void setCaptionText(java.lang.String text)

setLabel

public void setLabel(java.lang.String t)
Description copied from interface: XButton
?@param t Set the label of this component

Specified by:
setLabel in interface XButton

addActionListener

public void addActionListener(java.awt.event.ActionListener al)
Description copied from interface: XComponent
At the moment ALL events are delegated through a simple actionListener

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

removeActionListener

public void removeActionListener(java.awt.event.ActionListener al)
Specified by:
removeActionListener in interface XComponent
Overrides:
removeActionListener in class ComponentBase

setImage

public void setImage(java.lang.String fn)
Specified by:
setImage in interface XButton

setImagePressed

public void setImagePressed(java.lang.String fn)
Specified by:
setImagePressed in interface XButton

setImageRollOver

public void setImageRollOver(java.lang.String fn)
Specified by:
setImageRollOver in interface XButton

setImageDisabled

public void setImageDisabled(java.lang.String fn)
Specified by:
setImageDisabled in interface XButton

setActionCommand

public void setActionCommand(java.lang.String ac)
Specified by:
setActionCommand in interface XButton


X-Smiles 1.2