|
|||||||||
| 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.PathSprite
public class PathSprite
Represents a path entry.
| Nested Class Summary | |
|---|---|
static class |
PathSprite.Implementation
The actual sprite implementation. |
static class |
PathSprite.Original
An original implementation. |
| Field Summary | |
|---|---|
protected PathConfig |
_config
The path configuration. |
protected TudeySceneModel.PathEntry |
_entry
The scene entry. |
protected PathSprite.Implementation |
_impl
The path implementation. |
static String |
EDGE_MODEL
The name of the model to use to represent path and area edges. |
protected static PathConfig |
INVALID_CONFIG
An invalid config used to force an initial update. |
protected static PathSprite.Implementation |
NULL_IMPLEMENTATION
An implementation that does nothing. |
static String |
VERTEX_MODEL
The name of the model to use to represent path and area vertices. |
| 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 | |
|---|---|
PathSprite(TudeyContext ctx,
TudeySceneView view,
TudeySceneModel.PathEntry entry)
Creates a new path sprite. |
|
| Method Summary | |
|---|---|
void |
configUpdated(ConfigEvent<PathConfig> event)
Called when a configuration has been updated. |
void |
dispose()
Releases the resources associated with this scope. |
int |
getEdgeIndex(Model model)
Returns the index of the specified model within the list of edge models, or -1 if it is not an edge. |
TudeySceneModel.Entry |
getEntry()
Returns a reference to the most recently set entry state. |
int |
getVertexIndex(Model model)
Returns the index of the specified model within the list of vertex models, or -1 if it is not a vertex. |
static Model[] |
maybeResize(Model[] omodels,
int ncount,
TudeyContext ctx,
Scene scene,
String name,
ColorState colorState,
Object userObject)
Resizes the specified array of models if necessary, adding new models or removing models as required. |
void |
scopeUpdated(ScopeEvent event)
Called when the scope has been updated. |
protected void |
setConfig(ConfigReference<PathConfig> ref)
Sets the configuration of this path. |
protected void |
setConfig(PathConfig config)
Sets the configuration of this path. |
void |
setSelected(boolean selected)
Sets whether or not this sprite is selected. |
void |
setVisible(boolean visible)
Attempt to set the visibility of this sprite. |
void |
update(TudeySceneModel.Entry entry)
Updates the sprite with new entry state. |
static void |
updateEdges(TudeySceneModel.Vertex[] vertices,
Model[] models)
Updates the supplied array of edge models based on the vertex state. |
protected void |
updateFromConfig()
Updates the path to match its new or modified configuration. |
static float |
updateVertices(TudeySceneModel.Vertex[] vertices,
Model[] models)
Updates the supplied array of vertex models based on the vertex state. |
| Methods inherited from class com.threerings.tudey.client.sprite.EntrySprite |
|---|
isSelected |
| Methods inherited from class com.threerings.tudey.client.sprite.Sprite |
|---|
createTooltipComponent, dispatchEvent, getFloorFlags, getFloorMask, getModel, getScopeName, getTooltipText, getTooltipTimeout, getTooltipWindowStyle, isClickable, isHoverable |
| Methods inherited from class com.threerings.expr.SimpleScope |
|---|
addListener, get, getParentScope, removeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VERTEX_MODEL
public static final String EDGE_MODEL
protected TudeySceneModel.PathEntry _entry
protected PathConfig _config
protected PathSprite.Implementation _impl
protected static PathConfig INVALID_CONFIG
protected static final PathSprite.Implementation NULL_IMPLEMENTATION
| Constructor Detail |
|---|
public PathSprite(TudeyContext ctx,
TudeySceneView view,
TudeySceneModel.PathEntry entry)
| Method Detail |
|---|
public static float updateVertices(TudeySceneModel.Vertex[] vertices,
Model[] models)
public static void updateEdges(TudeySceneModel.Vertex[] vertices,
Model[] models)
public static Model[] maybeResize(Model[] omodels,
int ncount,
TudeyContext ctx,
Scene scene,
String name,
ColorState colorState,
Object userObject)
public int getVertexIndex(Model model)
public int getEdgeIndex(Model model)
public void configUpdated(ConfigEvent<PathConfig> event)
ConfigUpdateListener
configUpdated in interface ConfigUpdateListener<PathConfig>public void scopeUpdated(ScopeEvent event)
ScopeUpdateListener
scopeUpdated in interface ScopeUpdateListenerscopeUpdated in class SimpleScopepublic TudeySceneModel.Entry getEntry()
EntrySprite
getEntry in class EntrySpritepublic void update(TudeySceneModel.Entry entry)
EntrySprite
update in class EntrySpritepublic void setVisible(boolean visible)
Sprite
setVisible in class Spritepublic void setSelected(boolean selected)
EntrySprite
setSelected in class EntrySpritepublic void dispose()
SimpleScope
dispose in class SimpleScopeprotected void setConfig(ConfigReference<PathConfig> ref)
protected void setConfig(PathConfig config)
protected void updateFromConfig()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||