|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.expr.SimpleScope
com.threerings.tudey.client.sprite.Sprite
com.threerings.tudey.client.sprite.EntrySprite
com.threerings.tudey.client.sprite.TileSprite
public class TileSprite
Represents a tile.
| Nested Class Summary | |
|---|---|
static class |
TileSprite.Implementation
The actual sprite implementation. |
static class |
TileSprite.Original
An original implementation. |
| Field Summary | |
|---|---|
protected TileConfig |
_config
The tile configuration. |
protected TudeySceneModel.TileEntry |
_entry
The scene entry. |
protected TileSprite.Implementation |
_impl
The tile implementation. |
protected static TileConfig |
INVALID_CONFIG
An invalid config used to force an initial update. |
protected static TileSprite.Implementation |
NULL_IMPLEMENTATION
An implementation that does nothing. |
| Fields inherited from class com.threerings.tudey.client.sprite.EntrySprite |
|---|
_selected, SELECTED_COLOR |
| Fields inherited from class com.threerings.tudey.client.sprite.Sprite |
|---|
_ctx, _view |
| Fields inherited from class com.threerings.expr.SimpleScope |
|---|
_parentScope |
| Fields inherited from interface com.threerings.expr.Scope |
|---|
EPOCH, NOW |
| Constructor Summary | |
|---|---|
TileSprite(TudeyContext ctx,
TudeySceneView view,
TudeySceneModel.TileEntry entry)
Creates a new tile sprite. |
|
| Method Summary | |
|---|---|
void |
configUpdated(ConfigEvent<TileConfig> event)
Called when a configuration has been updated. |
void |
dispose()
Releases the resources associated with this scope. |
TudeySceneModel.Entry |
getEntry()
Returns a reference to the most recently set entry state. |
int |
getFloorFlags()
Returns the sprite's floor flags. |
Model |
getModel()
Returns the model associated with the sprite (if any). |
protected void |
setConfig(ConfigReference<TileConfig> ref)
Sets the configuration of this tile. |
protected void |
setConfig(TileConfig config)
Sets the configuration of this tile. |
void |
setSelected(boolean selected)
Sets whether or not this sprite is selected. |
void |
update(TudeySceneModel.Entry entry)
Updates the sprite with new entry state. |
protected void |
updateFromConfig()
Updates the tile to match its new or modified configuration. |
| Methods inherited from class com.threerings.tudey.client.sprite.EntrySprite |
|---|
isSelected |
| Methods inherited from class com.threerings.tudey.client.sprite.Sprite |
|---|
createTooltipComponent, dispatchEvent, getFloorMask, getScopeName, getTooltipText, getTooltipTimeout, getTooltipWindowStyle, isClickable, isHoverable, setVisible |
| 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 |
|---|
protected TudeySceneModel.TileEntry _entry
protected TileConfig _config
protected TileSprite.Implementation _impl
protected static TileConfig INVALID_CONFIG
protected static final TileSprite.Implementation NULL_IMPLEMENTATION
| Constructor Detail |
|---|
public TileSprite(TudeyContext ctx,
TudeySceneView view,
TudeySceneModel.TileEntry entry)
| Method Detail |
|---|
public void configUpdated(ConfigEvent<TileConfig> event)
ConfigUpdateListener
configUpdated in interface ConfigUpdateListener<TileConfig>public int getFloorFlags()
Sprite
getFloorFlags in class Spritepublic TudeySceneModel.Entry getEntry()
EntrySprite
getEntry in class EntrySpritepublic void update(TudeySceneModel.Entry entry)
EntrySprite
update in class EntrySpritepublic Model getModel()
Sprite
getModel in class Spritepublic void setSelected(boolean selected)
EntrySprite
setSelected in class EntrySpritepublic void dispose()
SimpleScope
dispose in class SimpleScopeprotected void setConfig(ConfigReference<TileConfig> ref)
protected void setConfig(TileConfig config)
protected void updateFromConfig()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||