|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.amoebacode.blackjack.core.GameObject
GameObject is the base class for the core game classes, managing the parent object and event listener collection.
| Field Summary | |
private EventListenerCollection |
listeners
The collection of event listeners for this game object |
private IGameObject |
parent
The parent for this game object |
| Constructor Summary | |
protected |
GameObject()
Protected constructor used by the top level game object. |
protected |
GameObject(IGameObject parent)
Default protected constructor. |
| Method Summary | |
void |
addEventListener(BlackjackEventListener listener)
Adds the specified event listener to this object's event listener collection. |
protected EventListenerCollection |
getEventListenerCollection()
Returns the event listener collection for this object. |
IGame |
getGame()
Returns the top level game object. |
IGameObject |
getParent()
Returns the parent of this game object. |
protected boolean |
hasParent()
Indicates whether this object has a parent object (true for all objects except the top-level game object). |
protected void |
setEventListenerCollection(EventListenerCollection listeners)
Sets the event listener collection for this object. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private IGameObject parent
private EventListenerCollection listeners
| Constructor Detail |
protected GameObject(IGameObject parent)
parent - the IGameObject parent of this objectprotected GameObject()
| Method Detail |
public IGameObject getParent()
IGameObjectgetParent in interface IGameObjectIGameObject.getParent()protected boolean hasParent()
public IGame getGame()
IGameObjectgetGame in interface IGameObjectIGameObject.getGame()protected void setEventListenerCollection(EventListenerCollection listeners)
listeners - this object's new EventListenerCollectionprotected EventListenerCollection getEventListenerCollection()
public void addEventListener(BlackjackEventListener listener)
IGameObjectaddEventListener in interface IGameObjectIGameObject.addEventListener(BlackjackEventListener)
|
Blackjack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||