Blackjack

com.amoebacode.blackjack.display.label
Class StrategyLabel

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

class StrategyLabel
extends LabelWrapper

StrategyLabel displays strategy tips to the user when an incorrect decision is made.

Version:
0.9
Author:
Jason Gurney

Field Summary
private  boolean firstLine
          Indicates whether this label is the first line
private static int LABEL_HEIGHT
          The height in pixels of this label
private static int LABEL_WIDTH
          The width in pixels of this label
 
Fields inherited from class com.amoebacode.blackjack.display.label.LabelWrapper
BLINK_DELAY, BLINK_TIMES, blinkCount, blinkOn, isBlinking, label, timer
 
Fields inherited from class com.amoebacode.blackjack.display.DisplayElement
parent
 
Constructor Summary
protected StrategyLabel(BasicStrategyDisplay basicStrategy, boolean firstLine)
          Default protected constructor.
 
Method Summary
protected  java.awt.Font getLabelFont()
          Returns the font of this label.
protected  int getLabelHeight()
          Returns the height of this label.
protected  int getLabelWidth()
          Returns the width of this label.
protected  int getXPos()
          Returns the horizontal position of the select box.
protected  int getYPos()
          Returns the vertical position of the select box.
 
Methods inherited from class com.amoebacode.blackjack.display.label.LabelWrapper
actionPerformed, blinkOff, blinkOn, blinks, clear, getBlinkDelay, getBlinkTimes, setBackground, setText, setupLabel, 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

LABEL_WIDTH

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

LABEL_HEIGHT

private static final int LABEL_HEIGHT
The height in pixels of this label

firstLine

private boolean firstLine
Indicates whether this label is the first line
Constructor Detail

StrategyLabel

protected StrategyLabel(BasicStrategyDisplay basicStrategy,
                        boolean firstLine)
Default protected constructor.
Parameters:
basicStrategy - the BasicStrategyDisplay parent
firstLine - indicates whether this label is the first line
Method Detail

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()

getLabelFont

protected java.awt.Font getLabelFont()
Description copied from class: LabelWrapper
Returns the font of this label.
Overrides:
getLabelFont in class LabelWrapper
See Also:
LabelWrapper.getLabelFont()

getLabelWidth

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

getLabelHeight

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

Blackjack

Copyright © 2002 amoebacode.com.