webmngr.web
Class MapLabel

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

public class MapLabel
extends DefaultMapElement

A MapLabel is a String that can be printed on a map. It can be a link or not.

Since:
02/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
MapLabel()
          Default Constructor
 
Method Summary
 void draw(java.awt.Image img)
          Draws this Label
 java.awt.Color getColor()
          Gets the color of the message to be drawn, the default color is black
 java.awt.Dimension getDimension()
          Gets this label dimension
 java.awt.Font getFont()
          Gets the Font of this label message
 java.lang.String getLabel()
          Gets this label message
 void setColor(java.lang.String c)
          Sets the color of the message to be drawn
 void setFont(java.awt.Font f)
          Sets the Font of this label message
 void setValue(java.lang.String msg)
          Sets this label message
 
Methods inherited from class webmngr.web.DefaultMapElement
addLabel, addManagedElement, addMapElement, addMapImage, addMapLine, addSubMap, getAllElements, getCriticality, getDrawPlane, getID, getImageObserver, getLink, getMapElements, getParent, getPixelPosition, getPosition, getStatus, 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

MapLabel

public MapLabel()
Default Constructor
Method Detail

getLabel

public java.lang.String getLabel()
Gets this label message
Returns:
the message that will be displayed by this label

setValue

public void setValue(java.lang.String msg)
Sets this label message
Parameters:
the - new message

getFont

public java.awt.Font getFont()
Gets the Font of this label message
Returns:
The font used to display this label message

setFont

public void setFont(java.awt.Font f)
Sets the Font of this label message
Parameters:
f - The new font of this label

getColor

public java.awt.Color getColor()
Gets the color of the message to be drawn, the default color is black
Returns:
this Label color

setColor

public void setColor(java.lang.String c)
Sets the color of the message to be drawn
Parameters:
c - the new color

getDimension

public java.awt.Dimension getDimension()
Gets this label dimension
Overrides:
getDimension in class DefaultMapElement
Returns:
this MapLabel dimension

draw

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