Blackjack

com.amoebacode.blackjack.display.button
Class GameButton

java.lang.Object
  |
  +--com.amoebacode.blackjack.display.DisplayElement
        |
        +--com.amoebacode.blackjack.display.button.ButtonBase
              |
              +--com.amoebacode.blackjack.display.button.GameButton
Direct Known Subclasses:
DealButton, LowerBetButton, OptionsButton, PreferencesButton, RaiseBetButton, SaveButton, ShuffleButton

abstract class GameButton
extends ButtonBase

GameButton is the base class for all game buttons (deal, shuffle, etc.)

Version:
0.9
Author:
Jason Gurney

Field Summary
protected  GameDisplay game
          The main game object
 
Fields inherited from class com.amoebacode.blackjack.display.button.ButtonBase
button, buttonListener, HEIGHT, WIDTH
 
Fields inherited from class com.amoebacode.blackjack.display.DisplayElement
parent
 
Constructor Summary
protected GameButton(GameDisplay game)
          Default protected constructor.
 
Method Summary
protected  void actionPreamble(java.awt.event.ActionEvent ae)
          Performs the preamble to the specified action event.
abstract  void performAction()
          Performs the action associated with the button (called when it is clicked by the user).
protected  void setupButton()
          Creates the button component and adds it to the violator layer of the primary layered pane.
 
Methods inherited from class com.amoebacode.blackjack.display.button.ButtonBase
activate, clear, disable, displayDisable, getButtonListener, getButtonText, getHeight, getToolTipText, getWidth, getXPos, getYPos, hide, setMouseEnteredBackground, setMouseExitedBackground
 
Methods inherited from class com.amoebacode.blackjack.display.DisplayElement
executeGameCommand, getDisplayManager, getGameDisplay, getParent, hasParent, playGameClip, queueAction, resumeQueue
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

game

protected GameDisplay game
The main game object
Constructor Detail

GameButton

protected GameButton(GameDisplay game)
Default protected constructor.
Parameters:
game - the parent GameDisplay
Method Detail

actionPreamble

protected void actionPreamble(java.awt.event.ActionEvent ae)
Description copied from class: ButtonBase
Performs the preamble to the specified action event.
Overrides:
actionPreamble in class ButtonBase
See Also:
ButtonBase.actionPreamble(ActionEvent)

performAction

public abstract void performAction()
Performs the action associated with the button (called when it is clicked by the user).

setupButton

protected void setupButton()
Description copied from class: ButtonBase
Creates the button component and adds it to the violator layer of the primary layered pane.
Overrides:
setupButton in class ButtonBase
See Also:
ButtonBase.setupButton()

Blackjack

Copyright © 2002 amoebacode.com.