public class EntityType extends java.lang.Object implements ClassBasic
| Modifier and Type | Field and Description |
|---|---|
static int |
SHOW_ICON |
static int |
SHOW_NAME |
| Constructor and Description |
|---|
EntityType(java.lang.String id,
Model model,
int width,
int height,
Attribute[] posStates,
java.lang.String[] posAttr,
int show) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addPossibleAttribut(java.lang.String attr)
add an attribute-key as possible
|
boolean |
existPosibleState(java.lang.String state)
check if an state exist
|
boolean |
existPossibleAttribut(java.lang.String key)
check if an key exist.
|
int |
getHeight() |
java.lang.String |
getId() |
java.awt.Image |
getImage(java.lang.String state)
get Image of state
|
java.lang.String |
getImageId(java.lang.String state)
get image-id of state
|
Model |
getModell() |
java.lang.String[] |
getPossibleAttributes()
get all possible attribute-key's
|
java.lang.String[] |
getPossibleStates()
get all possible states
|
int |
getShow()
Show is the sum of EntityType.SHOW_ Flags
|
int |
getWidth() |
void |
setShow(int show)
Show is the sum of EntityType.SHOW_ Flags
|
public static final int SHOW_NAME
public static final int SHOW_ICON
public EntityType(java.lang.String id,
Model model,
int width,
int height,
Attribute[] posStates,
java.lang.String[] posAttr,
int show)
throws ModelException
id - EntityTypeId must be uniquemodell - width - pixel-size in animationheight - pixel-size in animationposStates - Attribute[] with key:state and value:iconIdposAttr - String[] with attribute-keysshow - combination of show-flagsModelExceptionpublic boolean addPossibleAttribut(java.lang.String attr)
attr - public boolean existPossibleAttribut(java.lang.String key)
key - public java.lang.String[] getPossibleAttributes()
public java.lang.String getId()
getId in interface ClassBasicpublic Model getModell()
public int getWidth()
public int getHeight()
public java.lang.String[] getPossibleStates()
public boolean existPosibleState(java.lang.String state)
state - public java.lang.String getImageId(java.lang.String state)
state - public java.awt.Image getImage(java.lang.String state)
throws ModelException
state - ModelExceptionpublic int getShow()
public void setShow(int show)
show -