|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MapSymbolRendererInterface
This MapSymbolRendererInterface defines how a MapSymbolComponent is to be
represented in the Map . The style , shape and color of an Mapsymbol are specified
by this interface .It also specifies the mouse down response for an MapSymbolComponent
and its tool tip .The following is the sequence in which the methods of this interface will be invoked,
   
1.paintShapeAndSeverity
   
2.paintLabelString
   
3.paintIcon
While the user renders the MapSymbolComponent he/she should take care that the boundary of the MapSymbolComponent
painted not to exceed the bounds specified by the Layout.The Map drawing engine calculates the clip area based on
the bounds calculated by the Layout. So, if the user exceeds the bounds, then certain portion of the
MapSymbolComponent will not be drawn which may lead to some undesirable painting.
MapSymbolComponent,
MapSymbolRendererImpl,
MapSymbolRendererImpl_2,
MapLinkRendererInterface,
BasicMap.paintComponent(java.awt.Graphics)| Method Summary | |
|---|---|
boolean |
downInObject(int x,
int y,
MapSymbolComponent symb)
To determine if a mouse down is inside the Map Symbol. |
java.lang.String |
getToolTipText(MapSymbolComponent symb,
int x,
int y)
This method is used to change the tool tip text of an Map Symbol. |
void |
paintIcon(java.awt.Graphics g,
MapSymbolComponent mapSymbol,
java.awt.Point location,
java.awt.Dimension size,
java.awt.image.ImageObserver io,
java.awt.Image imageIcon,
boolean selected)
To paint Icon on the Map Symbol. |
void |
paintLabelString(java.awt.Graphics g,
MapSymbolComponent mapSymbol,
java.lang.String label,
java.awt.Point location,
java.awt.Font font)
To draw a label string at the bottom of Map Symbol. |
void |
paintShapeAndSeverity(java.awt.Graphics g,
MapSymbolComponent mapSymbol,
java.awt.Point location,
java.awt.Dimension size,
java.awt.Color status,
int objType)
To paint Map Symbol Shape and Severity . |
| Method Detail |
|---|
void paintShapeAndSeverity(java.awt.Graphics g,
MapSymbolComponent mapSymbol,
java.awt.Point location,
java.awt.Dimension size,
java.awt.Color status,
int objType)
g - - Graphics of MapSymbolComponentmapSymbol - - Reference of MapSymbolComponent objectlocation - - Top Left Corner point of MapSymbolComponentsize - - Size of the map symbolstatus - - color of map symbol with respect to the statusobjType - - Type of map symbol object
void paintIcon(java.awt.Graphics g,
MapSymbolComponent mapSymbol,
java.awt.Point location,
java.awt.Dimension size,
java.awt.image.ImageObserver io,
java.awt.Image imageIcon,
boolean selected)
g - - Graphics of MapSymbolComponentmapSymbol - - Reference of MapSymbolComponent objectlocation - - Top Left Corner point of MapIconsize - - Size of the Map Iconio - - ImageObserverimageIcon - - Image to be displayed on the Map Symbolselected - - Whether the symbol is selected or not
void paintLabelString(java.awt.Graphics g,
MapSymbolComponent mapSymbol,
java.lang.String label,
java.awt.Point location,
java.awt.Font font)
g - - Graphics of MapSymbolComponentmapSymbol - - Reference of MapSymbolComponent objectlabel - - String to be displayedlocation - - Starting location of stringfont - - Font type which is used to draw the label
java.lang.String getToolTipText(MapSymbolComponent symb,
int x,
int y)
symb - -Reference of Map Symbol Objectx - The x co-ordiate of mouse with respect to the virtual space.y - The y co-ordinate of mouse with respect to the virtual space.
String that is to be the tool tip for this MapSymbolComponent.MapSymbolComponent.getP0(),
MapSymbolComponent.getD0()
boolean downInObject(int x,
int y,
MapSymbolComponent symb)
x - x co-ordinate of mouse event relative to the mapy - y co-ordinate of mouse event relative to the mapsymb - Reference of Map Symbol Object
boolean true , if the mouse is down on the MapLinkComponentMapSymbolComponent.getP0(),
MapSymbolComponent.getD0()
|
"WEBNMS_5 API Docs" | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||