|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.stage.util.PlacementConstraints
public class PlacementConstraints
Maintains extra information on objects in a scene and checks proposed placement operations for constraint violations. When the constraints object is in use, all placement operations (object additions and removals) must go through the constraints object so that the object's internal state remains consistent.
| Field Summary |
|---|
| Fields inherited from interface com.threerings.util.DirectionCodes |
|---|
CARDINAL_DIRECTIONS, CCW, CW, DIRECTION_COUNT, DOWN, EAST, EASTNORTHEAST, EASTSOUTHEAST, FINE_DIRECTION_COUNT, HORIZONTAL, LEFT, NONE, NORTH, NORTHEAST, NORTHNORTHEAST, NORTHNORTHWEST, NORTHWEST, RIGHT, SOUTH, SOUTHEAST, SOUTHSOUTHEAST, SOUTHSOUTHWEST, SOUTHWEST, UP, VERTICAL, WEST, WESTNORTHWEST, WESTSOUTHWEST |
| Fields inherited from interface com.threerings.stage.data.StageCodes |
|---|
ERR_CANNOT_CLUSTER, ERR_NO_OVERLAP, MODIFY_SCENE_ACCESS, MUTILATE_SCENE_ACCESS, STAGE_MESSAGE_BUNDLE, TILESET_RSRC_SET |
| Fields inherited from interface com.threerings.presents.data.InvocationCodes |
|---|
ACCESS_DENIED, E_ACCESS_DENIED, E_INTERNAL_ERROR, GLOBAL_GROUP, INTERNAL_ERROR |
| Constructor Summary | |
|---|---|
PlacementConstraints(com.threerings.media.tile.TileManager tilemgr,
StageScene scene)
Default constructor. |
|
| Method Summary | |
|---|---|
void |
addObject(com.threerings.miso.data.ObjectInfo info)
Adds the specified object through the constraints. |
String |
allowAddObject(com.threerings.miso.data.ObjectInfo info)
Determines whether the constraints allow the specified object to be added to the scene. |
String |
allowModifyObjects(com.threerings.miso.data.ObjectInfo[] added,
com.threerings.miso.data.ObjectInfo[] removed)
Determines whether the constraints allow the specified objects to be added and removed simultaneously. |
String |
allowRemoveObject(com.threerings.miso.data.ObjectInfo info)
Determines whether the constraints allow the specified object to be removed from the scene. |
void |
removeObject(com.threerings.miso.data.ObjectInfo info)
Removes the specified object through the constraints. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PlacementConstraints(com.threerings.media.tile.TileManager tilemgr,
StageScene scene)
| Method Detail |
|---|
public String allowAddObject(com.threerings.miso.data.ObjectInfo info)
null if the constraints allow the operation,
otherwise a translatable string explaining why the object can't be
addedpublic void addObject(com.threerings.miso.data.ObjectInfo info)
public String allowRemoveObject(com.threerings.miso.data.ObjectInfo info)
null if the constraints allow the operation,
otherwise a translatable string explaining why the object can't be
removedpublic void removeObject(com.threerings.miso.data.ObjectInfo info)
public String allowModifyObjects(com.threerings.miso.data.ObjectInfo[] added,
com.threerings.miso.data.ObjectInfo[] removed)
null if the constraints allow the operation,
otherwise a translatable string explaining why the objects can't be
modified
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||