webmngr.web
Class ManagedElement

java.lang.Object
  |
  +--webmngr.web.DefaultMapElement
        |
        +--webmngr.web.ManagedElement
All Implemented Interfaces:
MapElement

public class ManagedElement
extends DefaultMapElement

A ManagedElement is a managed element in a map which represents the status of an specific element. It stores this status and also images to be associated with each kind of status

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

Fields inherited from class webmngr.web.DefaultMapElement
BACKGROUND, BOTTOM, CRITIC_HIGH, CRITIC_LITTLE, CRITIC_MAXIMUM, CRITIC_MEDIUM, CRITIC_MINIMAL, CRITIC_NONE, criticality, DEFAULT_ID, dimension, drawPlane, id, idCount, imgObserver, link, mapElements, MIDDLE, parent, position, status, STATUS_DOWN, STATUS_INDEFINITE, STATUS_UP, tmpObs, TOP, visited
 
Constructor Summary
ManagedElement()
          Default Constructor
 
Method Summary
 void draw(java.awt.Image img)
          Draws this ManagedElement on the map
 int getCriticality()
          Gets this managedElement criticality by asking the WebManager monitor
 java.awt.Dimension getDimension()
          Gets this managedElement dimension
 java.lang.String getLink()
          Gets the Link to where this MapElement will take anyone who clicks on its image
 java.awt.Point getPixelPosition()
          Gets the exact location of this MapElement image on the screen in pixels, not in %
 int getStatus()
          Gets the Status of this element
 StatusImage getStatusImage()
          Gets this ManagedElement statusImage
 void setStatusImage(StatusImage si)
          Sets this ManagedElement statusImage
 void setType(java.lang.String type)
           
 
Methods inherited from class webmngr.web.DefaultMapElement
addLabel, addManagedElement, addMapElement, addMapImage, addMapLine, addSubMap, getAllElements, getDrawPlane, getID, getImageObserver, getMapElements, getParent, getPosition, setCriticality, setDefault, setDrawPlane, setID, setImageObserver, setLink, setParent, setPosition, setStatus, setVisited, setX, setY, visited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagedElement

public ManagedElement()
Default Constructor
Method Detail

getPixelPosition

public java.awt.Point getPixelPosition()
Description copied from class: DefaultMapElement
Gets the exact location of this MapElement image on the screen in pixels, not in %
Overrides:
getPixelPosition in class DefaultMapElement
Following copied from class: webmngr.web.DefaultMapElement
Returns:
a point representing the position of this element's image

getCriticality

public int getCriticality()
Gets this managedElement criticality by asking the WebManager monitor
Overrides:
getCriticality in class DefaultMapElement
Following copied from class: webmngr.web.DefaultMapElement
Returns:
criticality of the element

getStatus

public int getStatus()
Description copied from class: DefaultMapElement
Gets the Status of this element
Overrides:
getStatus in class DefaultMapElement
Following copied from class: webmngr.web.DefaultMapElement
Returns:
a status value associated with this element

setType

public void setType(java.lang.String type)

getLink

public java.lang.String getLink()
Description copied from class: DefaultMapElement
Gets the Link to where this MapElement will take anyone who clicks on its image
Overrides:
getLink in class DefaultMapElement
Following copied from class: webmngr.web.DefaultMapElement
Returns:
the Link expected

getDimension

public java.awt.Dimension getDimension()
Gets this managedElement dimension
Overrides:
getDimension in class DefaultMapElement
Returns:
its Image Dimension

setStatusImage

public void setStatusImage(StatusImage si)
Sets this ManagedElement statusImage
Parameters:
si - StatusImage to represent this managedElement status

getStatusImage

public StatusImage getStatusImage()
Gets this ManagedElement statusImage
Returns:
StatusImage that represents this managedElement status

draw

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