|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alienfactory.javamappy.MapObject
public class MapObject
A simple bean class which represents a MapObject
as used by
Mappy
.
The Object structure for the MapWin32 Pro editor version.
A MapObject
may contain multiple images or a tile graphic,
7 fields of User data and 8 other flags.
Field Summary | |
---|---|
static int |
BACKGROUND
A MapObject image layer used to get / set its image index. |
static int |
FLAG1
A User defined flag. |
static int |
FLAG2
A User defined flag. |
static int |
FLAG3
A User defined flag. |
static int |
FLAG4
A User defined flag. |
static int |
FLAG5
A User defined flag. |
static int |
FLAG6
A User defined flag. |
static int |
FLAG7
A User defined flag. |
static int |
FLAG8
A User defined flag. |
static int |
FOREGROUND1
A MapObject image layer used to get / set its image index. |
static int |
FOREGROUND2
A MapObject image layer used to get / set its image index. |
static int |
FOREGROUND3
A MapObject image layer used to get / set its image index. |
static int |
MAX_USER_DATA
A minimum index for User Data. |
static int |
MIN_USER_DATA
A minimum index for User Data. |
Constructor Summary | |
---|---|
MapObject()
|
Method Summary | |
---|---|
boolean |
getFlag(int flag)
Returns the specified flag. |
int |
getGfxId()
|
int |
getGHandleXOff()
|
int |
getGHandleYOff()
|
int |
getGHeight()
|
int |
getGWidth()
|
int |
getGXOffset()
|
int |
getGYOffset()
|
int |
getImageIndex(int imageLayer)
Returns the image index of the given MapObject layer. |
int |
getShow()
|
java.lang.String |
getTextString()
Returns the text string associated with this MapObject. |
int |
getTileId()
|
int |
getUserData(int index)
Returns the specified User Data. |
int |
getX()
|
int |
getY()
|
void |
setFlag(int flag,
boolean newFlag)
Sets the specified flag to the given boolean value. |
void |
setGfxId(int i)
|
void |
setGHandleXOff(int i)
|
void |
setGHandleYOff(int i)
|
void |
setGHeight(int i)
|
void |
setGWidth(int i)
|
void |
setGXOffset(int i)
|
void |
setGYOffset(int i)
|
void |
setImageIndex(int imageLayer,
int newImageIndex)
Sets the image index of the given MapObject layer. |
void |
setShow(int i)
|
void |
setTextString(java.lang.String textString)
Sets the text string associated with this MapObject. |
void |
setTileId(int i)
|
void |
setUserData(int index,
int newUserData)
Sets the specified User Data. |
void |
setX(int x)
|
void |
setY(int y)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BACKGROUND
MapObject
image layer used to get / set its image index. 0
.
setImageIndex(int, int)
,
getImageIndex(int)
,
Constant Field Valuespublic static final int FOREGROUND1
MapObject
image layer used to get / set its image index. 1
.
setImageIndex(int, int)
,
getImageIndex(int)
,
Constant Field Valuespublic static final int FOREGROUND2
MapObject
image layer used to get / set its image index. 2
.
setImageIndex(int, int)
,
getImageIndex(int)
,
Constant Field Valuespublic static final int FOREGROUND3
MapObject
image layer used to get / set its image index. 3
.
setImageIndex(int, int)
,
getImageIndex(int)
,
Constant Field Valuespublic static final int MIN_USER_DATA
1
.
setUserData(int, int)
,
getUserData(int)
,
Constant Field Valuespublic static final int MAX_USER_DATA
7
.
setUserData(int, int)
,
getUserData(int)
,
Constant Field Valuespublic static final int FLAG1
0
.
setFlag(int, boolean)
,
getFlag(int)
,
Constant Field Valuespublic static final int FLAG2
1
.
setFlag(int, boolean)
,
getFlag(int)
,
Constant Field Valuespublic static final int FLAG3
2
.
setFlag(int, boolean)
,
getFlag(int)
,
Constant Field Valuespublic static final int FLAG4
3
.
setFlag(int, boolean)
,
getFlag(int)
,
Constant Field Valuespublic static final int FLAG5
4
.
setFlag(int, boolean)
,
getFlag(int)
,
Constant Field Valuespublic static final int FLAG6
5
.
setFlag(int, boolean)
,
getFlag(int)
,
Constant Field Valuespublic static final int FLAG7
6
.
setFlag(int, boolean)
,
getFlag(int)
,
Constant Field Valuespublic static final int FLAG8
7
.
setFlag(int, boolean)
,
getFlag(int)
,
Constant Field ValuesConstructor Detail |
---|
public MapObject()
Method Detail |
---|
public void setX(int x)
public int getX()
public void setY(int y)
public int getY()
public void setGfxId(int i)
public int getGfxId()
public void setTileId(int i)
public int getTileId()
public void setGXOffset(int i)
public int getGXOffset()
public void setGYOffset(int i)
public int getGYOffset()
public void setGWidth(int i)
public int getGWidth()
public void setGHeight(int i)
public int getGHeight()
public void setGHandleXOff(int i)
public int getGHandleXOff()
public void setGHandleYOff(int i)
public int getGHandleYOff()
public void setShow(int i)
public int getShow()
public void setImageIndex(int imageLayer, int newImageIndex) throws java.lang.IllegalArgumentException
MapObject
layer.
imageLayer
- should be one of BACKGROUND
,
FOREGROUND1
, FOREGROUND2
or
FOREGROUND3
newImageIndex
- the image index to be set
java.lang.IllegalArgumentException
- if imageLayer
is out of
bounds - it is assumed that newImageIndex
is validgetImageIndex(int)
public int getImageIndex(int imageLayer) throws java.lang.IllegalArgumentException
MapObject
layer.
imageLayer
- should be one of BACKGROUND
,
FOREGROUND1
, FOREGROUND2
or
FOREGROUND3
MapObject
layer.
java.lang.IllegalArgumentException
- if imageLayer
is out of
boundssetImageIndex(int, int)
public void setUserData(int index, int newUserData) throws java.lang.IllegalArgumentException
index
- the User Data to be updated.newUserData
- the new User Data.
java.lang.IllegalArgumentException
- if
(index
< MIN_USER_DATA
) or
(index
> MAX_USER_DATA
) orgetUserData(int)
public int getUserData(int index) throws java.lang.IllegalArgumentException
index
- the User Data to be returned.
java.lang.IllegalArgumentException
- if
(index
< MIN_USER_DATA
) or
(index
> MAX_USER_DATA
) orsetUserData(int, int)
public void setFlag(int flag, boolean newFlag) throws java.lang.IllegalArgumentException
flag
- should be between FLAG1
and FLAG2
newFlag
- the new flag to set
java.lang.IllegalArgumentException
- if flag
is out of boundsgetFlag(int)
public boolean getFlag(int flag) throws java.lang.IllegalArgumentException
flag
- should be between FLAG1
and FLAG2
java.lang.IllegalArgumentException
- if flag
is out of boundssetFlag(int, boolean)
public java.lang.String getTextString()
public void setTextString(java.lang.String textString)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |