com.threerings.tudey.client
Class TudeySceneController

java.lang.Object
  extended by com.samskivert.swing.Controller
      extended by com.threerings.crowd.client.PlaceController
          extended by com.threerings.whirled.client.SceneController
              extended by com.threerings.tudey.client.TudeySceneController
All Implemented Interfaces:
ComponentListener, MouseListener, MouseMotionListener, MouseWheelListener, PseudoKeys.Observer, Tickable, com.threerings.presents.dobj.ChangeListener, com.threerings.presents.dobj.MessageListener, SceneDeltaListener, ActionListener, EventListener
Direct Known Subclasses:
ToolSceneController

public class TudeySceneController
extends com.threerings.whirled.client.SceneController
implements SceneDeltaListener, com.threerings.presents.dobj.MessageListener, PseudoKeys.Observer, MouseListener, MouseMotionListener, MouseWheelListener, Tickable

The basic Tudey scene controller class.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.crowd.client.PlaceController
com.threerings.crowd.client.PlaceController.DelegateOp
 
Field Summary
 
Fields inherited from class com.samskivert.swing.Controller
DISPATCHER
 
Constructor Summary
TudeySceneController()
           
 
Method Summary
 void controlledActorAdded(int timestamp, Actor actor)
          Called by the view when we first add our controlled actor.
 void controlledActorUpdated(int timestamp, Actor actor)
          Called by the view when we receive an update for our controlled actor.
 void controlledSpriteRemoved(long timestamp)
          Called by the view when we remove our controlled sprite.
 void didLeavePlace(com.threerings.crowd.data.PlaceObject plobj)
           
 int getControlledId()
          Returns the id of the actor that is being controlled.
 Sprite getHoverSprite()
          Returns a reference to the hover sprite, if any.
 int getTargetId()
          Returns the id of the actor that the camera should track.
 int getTransmitInterval()
          Returns the interval at which we transmit our input frames.
 boolean isControlledId(int actorId)
          Checks whether the specified actor id is that of the controlled target.
 void keyPressed(long when, int key, float amount)
          Called when a "key" (either a real key or a pseudo-key) is pressed.
 void keyReleased(long when, int key)
          Called when a "key" is released.
 void messageReceived(com.threerings.presents.dobj.MessageEvent event)
           
 void mouseClicked(MouseEvent event)
          Dispatched when a button is clicked within the bounds of the target component.
 void mouseDragged(MouseEvent event)
          Dispatched when the mouse is moved after a button having been pressed within the bounds of the target component.
 void mouseEntered(MouseEvent event)
          Dispatched when the mouse enters the bounds of the target component.
 void mouseExited(MouseEvent event)
          Dispatched when the mouse exits the bounds of the target component.
 void mouseMoved(MouseEvent event)
          Dispatched when the mouse is moved within the bounds of the target component.
 void mousePressed(MouseEvent event)
          Dispatched when a button is pressed within the bounds of the target component.
 void mouseReleased(MouseEvent event)
          Dispatched when a button is released after having been pressed within the bounds of the target component.
 void mouseWheeled(MouseEvent event)
          Dispatched when the mouse wheel is rotated within the bounds of the target component.
 void sceneDeltaReceived(SceneDeltaEvent event)
          Called when a scene delta has been received.
 void submitRequest(Sprite source, String name)
          Submits a named request to the server.
 void tick(float elapsed)
          Updates the state of this object based on the elapsed time in seconds.
 void wasAdded()
           
 void wasRemoved()
           
 void willEnterPlace(com.threerings.crowd.data.PlaceObject plobj)
           
 
Methods inherited from class com.threerings.whirled.client.SceneController
init
 
Methods inherited from class com.threerings.crowd.client.PlaceController
getPlaceConfig, getPlaceView, handleAction, mayLeavePlace
 
Methods inherited from class com.samskivert.swing.Controller
actionPerformed, configureAction, createActionButton, handleAction, handleAction, handleAction, postAction, postAction, postAction, setControlledPanel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TudeySceneController

public TudeySceneController()
Method Detail

getTransmitInterval

public int getTransmitInterval()
Returns the interval at which we transmit our input frames.


getTargetId

public int getTargetId()
Returns the id of the actor that the camera should track.


getControlledId

public int getControlledId()
Returns the id of the actor that is being controlled.


isControlledId

public boolean isControlledId(int actorId)
Checks whether the specified actor id is that of the controlled target.


getHoverSprite

public Sprite getHoverSprite()
Returns a reference to the hover sprite, if any.


controlledActorAdded

public void controlledActorAdded(int timestamp,
                                 Actor actor)
Called by the view when we first add our controlled actor.


controlledActorUpdated

public void controlledActorUpdated(int timestamp,
                                   Actor actor)
Called by the view when we receive an update for our controlled actor.


controlledSpriteRemoved

public void controlledSpriteRemoved(long timestamp)
Called by the view when we remove our controlled sprite.


submitRequest

public void submitRequest(Sprite source,
                          String name)
Submits a named request to the server.


sceneDeltaReceived

public void sceneDeltaReceived(SceneDeltaEvent event)
Description copied from interface: SceneDeltaListener
Called when a scene delta has been received.

Specified by:
sceneDeltaReceived in interface SceneDeltaListener

messageReceived

public void messageReceived(com.threerings.presents.dobj.MessageEvent event)
Specified by:
messageReceived in interface com.threerings.presents.dobj.MessageListener

keyPressed

public void keyPressed(long when,
                       int key,
                       float amount)
Description copied from interface: PseudoKeys.Observer
Called when a "key" (either a real key or a pseudo-key) is pressed.

Specified by:
keyPressed in interface PseudoKeys.Observer

keyReleased

public void keyReleased(long when,
                        int key)
Description copied from interface: PseudoKeys.Observer
Called when a "key" is released.

Specified by:
keyReleased in interface PseudoKeys.Observer

mousePressed

public void mousePressed(MouseEvent event)
Description copied from interface: MouseListener
Dispatched when a button is pressed within the bounds of the target component.

Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent event)
Description copied from interface: MouseListener
Dispatched when a button is released after having been pressed within the bounds of the target component.

Specified by:
mouseReleased in interface MouseListener

mouseClicked

public void mouseClicked(MouseEvent event)
Description copied from interface: MouseListener
Dispatched when a button is clicked within the bounds of the target component.

Specified by:
mouseClicked in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent event)
Description copied from interface: MouseListener
Dispatched when the mouse enters the bounds of the target component.

Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent event)
Description copied from interface: MouseListener
Dispatched when the mouse exits the bounds of the target component.

Specified by:
mouseExited in interface MouseListener

mouseMoved

public void mouseMoved(MouseEvent event)
Description copied from interface: MouseMotionListener
Dispatched when the mouse is moved within the bounds of the target component.

Specified by:
mouseMoved in interface MouseMotionListener

mouseDragged

public void mouseDragged(MouseEvent event)
Description copied from interface: MouseMotionListener
Dispatched when the mouse is moved after a button having been pressed within the bounds of the target component.

Specified by:
mouseDragged in interface MouseMotionListener

mouseWheeled

public void mouseWheeled(MouseEvent event)
Description copied from interface: MouseWheelListener
Dispatched when the mouse wheel is rotated within the bounds of the target component.

Specified by:
mouseWheeled in interface MouseWheelListener

tick

public void tick(float elapsed)
Description copied from interface: Tickable
Updates the state of this object based on the elapsed time in seconds.

Specified by:
tick in interface Tickable

wasAdded

public void wasAdded()
Overrides:
wasAdded in class Controller

wasRemoved

public void wasRemoved()
Overrides:
wasRemoved in class Controller

willEnterPlace

public void willEnterPlace(com.threerings.crowd.data.PlaceObject plobj)
Overrides:
willEnterPlace in class com.threerings.whirled.client.SceneController

didLeavePlace

public void didLeavePlace(com.threerings.crowd.data.PlaceObject plobj)
Overrides:
didLeavePlace in class com.threerings.whirled.client.SceneController


Copyright © 2011. All Rights Reserved.