|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A MapElement is any kind of element present in a Map. This class provides
most of the necessary methods necessary to get and set properties of an element like this.
Method Summary | |
void |
draw(java.awt.Image img)
Draws this MapElement on the map |
int |
getCriticality()
Gets the criticality of this element which tells how much it is important and if a problem with it deserves to be propagated |
java.awt.Dimension |
getDimension()
Returns the dimension of this MapElement's image |
int |
getDrawPlane()
Gets the drawPlane of this MapElement, that is, the relative place where it must be drawn |
java.lang.String |
getID()
Gets the ID which identifies this specific MapElement |
java.lang.String |
getLink()
Gets the Link to where this MapElement will take anyone who clicks on its image |
java.util.Iterator |
getMapElements()
Returns the MapElements present in this MapElement |
java.awt.Point |
getPixelPosition()
Gets the exact location of this MapElement image on the screen in pixels, not in % |
MapPoint |
getPosition()
Gets the relative location of this MapElement image on the screen in % |
int |
getStatus()
Gets the Status of this element |
void |
setImageObserver(java.awt.image.ImageObserver io)
Sets this MapElement ImageObserver to be used at the moment it will be drawn |
void |
setParent(MapElement parent)
Sets this mapElements parent, that is, the element where this mapElement must be drawn |
void |
setVisited(boolean value)
Sets a new value for the boolean visited which tells if the Element was visited or not |
boolean |
visited()
Tells if a MapElement was visited or not during a traversal of the elements of a map |
Method Detail |
public boolean visited()
public void setVisited(boolean value)
value
- the new value of the booleanpublic java.lang.String getID()
public java.lang.String getLink()
public int getCriticality()
public java.util.Iterator getMapElements()
public java.awt.Dimension getDimension()
public int getStatus()
public void draw(java.awt.Image img)
img
- Source imagecomp
- A component, e.g, a frame, from where the image was obtainedpublic int getDrawPlane()
public java.awt.Point getPixelPosition()
public MapPoint getPosition()
public void setParent(MapElement parent)
parent
- this MapElement parentpublic void setImageObserver(java.awt.image.ImageObserver io)
io
- ths mapElement ImageObserver
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |