jds.util
Class ButtonAdapter

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Button
              |
              +--jds.util.ButtonAdapter

public abstract class ButtonAdapter
extends java.awt.Button
implements java.awt.event.ActionListener

ButtonAdapter - simple button builder; for use with book Classic Data Structures in Java by Timothy A Budd, published by Addison-Wesley, 2001.

See Also:
Button, ActionListener, ActionEvent, Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
ButtonAdapter(java.lang.String name)
          initialize a button, establish ourself as listener for presses
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          when told that a button has been pressed, respond to it; this method is not generally overridden by user.
abstract  void pressed()
          action to perform when button is pressed; this must be overridden by user
 
Methods inherited from class java.awt.Button
addActionListener, addNotify, getActionCommand, getLabel, removeActionListener, setActionCommand, setLabel
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, 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, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, 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, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ButtonAdapter

public ButtonAdapter(java.lang.String name)
initialize a button, establish ourself as listener for presses
Parameters:
name - label for button
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
when told that a button has been pressed, respond to it; this method is not generally overridden by user.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - the particular action that button is responding to

pressed

public abstract void pressed()
action to perform when button is pressed; this must be overridden by user