com.threerings.tudey.client.sprite
Class PlaceableSprite.ClickableProp

java.lang.Object
  extended by com.threerings.expr.SimpleScope
      extended by com.threerings.tudey.client.sprite.PlaceableSprite.Implementation
          extended by com.threerings.tudey.client.sprite.PlaceableSprite.Original
              extended by com.threerings.tudey.client.sprite.PlaceableSprite.Prop
                  extended by com.threerings.tudey.client.sprite.PlaceableSprite.ClickableProp
All Implemented Interfaces:
Scope, ScopeUpdateListener
Enclosing class:
PlaceableSprite

public static class PlaceableSprite.ClickableProp
extends PlaceableSprite.Prop

A prop that may be clicked to perform some action.


Field Summary
protected  PlaceableConfig.ClickableProp _config
          The prop configuration.
protected  ColorState _cstate
          The color state.
protected  Animation _defaultAnim
          The default and hover animations, if any.
protected  boolean _hover
          Whether or not the hover state is active.
protected  Animation _hoverAnim
          The default and hover animations, if any.
protected  TudeySceneView _view
          The containing view.
 
Fields inherited from class com.threerings.tudey.client.sprite.PlaceableSprite.Original
_ctx, _footprint, _model, _scene
 
Fields inherited from class com.threerings.expr.SimpleScope
_parentScope
 
Fields inherited from interface com.threerings.expr.Scope
EPOCH, NOW
 
Constructor Summary
PlaceableSprite.ClickableProp(TudeyContext ctx, Scope parentScope, PlaceableConfig.ClickableProp config)
          Creates a new clickable prop implementation.
 
Method Summary
 boolean dispatchEvent(Event event)
          Dispatches an event on the implementation.
 boolean isClickable()
          Determines whether the implementation is clickable.
 boolean isHoverable()
          Determines whether the implementation is hoverable.
 void setConfig(PlaceableConfig.Original config)
          (Re)configures the implementation.
protected  void setHover(boolean hover)
          Sets the hover state.
 
Methods inherited from class com.threerings.tudey.client.sprite.PlaceableSprite.Prop
getFloorFlags
 
Methods inherited from class com.threerings.tudey.client.sprite.PlaceableSprite.Original
createTooltipComponent, dispose, getModel, getModelConfig, update
 
Methods inherited from class com.threerings.tudey.client.sprite.PlaceableSprite.Implementation
getScopeName, getTooltipText, getTooltipTimeout, getTooltipWindowStyle
 
Methods inherited from class com.threerings.expr.SimpleScope
addListener, get, getParentScope, removeListener, scopeUpdated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_config

protected PlaceableConfig.ClickableProp _config
The prop configuration.


_cstate

protected ColorState _cstate
The color state.


_defaultAnim

protected Animation _defaultAnim
The default and hover animations, if any.


_hoverAnim

protected Animation _hoverAnim
The default and hover animations, if any.


_hover

protected boolean _hover
Whether or not the hover state is active.


_view

@Bound
protected TudeySceneView _view
The containing view.

Constructor Detail

PlaceableSprite.ClickableProp

public PlaceableSprite.ClickableProp(TudeyContext ctx,
                                     Scope parentScope,
                                     PlaceableConfig.ClickableProp config)
Creates a new clickable prop implementation.

Method Detail

setConfig

public void setConfig(PlaceableConfig.Original config)
Description copied from class: PlaceableSprite.Original
(Re)configures the implementation.

Overrides:
setConfig in class PlaceableSprite.Prop

isHoverable

public boolean isHoverable()
Description copied from class: PlaceableSprite.Implementation
Determines whether the implementation is hoverable.

Overrides:
isHoverable in class PlaceableSprite.Implementation

isClickable

public boolean isClickable()
Description copied from class: PlaceableSprite.Implementation
Determines whether the implementation is clickable.

Overrides:
isClickable in class PlaceableSprite.Implementation

dispatchEvent

public boolean dispatchEvent(Event event)
Description copied from class: PlaceableSprite.Implementation
Dispatches an event on the implementation.

Overrides:
dispatchEvent in class PlaceableSprite.Implementation
Returns:
true if the implementation handled the event, false if it should be handled elsewhere.

setHover

protected void setHover(boolean hover)
Sets the hover state.