|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--webmngr.web.DefaultMapElement
A DefautMapElement 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.
Field Summary | |
static int |
BACKGROUND
|
static int |
BOTTOM
|
static int |
CRITIC_HIGH
|
static int |
CRITIC_LITTLE
|
static int |
CRITIC_MAXIMUM
|
static int |
CRITIC_MEDIUM
|
static int |
CRITIC_MINIMAL
|
static int |
CRITIC_NONE
|
protected int |
criticality
|
protected static java.lang.String |
DEFAULT_ID
|
protected java.awt.Dimension |
dimension
|
protected int |
drawPlane
|
protected java.lang.String |
id
|
protected static int |
idCount
|
protected java.awt.image.ImageObserver |
imgObserver
|
protected java.lang.String |
link
|
protected java.util.List |
mapElements
|
static int |
MIDDLE
|
protected MapElement |
parent
|
protected MapPoint |
position
|
protected int |
status
|
static int |
STATUS_DOWN
|
static int |
STATUS_INDEFINITE
|
static int |
STATUS_UP
|
protected static java.awt.image.ImageObserver |
tmpObs
|
static int |
TOP
|
protected boolean |
visited
|
Constructor Summary | |
DefaultMapElement()
Default Constructor |
Method Summary | |
void |
addLabel(MapLabel newElement)
Adds a new MapLabel to the list of elements that are part of this DefaultMapElement |
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 |
abstract void |
draw(java.awt.Image map)
Draws this MapElement on the map |
java.util.Vector |
getAllElements()
|
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 |
abstract java.awt.Dimension |
getDimension()
Returns the dimension of this MapElement's image |
int |
getDrawPlane()
Gets this MapElement drawPlane, which identifies its priority at the moment at will be drawn |
java.lang.String |
getID()
Gets the ID which identifies this specific MapElement |
java.awt.image.ImageObserver |
getImageObserver()
Gets this MapElement ImageObserver |
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 DefaultMapElement |
MapElement |
getParent()
Gets this MapElement's parent |
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 in % |
int |
getStatus()
Gets the Status of this element |
void |
setCriticality(int crit)
Sets the criticality of this element which tells how much it is important and if a problem with it deserves to be propagated |
void |
setDefault(MapElement def)
Sets a defaultMapElement whose properties will be transfered to this MapElement |
void |
setDrawPlane(int drawPlane)
Sets the drawPlane of this MapElement, that is, the relative place where it must be drawn |
void |
setID(java.lang.String idValue)
Sets this element ID, which identifies this specific MapElement |
void |
setImageObserver(java.awt.image.ImageObserver io)
Sets this MapElement ImageObserver to be used at the moment it will be drawn |
void |
setLink(java.lang.String link)
Sets the Link to where this MapElement will take anyone who clicks on its image |
void |
setParent(MapElement parent)
Sets this mapElements parent, that is, the element where this mapElement must be drawn |
void |
setPosition(MapPoint position)
Sets the position where this MapElement must be drawn relative to another one (in %) |
void |
setStatus(int value)
Sets the Status of this element |
void |
setVisited(boolean value)
Sets a new value for the boolean visited which tells if the Element was visited or not |
void |
setX(float x)
Sets the X coordinate of this MapElement |
void |
setY(float y)
Sets the Y coordinate of this MapElement |
boolean |
visited()
Returns the MapElements present in this MapElement |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int BOTTOM
public static int MIDDLE
public static int TOP
public static int BACKGROUND
public static final int CRITIC_NONE
public static final int CRITIC_MINIMAL
public static final int CRITIC_LITTLE
public static final int CRITIC_MEDIUM
public static final int CRITIC_HIGH
public static final int CRITIC_MAXIMUM
public static final int STATUS_UP
public static final int STATUS_DOWN
public static final int STATUS_INDEFINITE
protected boolean visited
protected java.lang.String id
protected java.lang.String link
protected int criticality
protected java.awt.Dimension dimension
protected MapPoint position
protected int status
protected int drawPlane
protected java.util.List mapElements
protected MapElement parent
protected java.awt.image.ImageObserver imgObserver
protected static java.awt.image.ImageObserver tmpObs
protected static final java.lang.String DEFAULT_ID
protected static int idCount
Constructor Detail |
public DefaultMapElement()
Method Detail |
public boolean visited()
visited
in interface MapElement
public void setVisited(boolean value)
setVisited
in interface MapElement
value
- the new value of the booleanpublic java.lang.String getID()
getID
in interface MapElement
public void setID(java.lang.String idValue)
an
- string that represents this MapElementpublic java.lang.String getLink()
getLink
in interface MapElement
public void setLink(java.lang.String link)
the
- new Link valuepublic int getCriticality()
getCriticality
in interface MapElement
public java.util.Vector getAllElements()
public void setCriticality(int crit)
crit
- the new value for this element criticalitypublic java.util.Iterator getMapElements()
getMapElements
in interface MapElement
public void addMapElement(MapElement newElement)
newElement
- the new MapElement to be addedpublic void addMapImage(MapImage newElement)
newElement
- the new MapImage to be addedpublic void addMapLine(MapLine newElement)
newElement
- the new MapLine to be addedpublic void addLabel(MapLabel newElement)
newElement
- the new MapLabel to be addedpublic void addSubMap(NetMap newElement)
newElement
- the new SubMap to be addedpublic void addManagedElement(ManagedElement newElement)
newElement
- the new ManagedElement to be addedpublic abstract java.awt.Dimension getDimension()
getDimension
in interface MapElement
public MapPoint getPosition()
getPosition
in interface MapElement
public void setPosition(MapPoint position)
position
- The relative point, in % coordinatespublic void setX(float x)
x
- the x coordinatepublic void setY(float y)
y
- the y coordinatepublic int getStatus()
getStatus
in interface MapElement
public void setStatus(int value)
value
- the new value for the statuspublic int getDrawPlane()
getDrawPlane
in interface MapElement
public void setDrawPlane(int drawPlane)
drawPlane
- Integer representing this MapElement new draw Planepublic java.awt.Point getPixelPosition()
getPixelPosition
in interface MapElement
public abstract void draw(java.awt.Image map)
draw
in interface MapElement
img
- Source imagecomp
- A component, e.g, a frame, from where the image was obtainedpublic void setParent(MapElement parent)
setParent
in interface MapElement
parent
- this MapElement parentpublic void setImageObserver(java.awt.image.ImageObserver io)
setImageObserver
in interface MapElement
io
- ths mapElement ImageObserverpublic java.awt.image.ImageObserver getImageObserver()
public MapElement getParent()
public void setDefault(MapElement def)
def
- Default MapElement
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |