|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.stage.tools.editor.EditorModel
public class EditorModel
The EditorModel class provides a holding place for storing, modifying and retrieving data that is shared across the Editor application and its myriad UI components.
| Field Summary | |
|---|---|
protected int |
_fqTileId
The fully qualified tile id of the currently selected tile. |
protected List<EditorModelListener> |
_listeners
The model listeners. |
protected int |
_lnum
The currently selected layer number. |
protected int |
_mode
The currently selected action mode. |
protected int |
_objectGrip
Direction (which corner) we grip an object by. |
protected com.threerings.media.tile.Tile |
_tile
The currently selected tile for placement in the scene. |
protected int |
_tileIndex
The currently selected tile id. |
protected com.threerings.media.tile.TileManager |
_tilemgr
The tile manager. |
protected com.threerings.media.tile.TileSet |
_tileSet
The currently selected tileset. |
protected int |
_tileSetId
The currently selected tileset id. |
static int |
ACTION_EDIT_TILE
|
static int |
ACTION_PLACE_PORTAL
|
static int |
ACTION_PLACE_TILE
Action mode constants. |
static int |
BASE_LAYER
Miso layer constants. |
static String[] |
CMD_ACTIONS
String translations for action identifiers. |
static String[] |
LAYER_NAMES
|
static int |
NUM_ACTIONS
The number of actions. |
static int |
OBJECT_LAYER
|
static String[] |
TIP_ACTIONS
Prose descriptions of actions suitable for tool tip display. |
| Constructor Summary | |
|---|---|
EditorModel(com.threerings.media.tile.TileManager tilemgr)
|
|
| Method Summary | |
|---|---|
void |
addListener(EditorModelListener l)
Add an editor model listener. |
void |
clearTile()
Marks the currently selected tile as invalid such that editing when no tiles are available can be properly effected. |
int |
getActionMode()
Returns the current editor action mode. |
int |
getFQTileId()
Returns the fully qualified tile id of the currently selected tile. |
int |
getLayerIndex()
Returns the current scene layer index undergoing edit. |
int |
getObjectGripDirection()
Gets the direction in which we should grip objects. |
com.threerings.media.tile.Tile |
getTile()
Returns the currently selected tile for placement within the scene. |
int |
getTileId()
Returns the currently selected tile id within the selected tile set. |
com.threerings.media.tile.TileSet |
getTileSet()
Returns the currently selected tile set. |
int |
getTileSetId()
Returns the currently selected tile set id. |
boolean |
isTileValid()
Returns whether the currently selected tile is valid. |
protected void |
notifyListeners(int event)
Notify all model listeners that the editor model has changed. |
void |
setActionMode(String cmd)
Sets the editor action mode. |
void |
setLayerIndex(int lnum)
Sets the scene layer index undergoing edit. |
void |
setObjectGripDirection(int direction)
Sets the direction in which we should grip objects. |
void |
setTile(com.threerings.media.tile.TileSet set,
int tileSetId,
int tileIndex)
Sets the selected tile for placement within the scene. |
void |
setTileId(int tileIndex)
Sets the tile id of the tile selected for placement within the scene. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int ACTION_PLACE_TILE
public static final int ACTION_EDIT_TILE
public static final int ACTION_PLACE_PORTAL
public static final int NUM_ACTIONS
public static final int BASE_LAYER
public static final int OBJECT_LAYER
public static final String[] LAYER_NAMES
public static final String[] TIP_ACTIONS
public static final String[] CMD_ACTIONS
protected int _mode
protected com.threerings.media.tile.TileSet _tileSet
protected int _tileSetId
protected int _tileIndex
protected int _fqTileId
protected int _lnum
protected com.threerings.media.tile.Tile _tile
protected List<EditorModelListener> _listeners
protected com.threerings.media.tile.TileManager _tilemgr
protected int _objectGrip
| Constructor Detail |
|---|
public EditorModel(com.threerings.media.tile.TileManager tilemgr)
| Method Detail |
|---|
public void addListener(EditorModelListener l)
l - the listener.protected void notifyListeners(int event)
public boolean isTileValid()
public int getActionMode()
public int getLayerIndex()
public com.threerings.media.tile.TileSet getTileSet()
public int getTileSetId()
public int getTileId()
public com.threerings.media.tile.Tile getTile()
public int getFQTileId()
public void clearTile()
public void setActionMode(String cmd)
CMD_ACTIONS.
public void setLayerIndex(int lnum)
public void setTile(com.threerings.media.tile.TileSet set,
int tileSetId,
int tileIndex)
public void setTileId(int tileIndex)
public void setObjectGripDirection(int direction)
public int getObjectGripDirection()
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||