|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--tempusmud.carto.map.RoomConstants | +--tempusmud.carto.map.CartoMap
The cartograph Map
Inner Class Summary | |
(package private) static class |
CartoMap.AStarNode
AStarNode used for buildPath. |
Field Summary | |
static long |
serialVersionUID
force serialazation compatibility |
Fields inherited from class tempusmud.carto.map.RoomConstants |
dirs,
doorFlags,
flowTypes,
roomFlags,
sectorColors,
sectorTypes |
Constructor Summary | |
protected |
CartoMap()
no-arg constructor for serialization |
|
CartoMap(java.lang.String name,
int vnum,
int x,
int y)
constructor |
Method Summary | |
void |
addMapListener(CartoMapListener l)
register a listener for map (change) events |
boolean |
addRoom(Room room)
add a room |
(package private) void |
addVertexElements(java.util.Vector v)
add some vertexes to the map matrix. |
java.util.Vector |
buildPath(java.awt.Point srcPoint,
java.awt.Point dstPoint,
int srcDir,
int dstDir)
A-Star path building implementation. |
void |
clearLabels()
|
MapElement |
elementAt(int x,
int y)
get the element at |
MapElement |
elementAt(java.awt.Point p)
get the element at |
boolean |
exportMudCommands(java.lang.String fname)
dump a file full of tempus OLC commands into the file named by fname |
java.lang.String |
getName()
get the name of the map |
Exit |
getSelectedExit()
get the currently selected exit |
Room |
getSelectedRoom()
get the currently selected room |
java.awt.Rectangle |
getSize()
get the map-coordinate-space rectangle that represents the size of the map |
Box |
getWorkingExtent()
This returns an unusual rectangle. |
boolean |
isEdge(java.awt.Point p)
determines if a given point is outside the map or already occupied by a MapElement |
void |
issueNotify()
force a maplistener notification |
void |
issueNotify(java.awt.Rectangle clip)
force a maplistener notification |
boolean |
moveRoom(Room r,
java.awt.Point newPos)
puts an event on the list |
static CartoMap |
open(java.lang.String filename)
read the map from a file named by filename, using serialization |
void |
purge()
|
void |
removeMapElement(MapElement elem,
boolean silent)
|
void |
removeMapListener(CartoMapListener l)
register a listener for map (change) events |
Room[] |
removeRoom(Room room)
remove a room |
(package private) void |
removeVertexElements(java.util.Vector v)
remove some vertexes from the map matrix. |
Room |
roomAt(int x,
int y)
obtain the room at |
Room |
roomAt(java.awt.Point p)
obtain the room at |
(package private) void |
roomChanged(Room r)
a property of the room has changed ( e.g. |
boolean |
saveAs(java.lang.String filename)
save the map into a file named by filename, using serialization |
void |
setSelectedExit(Exit ex)
puts an event on the list, selects a room if needed |
void |
setSelectedRoom(Room r)
puts an event on the list |
(package private) void |
stretchWorkingExtent(java.awt.Point p)
stretch the working extent to include p TODO: change working extent to be a standard AWT rectangle! |
Methods inherited from class tempusmud.carto.map.RoomConstants |
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final long serialVersionUID
Constructor Detail |
protected CartoMap()
public CartoMap(java.lang.String name, int vnum, int x, int y)
Method Detail |
public void purge()
public void issueNotify(java.awt.Rectangle clip)
public void issueNotify()
void roomChanged(Room r)
public Room getSelectedRoom()
public Exit getSelectedExit()
public java.lang.String getName()
public void setSelectedRoom(Room r)
public void setSelectedExit(Exit ex)
public boolean moveRoom(Room r, java.awt.Point newPos)
public void addMapListener(CartoMapListener l)
public void removeMapListener(CartoMapListener l)
public final java.awt.Rectangle getSize()
public final Box getWorkingExtent()
public final MapElement elementAt(java.awt.Point p)
public final MapElement elementAt(int x, int y)
public final Room roomAt(java.awt.Point p)
public final Room roomAt(int x, int y)
final void stretchWorkingExtent(java.awt.Point p)
public final boolean addRoom(Room room)
public final Room[] removeRoom(Room room)
public final void removeMapElement(MapElement elem, boolean silent)
public java.util.Vector buildPath(java.awt.Point srcPoint, java.awt.Point dstPoint, int srcDir, int dstDir)
srcDir
- the preferred direction to search FROM the srcPointdstDir
- the preferred direction to search FROM the dstPointpublic boolean isEdge(java.awt.Point p)
public void clearLabels()
public boolean saveAs(java.lang.String filename)
public static CartoMap open(java.lang.String filename)
public boolean exportMudCommands(java.lang.String fname)
void addVertexElements(java.util.Vector v)
v
- a Vector of Vertexvoid removeVertexElements(java.util.Vector v)
v
- a Vector of Vertex
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |