Blackjack

com.amoebacode.blackjack.display
Class DisplayElement

java.lang.Object
  |
  +--com.amoebacode.blackjack.display.DisplayElement
Direct Known Subclasses:
AnimatedCard, BasicStrategyDisplay, ButtonBase, CardDisplay, ComboBoxBase, DeckDisplay, GameButtonSet, GameDisplay, HandButtonSet, HandDisplay, HouseRulesDisplay, LabelWrapper, ParticipantDisplay, PreferencesDisplay, RoundDisplay

public class DisplayElement
extends java.lang.Object

DisplayElement is the base class for all display elements, providing access to the parent display element and the GameDisplay.

Version:
0.9
Author:
Jason Gurney

Field Summary
private  DisplayElement parent
          The parent of this display element
 
Constructor Summary
protected DisplayElement()
          Empty constructor (to be used by GameDisplay).
protected DisplayElement(DisplayElement parent)
          Default protected constructor.
 
Method Summary
protected  void executeGameCommand(ICommand command)
          Sends the specified game command to the game display object.
protected  DisplayManager getDisplayManager()
          Returns the display manager from the game display.
protected  GameDisplay getGameDisplay()
          Returns the parent game display object.
protected  DisplayElement getParent()
          Returns the parent of this display element.
protected  boolean hasParent()
          Indicates whether this display element has a parent element.
protected  void playGameClip(java.lang.String audioClip)
          Plays the specified game audio clip.
protected  void queueAction(QueueableAction action)
          Sends the specified queueable action to the game display object.
protected  void resumeQueue()
          Resumes the game display queue.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

parent

private DisplayElement parent
The parent of this display element
Constructor Detail

DisplayElement

protected DisplayElement(DisplayElement parent)
Default protected constructor.
Parameters:
parent - the parent DisplayElement

DisplayElement

protected DisplayElement()
Empty constructor (to be used by GameDisplay).
Method Detail

hasParent

protected boolean hasParent()
Indicates whether this display element has a parent element.
Returns:
true if a parent element is present

getDisplayManager

protected DisplayManager getDisplayManager()
Returns the display manager from the game display.
Returns:
the game's DisplayManager

getParent

protected DisplayElement getParent()
Returns the parent of this display element.
Returns:
this object's parent DisplayElement

getGameDisplay

protected GameDisplay getGameDisplay()
Returns the parent game display object.
Returns:
this element's parent GameDisplay

executeGameCommand

protected void executeGameCommand(ICommand command)
Sends the specified game command to the game display object.
Parameters:
command - the ICommand to execute

queueAction

protected void queueAction(QueueableAction action)
Sends the specified queueable action to the game display object.
Parameters:
action - the QueueableAction to queue

resumeQueue

protected void resumeQueue()
Resumes the game display queue.

playGameClip

protected void playGameClip(java.lang.String audioClip)
Plays the specified game audio clip.
Parameters:
audioClip - the name of the clip to play

Blackjack

Copyright © 2002 amoebacode.com.