com.threerings.tudey.client.sprite
Class Sprite

java.lang.Object
  extended by com.threerings.expr.SimpleScope
      extended by com.threerings.tudey.client.sprite.Sprite
All Implemented Interfaces:
Scope, ScopeUpdateListener
Direct Known Subclasses:
ActorSprite, EffectSprite, EntrySprite

public abstract class Sprite
extends SimpleScope

Represents a placeable object.


Field Summary
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
Sprite(TudeyContext ctx, TudeySceneView view)
          Creates a new sprite.
 
Method Summary
 Component createTooltipComponent(String tiptext)
          Creates a tooltip component for the sprite (will only be called if getTooltipText() returns true).
 boolean dispatchEvent(Event event)
          Dispatches an event on the sprite.
 int getFloorFlags()
          Returns the sprite's floor flags.
 int getFloorMask()
          Returns the sprite's floor mask.
 Model getModel()
          Returns the model associated with the sprite (if any).
 String getScopeName()
          Returns the name of this scope for purposes of qualification.
 String getTooltipText()
          Returns the sprite's tooltip text, or null for none.
 float getTooltipTimeout()
          Returns the sprite's tooltip timeout, or -1 to use the default.
 String getTooltipWindowStyle()
          Returns the sprite's tooltip window style.
 boolean isClickable()
          Determines whether the sprite is clickable.
 boolean isHoverable()
          Determines whether the sprite is hoverable (for purposes of in-game user interaction).
 void setVisible(boolean visible)
          Attempt to set the visibility of this sprite.
 
Methods inherited from class com.threerings.expr.SimpleScope
addListener, dispose, get, getParentScope, removeListener, scopeUpdated
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sprite

public Sprite(TudeyContext ctx,
              TudeySceneView view)
Creates a new sprite.

Method Detail

getFloorFlags

public int getFloorFlags()
Returns the sprite's floor flags.


getFloorMask

public int getFloorMask()
Returns the sprite's floor mask.


isHoverable

public boolean isHoverable()
Determines whether the sprite is hoverable (for purposes of in-game user interaction).


isClickable

public boolean isClickable()
Determines whether the sprite is clickable.


getTooltipText

public String getTooltipText()
Returns the sprite's tooltip text, or null for none.


getTooltipTimeout

public float getTooltipTimeout()
Returns the sprite's tooltip timeout, or -1 to use the default.


getTooltipWindowStyle

public String getTooltipWindowStyle()
Returns the sprite's tooltip window style.


createTooltipComponent

public Component createTooltipComponent(String tiptext)
Creates a tooltip component for the sprite (will only be called if getTooltipText() returns true).


getModel

public Model getModel()
Returns the model associated with the sprite (if any).


setVisible

public void setVisible(boolean visible)
Attempt to set the visibility of this sprite. No guarantees are made.


dispatchEvent

public boolean dispatchEvent(Event event)
Dispatches an event on the sprite.

Returns:
true if the sprite handled the event, false if it should be handled elsewhere.

getScopeName

public String getScopeName()
Description copied from interface: Scope
Returns the name of this scope for purposes of qualification. Can return null if qualified symbols cannot specifically address this scope.

Specified by:
getScopeName in interface Scope
Overrides:
getScopeName in class SimpleScope


Copyright © 2011. All Rights Reserved.