Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class uk.co.ist.mwt.BoxedButton

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--uk.co.ist.mwt.ShadowedComponent
                    |
                    +--uk.co.ist.mwt.BoxedButton
Subclasses:
ImageButton

public class BoxedButton
extends ShadowedComponent
The BoxedButton is a simple button class which implements the shadows and event generation behaviour expected of a button. It is used in this package as a base class for other button types.

See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
BoxedButton()
          Creates a default boxed button
 
Method Summary
void addActionListener(java.awt.event.ActionListener l)
          Adds a listener for action events from this component.
void onMouseDown(java.awt.event.MouseEvent e)
          Event handler - keeps track of state so that the armed() method returns the correct value.
void onMouseEnter(java.awt.event.MouseEvent e)
          Event handler - keeps track of state so that the armed() method returns the correct value.
void onMouseExit(java.awt.event.MouseEvent e)
          Event handler - keeps track of state so that the armed() method returns the correct value.
void onMouseUp(java.awt.event.MouseEvent e)
          Event handler - keeps track of state so that the armed() method returns the correct value.
void paint(java.awt.Graphics g)
          The method to paint the shadows which make this component stand out from the background
void removeActionListener(java.awt.event.ActionListener l)
          Removes a listener for action events from this component.
 
Methods inherited from class uk.co.ist.mwt.ShadowedComponent
draw3DRect, draw3DRect, draw3DRect, draw3DRect, drawShadow, drawShadow, getBottomShadowColor, getShadowThickness, getTopShadowColor, setBottomShadowColor, setShadowThickness, setTopShadowColor
 
Methods inherited from class java.awt.Canvas
addNotify, paint
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, 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, paint, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

BoxedButton

public BoxedButton()
Creates a default boxed button
Method Detail

onMouseDown

public void onMouseDown(java.awt.event.MouseEvent e)
Event handler - keeps track of state so that the armed() method returns the correct value.
See Also:
#armed, onMouseUp, onMouseEnter, onMouseExit

onMouseUp

public void onMouseUp(java.awt.event.MouseEvent e)
Event handler - keeps track of state so that the armed() method returns the correct value.
See Also:
#armed, onMouseDown, onMouseEnter, onMouseExit

onMouseEnter

public void onMouseEnter(java.awt.event.MouseEvent e)
Event handler - keeps track of state so that the armed() method returns the correct value.
See Also:
#armed, onMouseDown, onMouseUp, onMouseExit

onMouseExit

public void onMouseExit(java.awt.event.MouseEvent e)
Event handler - keeps track of state so that the armed() method returns the correct value.
See Also:
#armed, onMouseDown, onMouseUp, onMouseEnter

paint

public void paint(java.awt.Graphics g)
The method to paint the shadows which make this component stand out from the background
Parameters:
g - the graphics context into which we should draw
Overrides:
paint in class java.awt.Canvas

addActionListener

public void addActionListener(java.awt.event.ActionListener l)
Adds a listener for action events from this component.
See Also:
removeActionListener

removeActionListener

public void removeActionListener(java.awt.event.ActionListener l)
Removes a listener for action events from this component.
See Also:
addActionListener

Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD