com.threerings.parlor.card.client
Class CardPanel.HandSpriteObserver

java.lang.Object
  extended by com.threerings.media.sprite.PathAdapter
      extended by com.threerings.parlor.card.client.CardPanel.HandSpriteObserver
All Implemented Interfaces:
com.threerings.media.sprite.PathObserver, CardSpriteObserver
Enclosing class:
CardPanel

protected class CardPanel.HandSpriteObserver
extends com.threerings.media.sprite.PathAdapter
implements CardSpriteObserver

Listens for interactions with cards in hand.


Constructor Summary
protected CardPanel.HandSpriteObserver()
           
 
Method Summary
 void cardSpriteClicked(CardSprite sprite, MouseEvent me)
          Notifies the observer that the user clicked a card sprite.
 void cardSpriteDragged(CardSprite sprite, MouseEvent me)
          Notifies the observer that the user dragged a card sprite to a new location.
 void cardSpriteEntered(CardSprite sprite, MouseEvent me)
          Notifies the observer that the user moved the mouse pointer onto a card sprite.
 void cardSpriteExited(CardSprite sprite, MouseEvent me)
          Notifies the observer that the user moved the mouse pointer off of a card sprite.
protected  void maybeUpdateOffset(CardSprite sprite)
           
 void pathCompleted(com.threerings.media.sprite.Sprite sprite, com.threerings.media.util.Path path, long when)
           
 
Methods inherited from class com.threerings.media.sprite.PathAdapter
pathCancelled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CardPanel.HandSpriteObserver

protected CardPanel.HandSpriteObserver()
Method Detail

pathCompleted

public void pathCompleted(com.threerings.media.sprite.Sprite sprite,
                          com.threerings.media.util.Path path,
                          long when)
Specified by:
pathCompleted in interface com.threerings.media.sprite.PathObserver
Overrides:
pathCompleted in class com.threerings.media.sprite.PathAdapter

cardSpriteClicked

public void cardSpriteClicked(CardSprite sprite,
                              MouseEvent me)
Description copied from interface: CardSpriteObserver
Notifies the observer that the user clicked a card sprite.

Specified by:
cardSpriteClicked in interface CardSpriteObserver
Parameters:
sprite - the dragged sprite
me - the mouse event associated with the drag

cardSpriteEntered

public void cardSpriteEntered(CardSprite sprite,
                              MouseEvent me)
Description copied from interface: CardSpriteObserver
Notifies the observer that the user moved the mouse pointer onto a card sprite.

Specified by:
cardSpriteEntered in interface CardSpriteObserver
Parameters:
sprite - the entered sprite
me - the mouse event associated with the entrance

cardSpriteExited

public void cardSpriteExited(CardSprite sprite,
                             MouseEvent me)
Description copied from interface: CardSpriteObserver
Notifies the observer that the user moved the mouse pointer off of a card sprite.

Specified by:
cardSpriteExited in interface CardSpriteObserver
Parameters:
sprite - the exited the sprite
me - the mouse event associated with the exit

cardSpriteDragged

public void cardSpriteDragged(CardSprite sprite,
                              MouseEvent me)
Description copied from interface: CardSpriteObserver
Notifies the observer that the user dragged a card sprite to a new location.

Specified by:
cardSpriteDragged in interface CardSpriteObserver
Parameters:
sprite - the dragged sprite
me - the mouse event associated with the drag

maybeUpdateOffset

protected void maybeUpdateOffset(CardSprite sprite)