|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.huguesjohnson.tiamat.graphics.Map
public abstract class Map
class Map - abstract map
Field Summary | |
---|---|
protected java.lang.String |
absoluteDir
|
protected int |
height
|
protected java.lang.String |
name
|
protected int |
width
|
Constructor Summary | |
---|---|
Map()
Default constructor, creates an empty Map. |
Method Summary | |
---|---|
abstract void |
draw()
Draws the entire map. |
abstract void |
draw(int x,
int y)
Draws the entire map at location specified by (x,y). |
abstract void |
draw(int x1,
int y1,
int x2,
int y2)
Draws the map within the boundaries specified by (x1,y1) and (x2,y2). |
java.awt.Component |
getCanvas()
Returns the canvas for this Map. |
int |
getHeight()
Returns the height of the Map. |
java.lang.String |
getName()
Returns the name of the Map. |
int |
getWidth()
Returns the width of the Map. |
abstract void |
onDeserialize(Formatter formatter,
java.lang.String absoluteDir)
The onDeserialize event should be fired after an object is de-serialized. |
void |
setAbsoluteDir(java.lang.String absoluteDir)
|
void |
setCanvas(java.awt.Component canvas)
Sets the canvas for this Map. |
void |
setHeight(int height)
Sets the height of the Map. |
void |
setName(java.lang.String name)
Sets the name of the Map. |
void |
setWidth(int width)
Sets the width of the Map. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int height
protected int width
protected java.lang.String name
protected transient java.lang.String absoluteDir
Constructor Detail |
---|
public Map()
Method Detail |
---|
public int getHeight()
public void setHeight(int height)
height
- The new height of the Map.public int getWidth()
public void setWidth(int width)
width
- The new width of the Map.public java.lang.String getName()
public void setName(java.lang.String name)
name
- The new name of the Map.public java.awt.Component getCanvas()
public void setCanvas(java.awt.Component canvas)
canvas
- The new canvas for this Map.public void setAbsoluteDir(java.lang.String absoluteDir)
public java.lang.String toString()
toString
in class java.lang.Object
public abstract void draw()
draw
in interface Drawable
public abstract void draw(int x, int y)
draw
in interface Drawable
x
- The x co-ordinate.y
- The y co-ordinate.public abstract void draw(int x1, int y1, int x2, int y2)
draw
in interface Drawable
x1
- The x co-ordinate to start at.y1
- The y co-ordinate to start at.x2
- The x co-ordinate to end at.y2
- The y co-ordinate to end at.public abstract void onDeserialize(Formatter formatter, java.lang.String absoluteDir)
onDeserialize
in interface Storable
formatter
- The formatter to use to load any storable members.absoluteDir
- The working directory to use since all paths stored in the object should be relative.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |