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

java.lang.Object
  extended byjava.awt.Component
      extended byfi.hut.tml.xsmiles.gui.components.awt.XAComponent
          extended byfi.hut.tml.xsmiles.gui.components.swing.XAButton
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class XAButton
extends XAComponent

Similar functionality as normal AWT button. Features:

See Also:
Serialized Form

Nested Class Summary
 class XAButton.MouseHandler
           
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int DISABLED
           
static int FOCUSED
           
static int NORMAL
           
static int PRESSED
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
XAButton()
           
XAButton(java.lang.String iName)
           
XAButton(java.lang.String i1Name, java.lang.String i2Name)
           
XAButton(java.lang.String i1Name, java.lang.String i2Name, java.lang.String i3Name)
           
XAButton(java.lang.String i1Name, java.lang.String i2Name, java.lang.String i3Name, boolean val)
           
 
Method Summary
 void addActionListener(java.awt.event.ActionListener l)
           
 java.lang.String getActionCommand()
           
 java.lang.String getLabel()
           
 java.awt.Dimension getPreferredSize()
           
 int getState()
           
 boolean isActive()
           
 boolean isEnabled()
           
 void paint(java.awt.Graphics g)
           
protected  java.lang.String paramString()
           
protected  void processActionEvent(java.awt.event.ActionEvent e)
           
 void removeActionListener(java.awt.event.ActionListener l)
           
 void set3D(boolean val)
          Does button 3d pop-up.
 void setActionCommand(java.lang.String command)
           
 void setActive(boolean b)
           
 void setBounds(int x, int y, int w, int h)
           
 void setEnabled(boolean enabled)
           
 void setGray(boolean val)
           
 void setImage(java.lang.String fn)
           
 void setImage(XAImageIcon i)
           
 void setImageDisabled(java.lang.String fn)
           
 void setimagePressed(java.lang.String fn)
           
 void setImagePressed(XAImageIcon i)
           
 void setImageRollOver(java.lang.String fn)
           
 void setImageRollOver(XAImageIcon i)
           
 void setLabel(java.lang.String l)
           
 void setSize(java.awt.Dimension d)
           
 void setSize(int w, int h)
           
 void setState(int s)
           
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NORMAL

public static final int NORMAL
See Also:
Constant Field Values

FOCUSED

public static final int FOCUSED
See Also:
Constant Field Values

PRESSED

public static final int PRESSED
See Also:
Constant Field Values

DISABLED

public static final int DISABLED
See Also:
Constant Field Values
Constructor Detail

XAButton

public XAButton(java.lang.String iName)

XAButton

public XAButton(java.lang.String i1Name,
                java.lang.String i2Name)

XAButton

public XAButton(java.lang.String i1Name,
                java.lang.String i2Name,
                java.lang.String i3Name,
                boolean val)
Parameters:
i1Name - normal image
i2Name - RollOver
i3Name - Pressed
val - Display greyfiltered image for disabled

XAButton

public XAButton(java.lang.String i1Name,
                java.lang.String i2Name,
                java.lang.String i3Name)

XAButton

public XAButton()
Method Detail

addActionListener

public void addActionListener(java.awt.event.ActionListener l)

set3D

public void set3D(boolean val)
Does button 3d pop-up.


getActionCommand

public java.lang.String getActionCommand()

getLabel

public java.lang.String getLabel()

paramString

protected java.lang.String paramString()

processActionEvent

protected void processActionEvent(java.awt.event.ActionEvent e)

removeActionListener

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

setActionCommand

public void setActionCommand(java.lang.String command)

setLabel

public void setLabel(java.lang.String l)

setEnabled

public void setEnabled(boolean enabled)

isEnabled

public boolean isEnabled()

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class XAComponent

setActive

public void setActive(boolean b)

isActive

public boolean isActive()

setImage

public void setImage(XAImageIcon i)

setImagePressed

public void setImagePressed(XAImageIcon i)

setImageRollOver

public void setImageRollOver(XAImageIcon i)

setImage

public void setImage(java.lang.String fn)

setimagePressed

public void setimagePressed(java.lang.String fn)

setImageRollOver

public void setImageRollOver(java.lang.String fn)

setImageDisabled

public void setImageDisabled(java.lang.String fn)

setGray

public void setGray(boolean val)

getState

public int getState()
Overrides:
getState in class XAComponent

setState

public void setState(int s)

getPreferredSize

public java.awt.Dimension getPreferredSize()

setSize

public void setSize(java.awt.Dimension d)

setSize

public void setSize(int w,
                    int h)

setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)


X-Smiles 1.2