|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jinx.action.Actor net.jinx.action.Scene
public class Scene
Scene is an Actor that contains other Actors. SceneListener objects can be
added, allowing other objects to be notified when Actors are added or
removed.
API Stability: Beta.
Constructor Summary | |
---|---|
Scene()
|
|
Scene(java.lang.String name)
Constructs a Scene. |
Method Summary | |
---|---|
void |
addActor(Actor actor)
Adds an Actor to this Scene. |
void |
addSceneListener(SceneListener listener)
Adds a SceneListener to the Scene. |
protected void |
deliverEvent(java.lang.String target,
ActorEvent event)
Delivers an ActorEvent to one or all of the Actors in this Scene. |
protected void |
eventDeliveryException(java.lang.Exception e)
Called when an Exception is thrown in the deliverEvent(String, ActorEvent) method during the delivery of of an ActorEvent. |
Actor |
getActor(java.lang.String name)
Provides the Actor with the given name. |
java.util.Iterator |
iterator()
Provides an Iterator that allows you to iterate over all the Actors in the Scene. |
protected void |
processEvent(ActorEvent event)
Processes Clock related events and sends them to this Scene's children. |
void |
removeActor(Actor actor)
Removes an Actor from this Scene. |
void |
removeActor(java.lang.String name)
Removes an Actor from this Scene, using it's name. |
void |
removeSceneListener(SceneListener listener)
Removes a SceneListener from the Scene. |
void |
replace(Scene scene)
Replaces this Scene with scene, moving Actor and SceneListener Objects over from one to the other. |
Methods inherited from class net.jinx.action.Actor |
---|
checkAllowAdd, getName, getOwner, hashCode, ownerChanged, sendEvent, sendEvent, sendEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Scene()
public Scene(java.lang.String name)
name
- the name that this Scene will be known by. This cannot be
null.Method Detail |
---|
public void addSceneListener(SceneListener listener)
listener
- the SceneListener to add.public void removeSceneListener(SceneListener listener)
listener
- the SceneListener to remove.public java.util.Iterator iterator()
public void addActor(Actor actor)
actor
- the Actor to add.
java.lang.IllegalArgumentException
- if an attempt is made to add a Scene to
itself or actor itself has rejected being placed in this Scene.public void removeActor(Actor actor)
actor
- the Actor to remove.public void removeActor(java.lang.String name)
name
- the name of the Actor to remove.public Actor getActor(java.lang.String name)
name
- the name of the Actor.
protected void deliverEvent(java.lang.String target, ActorEvent event)
target
- the name of the Actor to send the event to. If this is
"*", then event will be delivered to all of the Actors in the scene.event
- the ActorEvent to deliver.protected void eventDeliveryException(java.lang.Exception e)
e
- the Exception that was thrown.protected void processEvent(ActorEvent event)
processEvent
in class Actor
event
- the ActorEvent to process.public void replace(Scene scene)
scene
- the Scene object to replace this one with.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |