webmngr.web
Class CompositeMapElement

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

public class CompositeMapElement
extends DefaultMapElement

Title: Description: Copyright: Copyright (c) 2002 Company:

Author:
 

Field Summary
protected  java.awt.Image image
           
 
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
CompositeMapElement()
           
 
Method Summary
 void addManagedElement(ManagedElement newElement)
          Adds a new ManagedElement to the list of elements that are part of this DefaultMapElement
 void addMapElement(MapElement newElement)
          Adds a new MapElement to the list of elements that are part of this DefaultMapElement
 void addMapImage(MapImage newElement)
          Adds a new MapMapImage to the list of elements that are part of this DefaultMapElement
 void addMapLine(MapLine newElement)
          Adds a new MapLine to the list of elements that are part of this DefaultMapElement
 void addSubMap(NetMap newElement)
          Adds a new MapSubMap to the list of elements that are part of this DefaultMapElement
 void draw(java.awt.Image img)
          Draws this MapElement on the map
 void drawMapElements(java.awt.Image img)
          Metodo que desenha todos os filhos desse Composite.
 java.awt.Dimension getDimension()
          Gets this managedElement dimension
 java.awt.Image getImage()
          Gets this MapElement's image
 java.util.Iterator getMapElements()
          Returns the MapElements present in this DefaultMapElement
 int getStatus()
          Gets the status of this NetMap, comparing the criticalities of its sub-elements with problems, discovering what is the worst case and then seeing if this criticality is greater than the propagation level of this NetMap
 void setImageFile(java.lang.String fileName)
          Sets the file of the image that will represent this mapElement
 
Methods inherited from class webmngr.web.DefaultMapElement
addLabel, getAllElements, getCriticality, getDrawPlane, getID, getImageObserver, getLink, getParent, getPixelPosition, 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
 

Field Detail

image

protected java.awt.Image image
Constructor Detail

CompositeMapElement

public CompositeMapElement()
Method Detail

addMapElement

public void addMapElement(MapElement newElement)
Adds a new MapElement to the list of elements that are part of this DefaultMapElement
Overrides:
addMapElement in class DefaultMapElement
Parameters:
newElement - the new MapElement to be added

addManagedElement

public void addManagedElement(ManagedElement newElement)
Adds a new ManagedElement to the list of elements that are part of this DefaultMapElement
Overrides:
addManagedElement in class DefaultMapElement
Parameters:
newElement - the new ManagedElement to be added

addMapImage

public void addMapImage(MapImage newElement)
Adds a new MapMapImage to the list of elements that are part of this DefaultMapElement
Overrides:
addMapImage in class DefaultMapElement
Parameters:
newElement - the new MapImage to be added

addMapLine

public void addMapLine(MapLine newElement)
Adds a new MapLine to the list of elements that are part of this DefaultMapElement
Overrides:
addMapLine in class DefaultMapElement
Parameters:
newElement - the new MapLine to be added

addSubMap

public void addSubMap(NetMap newElement)
Adds a new MapSubMap to the list of elements that are part of this DefaultMapElement
Overrides:
addSubMap in class DefaultMapElement
Parameters:
newElement - the new SubMap to be added

getMapElements

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

draw

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

getStatus

public int getStatus()
Gets the status of this NetMap, comparing the criticalities of its sub-elements with problems, discovering what is the worst case and then seeing if this criticality is greater than the propagation level of this NetMap
Overrides:
getStatus in class DefaultMapElement
Returns:
status of this NetMap

getDimension

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

getImage

public java.awt.Image getImage()
Gets this MapElement's image
Returns:
an image that represents this element on the map

setImageFile

public void setImageFile(java.lang.String fileName)
Sets the file of the image that will represent this mapElement
Parameters:
fileName - the file name of a file present on the images directory (/Webmngr/web/images)

drawMapElements

public void drawMapElements(java.awt.Image img)
Metodo que desenha todos os filhos desse Composite.
Parameters:
img - Imagem fonte