Blackjack

com.amoebacode.blackjack.display.label
Class HandBetLabel

java.lang.Object
  |
  +--com.amoebacode.blackjack.display.DisplayElement
        |
        +--com.amoebacode.blackjack.display.label.LabelWrapper
              |
              +--com.amoebacode.blackjack.display.label.HandBetLabel
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

class HandBetLabel
extends LabelWrapper

HandBetLabel displays the current bet for the corresponding hand.

Version:
0.9
Author:
Jason Gurney

Field Summary
private static int BLINK_TIMES
          The number of times this label should blink when updated
private static int LABEL_WIDTH
          The width in pixels of this label
 
Fields inherited from class com.amoebacode.blackjack.display.label.LabelWrapper
BLINK_DELAY, blinkCount, blinkOn, isBlinking, label, LABEL_HEIGHT, timer
 
Fields inherited from class com.amoebacode.blackjack.display.DisplayElement
parent
 
Constructor Summary
protected HandBetLabel(PlayerHandDisplay playerHand, java.lang.String text)
          Default protected constructor.
 
Method Summary
protected  int getBlinkTimes()
          Returns the number of times this label should blink when updated.
protected  int getLabelWidth()
          Returns the width of this label.
private  PlayerHandDisplay getPlayerHandDisplay()
          Returns the player hand display being tracked by this label.
protected  int getXPos()
          Returns the horizontal position of the select box.
protected  int getYPos()
          Returns the vertical position of the select box.
protected  void setupLabel(java.lang.String text)
          Creates the label display element with the specified text and adds it to the layered pane.
 
Methods inherited from class com.amoebacode.blackjack.display.label.LabelWrapper
actionPerformed, blinkOff, blinkOn, blinks, clear, getBlinkDelay, getLabelFont, getLabelHeight, setBackground, setText, setupLabel, setVisible, startBlinking, stopBlinking, updateLocation
 
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

BLINK_TIMES

private static final int BLINK_TIMES
The number of times this label should blink when updated

LABEL_WIDTH

private static final int LABEL_WIDTH
The width in pixels of this label
Constructor Detail

HandBetLabel

protected HandBetLabel(PlayerHandDisplay playerHand,
                       java.lang.String text)
Default protected constructor.
Parameters:
playerHand - the PlayerHandDisplay being tracked by this label
text - the String to insert into the label
Method Detail

setupLabel

protected void setupLabel(java.lang.String text)
Description copied from class: LabelWrapper
Creates the label display element with the specified text and adds it to the layered pane.
Overrides:
setupLabel in class LabelWrapper
See Also:
LabelWrapper.setupLabel(String)

getPlayerHandDisplay

private PlayerHandDisplay getPlayerHandDisplay()
Returns the player hand display being tracked by this label.
Returns:
the PlayerHandDisplay parent

getXPos

protected int getXPos()
Description copied from class: LabelWrapper
Returns the horizontal position of the select box.
Overrides:
getXPos in class LabelWrapper
See Also:
LabelWrapper.getXPos()

getYPos

protected int getYPos()
Description copied from class: LabelWrapper
Returns the vertical position of the select box.
Overrides:
getYPos in class LabelWrapper
See Also:
LabelWrapper.getYPos()

getBlinkTimes

protected int getBlinkTimes()
Description copied from class: LabelWrapper
Returns the number of times this label should blink when updated.
Overrides:
getBlinkTimes in class LabelWrapper
See Also:
LabelWrapper.getBlinkTimes()

getLabelWidth

protected int getLabelWidth()
Description copied from class: LabelWrapper
Returns the width of this label.
Overrides:
getLabelWidth in class LabelWrapper
See Also:
LabelWrapper.getLabelWidth()

Blackjack

Copyright © 2002 amoebacode.com.