Blackjack

com.amoebacode.blackjack.display.button
Class InsuranceButton

java.lang.Object
  |
  +--com.amoebacode.blackjack.display.DisplayElement
        |
        +--com.amoebacode.blackjack.display.button.ButtonBase
              |
              +--com.amoebacode.blackjack.display.button.HandButton
                    |
                    +--com.amoebacode.blackjack.display.button.InsuranceButton

class InsuranceButton
extends HandButton

InsuranceButton manages the Insurance user button.

Version:
0.9
Author:
Jason Gurney

Field Summary
private static int Y_OFFSET
          The vertical distance between this button and its player hand
 
Fields inherited from class com.amoebacode.blackjack.display.button.HandButton
playerHand
 
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 InsuranceButton(PlayerHandDisplay playerHand)
          Default protected constructor.
 
Method Summary
protected  java.lang.String getButtonText()
          Returns the button text.
protected  java.lang.String getToolTipText()
          Returns the help text that appears when the user mouses over the button.
protected  int getYOffset()
          Returns the vertical distance between this button and the player hand.
 void performAction()
          Performs the action associated with the button (called when it is clicked by the user).
 
Methods inherited from class com.amoebacode.blackjack.display.button.HandButton
actionPreamble, getPlayerHand, getXPos, getYPos, setupButton
 
Methods inherited from class com.amoebacode.blackjack.display.button.ButtonBase
activate, clear, disable, displayDisable, getButtonListener, getHeight, getWidth, 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

Y_OFFSET

private static final int Y_OFFSET
The vertical distance between this button and its player hand
Constructor Detail

InsuranceButton

protected InsuranceButton(PlayerHandDisplay playerHand)
Default protected constructor.
Parameters:
playerHand - the PlayerHandDisplay parent
Method Detail

getButtonText

protected java.lang.String getButtonText()
Description copied from class: ButtonBase
Returns the button text.
Overrides:
getButtonText in class ButtonBase
See Also:
ButtonBase.getButtonText()

getYOffset

protected int getYOffset()
Description copied from class: HandButton
Returns the vertical distance between this button and the player hand.
Overrides:
getYOffset in class HandButton
See Also:
HandButton.getYOffset()

performAction

public void performAction()
Description copied from class: HandButton
Performs the action associated with the button (called when it is clicked by the user).
Overrides:
performAction in class HandButton
See Also:
HandButton.performAction()

getToolTipText

protected java.lang.String getToolTipText()
Description copied from class: ButtonBase
Returns the help text that appears when the user mouses over the button.
Overrides:
getToolTipText in class ButtonBase
See Also:
ButtonBase.getToolTipText()

Blackjack

Copyright © 2002 amoebacode.com.