Blackjack

com.amoebacode.blackjack.display
Class DealerHandDisplay

java.lang.Object
  |
  +--com.amoebacode.blackjack.display.DisplayElement
        |
        +--com.amoebacode.blackjack.display.HandDisplay
              |
              +--com.amoebacode.blackjack.display.DealerHandDisplay
All Implemented Interfaces:
BlackjackEventListener, DealerHandEventListener, java.util.EventListener, HandEventListener

public class DealerHandDisplay
extends HandDisplay
implements DealerHandEventListener

DealerHandDisplay handles the GUI display of the dealer hand

Version:
0.9
Author:
Jason Gurney

Field Summary
private  javax.swing.JLabel blankLabel
          The label used to draw the face-down dealer's card
 
Fields inherited from class com.amoebacode.blackjack.display.HandDisplay
cardDisplays, currentScore, hand, isAnimating, xPos, yPos
 
Fields inherited from class com.amoebacode.blackjack.display.DisplayElement
parent
 
Constructor Summary
protected DealerHandDisplay(DealerDisplay dealer)
          Default protected constructor.
 
Method Summary
private  void drawBlankCard()
          Draws the blank hole card.
protected  void drawCard(IHand hand, int index)
          Draws the specified card in this hand.
protected  Coordinate getCoordinates()
          Returns the horizontal and vertical position of this hand.
 int getCurrentScoreYPos()
          Returns the vertical position of the current score label.
 void performTurnOverCardAction()
          Turns over the hole card and resumes the action queue.
 void turnOverCard(BlackjackEvent event)
          Turns over the hole card in this dealer hand display object.
 
Methods inherited from class com.amoebacode.blackjack.display.HandDisplay
addCard, clear, clearCards, clearCurrentScore, drawCard, drawCards, getCardDisplay, getCardDisplayAt, getCurrentScoreXPos, getHand, getNumberOfCardDisplays, performAddCardAction, removeCard, resume, setCoordinates, setHand, setupDisplay, startAnimatedCard, stopAnimatedCard
 
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
 
Methods inherited from interface com.amoebacode.blackjack.event.HandEventListener
addCard, clear, removeCard
 

Field Detail

blankLabel

private javax.swing.JLabel blankLabel
The label used to draw the face-down dealer's card
Constructor Detail

DealerHandDisplay

protected DealerHandDisplay(DealerDisplay dealer)
Default protected constructor.
Parameters:
dealer - the DealerDisplay parent
Method Detail

getCoordinates

protected Coordinate getCoordinates()
Description copied from class: HandDisplay
Returns the horizontal and vertical position of this hand.
Overrides:
getCoordinates in class HandDisplay
See Also:
HandDisplay.getCoordinates()

drawCard

protected void drawCard(IHand hand,
                        int index)
Description copied from class: HandDisplay
Draws the specified card in this hand.
Overrides:
drawCard in class HandDisplay
See Also:
HandDisplay.drawCard(IHand, int)

drawBlankCard

private void drawBlankCard()
Draws the blank hole card.

getCurrentScoreYPos

public int getCurrentScoreYPos()
Description copied from class: HandDisplay
Returns the vertical position of the current score label.
Overrides:
getCurrentScoreYPos in class HandDisplay
See Also:
HandDisplay.getCurrentScoreYPos()

turnOverCard

public void turnOverCard(BlackjackEvent event)
Description copied from interface: DealerHandEventListener
Turns over the hole card in this dealer hand display object.
Specified by:
turnOverCard in interface DealerHandEventListener
See Also:
DealerHandEventListener.turnOverCard(BlackjackEvent)

performTurnOverCardAction

public void performTurnOverCardAction()
Turns over the hole card and resumes the action queue.

Blackjack

Copyright © 2002 amoebacode.com.