Blackjack

com.amoebacode.blackjack.display.button
Class HandButtonSet

java.lang.Object
  |
  +--com.amoebacode.blackjack.display.DisplayElement
        |
        +--com.amoebacode.blackjack.display.button.HandButtonSet

public class HandButtonSet
extends DisplayElement

HandButtonSet manages all hand buttons (hit, stand, etc.)

Version:
0.9
Author:
Jason Gurney

Field Summary
private  HandButton doubleDownButton
          The double down button
private  HandButton hitButton
          The hit button
private  HandButton insuranceButton
          The buy insurance button
private  HandButton noInsuranceButton
          The no insurance button
private  HandButton splitButton
          The split button
private  HandButton standButton
          The stand button
private  HandButton surrenderButton
          The surrender button
 
Fields inherited from class com.amoebacode.blackjack.display.DisplayElement
parent
 
Constructor Summary
HandButtonSet(PlayerHandDisplay playerHand)
          Default public constructor.
 
Method Summary
 void clearButtons()
          Removes all of the buttons from the primary layered pane.
 void disableButtons()
          Disables all of the hand buttons.
private  void drawButtons()
          Creates the set of hand buttons through the button factory.
private  PlayerHandDisplay getPlayerHandDisplay()
          Returns the player hand display parent of this button set.
 void hideButtons()
          Hides all of the hand buttons.
 void updateButtons(AvailableHandCommands availableCommands)
          Updates the visiblity and availability of the hand buttons, depending on the current hand conditions.
 
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

hitButton

private HandButton hitButton
The hit button

standButton

private HandButton standButton
The stand button

doubleDownButton

private HandButton doubleDownButton
The double down button

splitButton

private HandButton splitButton
The split button

surrenderButton

private HandButton surrenderButton
The surrender button

insuranceButton

private HandButton insuranceButton
The buy insurance button

noInsuranceButton

private HandButton noInsuranceButton
The no insurance button
Constructor Detail

HandButtonSet

public HandButtonSet(PlayerHandDisplay playerHand)
Default public constructor.
Parameters:
playerHand - the hand controlled by this button
Method Detail

getPlayerHandDisplay

private PlayerHandDisplay getPlayerHandDisplay()
Returns the player hand display parent of this button set.
Returns:
the PlayerHandDisplay parent

drawButtons

private void drawButtons()
Creates the set of hand buttons through the button factory.

hideButtons

public void hideButtons()
Hides all of the hand buttons.

clearButtons

public void clearButtons()
Removes all of the buttons from the primary layered pane.

updateButtons

public void updateButtons(AvailableHandCommands availableCommands)
Updates the visiblity and availability of the hand buttons, depending on the current hand conditions.
Parameters:
availableCommands - the available set of hand commands

disableButtons

public void disableButtons()
Disables all of the hand buttons.

Blackjack

Copyright © 2002 amoebacode.com.