webmngr.web
Interface MapElement

All Known Implementing Classes:
DefaultMapElement

public interface MapElement

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.

Since:
30/06/2000
Author:
Ayla Débora Dantas de Souza (ayla@dsc.ufpb.br),
Rodrigo Rebouças de Almeida (rodrigor@dsc.ufpb.br)

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

visited

public boolean visited()
Tells if a MapElement was visited or not during a traversal of the elements of a map
Returns:
true if it was visited and false otherwise.

setVisited

public void setVisited(boolean value)
Sets a new value for the boolean visited which tells if the Element was visited or not
Parameters:
value - the new value of the boolean

getID

public java.lang.String getID()
Gets the ID which identifies this specific MapElement
Returns:
an string that represents this MapElement

getLink

public java.lang.String getLink()
Gets the Link to where this MapElement will take anyone who clicks on its image
Returns:
the Link expected

getCriticality

public 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
Returns:
criticality of the element

getMapElements

public java.util.Iterator getMapElements()
Returns the MapElements present in this MapElement
Returns:
all MapElements from this DefaultMapElement

getDimension

public java.awt.Dimension getDimension()
Returns the dimension of this MapElement's image
Returns:
the dimension of this element's image

getStatus

public int getStatus()
Gets the Status of this element
Returns:
a status value associated with this element

draw

public void draw(java.awt.Image img)
Draws this MapElement on the map
Parameters:
img - Source image
comp - A component, e.g, a frame, from where the image was obtained

getDrawPlane

public int getDrawPlane()
Gets the drawPlane of this MapElement, that is, the relative place where it must be drawn
Returns:
Integer representing this MapElement draw Plane

getPixelPosition

public java.awt.Point getPixelPosition()
Gets the exact location of this MapElement image on the screen in pixels, not in %
Returns:
a point representing the position of this element's image

getPosition

public MapPoint getPosition()
Gets the relative location of this MapElement image on the screen in %
Returns:
a MapPoint representing the position of this element's image

setParent

public void setParent(MapElement parent)
Sets this mapElements parent, that is, the element where this mapElement must be drawn
Parameters:
parent - this MapElement parent

setImageObserver

public void setImageObserver(java.awt.image.ImageObserver io)
Sets this MapElement ImageObserver to be used at the moment it will be drawn
Parameters:
io - ths mapElement ImageObserver