|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.view.graphic.LyGraphicalObject
leon.view.win.swing.LySwingObject
leon.view.win.swing.LySwingMapObject
leon.view.win.swing.LySwingMapRegion
public class LySwingMapRegion
This class implements the Map region object (as described in the dtd) for swing viewer.
A region allows to display on a map a graphical element made up of a finite set of points. These points define polygons that are displayed on the map with a given color. These elements follow the zooms made on the map (their size increases or decreases when zooming in or out).
LyMapRegion
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static int |
SHADOW_OFFSET
Offset for region shadow. |
Fields inherited from interface leon.view.win.swing.map.LyMapElement |
---|
NORMAL_MODE, REDUCED_MODE |
Constructor Summary | |
---|---|
LySwingMapRegion(LyMapRegion mapRegion)
Class constructor of a Map region object for the Swing target. |
Method Summary | |
---|---|
void |
addMapRegion(LyMapRegion mapRegion,
int pos)
Don't do anything in this implementation. |
void |
draw(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g,
int mode)
Draws the map region. |
void |
drawInViewer(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g)
(non-Javadoc). |
void |
drawMouseOverTooltip(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g)
Draws this map region's mouse over tooltip (for a treemap layout only). |
Ly3DBox |
getBoundingBox(leon.view.win.swing.map.LyAbstractMapComponentManager map)
Gets the bounding box of this map region. |
java.awt.Rectangle |
getBoundingRectangle(leon.view.win.swing.map.LyAbstractMapComponentManager map)
Gets the bounding rectangle of this map region. |
java.awt.Shape |
getClippingArea(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Image image)
Gets the clipping area of this region. |
java.lang.String |
getId()
(non-Javadoc). |
java.awt.Image[] |
getImages()
This map region component does not use any images. |
java.lang.String |
getLabel()
Gets the label of this map region. |
int |
getLayer()
(non-Javadoc). |
java.util.Vector<LyPoint> |
getPoints()
Gets the points of all the polygon elements in the map. |
java.lang.String |
getTooltip()
Gets the tooltip of this map region. |
boolean |
isAtPosition(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g,
int x,
int y)
(non-Javadoc). |
boolean |
isHidden()
(non-Javadoc). |
boolean |
isMouseOver()
Indicates whether the moue is over this region or not. |
boolean |
isOverlay()
This map region has the overlay property if it is selected. |
boolean |
isSelected()
(non-Javadoc). |
boolean |
isSensitive()
(non-Javadoc). |
void |
removeMapRegion(LyMapRegion mapRegion)
Don't do anything in this implementation. |
void |
setContent()
Sets the content of this component and initializes its default colors and fonts. |
void |
setHidden(boolean hidden)
(non-Javadoc). |
void |
setLabelFrame(java.awt.Rectangle rect)
Sets the position of the label frame. |
void |
setMouseOver(boolean mouseOver,
int x,
int y)
Sets the mouse over mode. |
void |
setSelected(boolean selected)
(non-Javadoc). |
void |
setSmallImage(java.lang.String smallImage)
A map region doesn't handle small images. |
void |
setSmallImageTooltip(java.lang.String tooltip)
A map region doesn't handle tooltips for its small images. |
void |
setWeight(float weight)
A map region doesn't handle weight. |
void |
translate(float dx,
float dy,
float dz)
A map region doesn't handle translations. |
Methods inherited from class leon.view.win.swing.LySwingObject |
---|
getBounds, getChildrenBounds, getComponent, getDefaultFrame |
Methods inherited from class leon.view.graphic.LyGraphicalObject |
---|
expand, free, getController, getEnv, getEnvironment, getIdCode, getIntResource, getMessage, getMessage, getResource, getString, getString, getString, getViewComponent, getViewManager, isFreed, isFreeing, isImageAnimated, processDemand, processDemand, testResource, translate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface leon.view.graphic.LyGraphicalComponent |
---|
free, getViewComponent |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final int SHADOW_OFFSET
Constructor Detail |
---|
public LySwingMapRegion(LyMapRegion mapRegion)
mapRegion
- a MAP_REGION component defined for every type of view targets. This map
region is initialized for the swing view and its attributes are given
default values.Method Detail |
---|
public void setContent()
public void setMouseOver(boolean mouseOver, int x, int y)
mouseOver
- true if map region must be active, false otherwisex
- the x coordinate of the mousey
- the y coordinate of the mousepublic java.awt.Image[] getImages()
getImages
in interface leon.view.win.swing.map.LyMapElement
null
public void draw(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g, int mode)
draw
in interface leon.view.win.swing.map.LyMapElement
map
- the map to drawg
- the graphical contextmode
- the drawing modedraw(LyAbstractMapComponentManager, Graphics, int, boolean, int)
,
LyMapElement.draw(leon.view.win.swing.map.LyAbstractMapComponentManager,
java.awt.Graphics, int)
public void drawMouseOverTooltip(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g)
map
- the treemap layout to draw its tooltipg
- the graphics contextpublic void drawInViewer(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g)
drawInViewer
in interface leon.view.win.swing.map.LyMapElement
map
- the mapg
- the graphical contextLyMapElement.drawInViewer(leon.view.win.swing.map.LyAbstractMapComponentManager,
java.awt.Graphics)
public Ly3DBox getBoundingBox(leon.view.win.swing.map.LyAbstractMapComponentManager map)
getBoundingBox
in interface leon.view.win.swing.map.LyMapElement
map
- the map manager
LyMapElement.getBoundingBox(leon.view.win.swing.map.LyAbstractMapComponentManager)
public java.awt.Rectangle getBoundingRectangle(leon.view.win.swing.map.LyAbstractMapComponentManager map)
getBoundingRectangle
in interface leon.view.win.swing.map.LyMapElement
map
- the map manager
LyMapElement.getBoundingRectangle(leon.view.win.swing.map.LyAbstractMapComponentManager)
public java.awt.Shape getClippingArea(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Image image)
getClippingArea
in interface leon.view.win.swing.map.LyMapElement
map
- the map managerimage
- the image to clip. This image is not used in this implementation.
getBoundingRectangle(LyAbstractMapComponentManager)
,
LyMapElement.getClippingArea(LyAbstractMapComponentManager, Image)
public int getLayer()
getLayer
in interface leon.view.win.swing.map.LyMapElement
LyMapElement.getLayer()
public java.lang.String getLabel()
getLabel
in interface leon.view.win.swing.map.LyMapElement
LyMapElement.getLabel()
public java.lang.String getTooltip()
null
and it is managed in the draw method.
getTooltip
in interface leon.view.win.swing.map.LyMapElement
LyMapElement.getTooltip()
public boolean isMouseOver()
public boolean isAtPosition(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g, int x, int y)
isAtPosition
in interface leon.view.win.swing.map.LyMapElement
map
- the mapg
- the graphical contextx
- the x coordinatey
- the y coordinate
true
if this element is at the specified point in the map,
false
otherwiseLyMapElement.isAtPosition(leon.view.win.swing.map.LyAbstractMapComponentManager,
java.awt.Graphics, int, int)
public java.lang.String getId()
getId
in interface LyGetIdInterface
LyGetIdInterface.getId()
public void setSelected(boolean selected)
setSelected
in interface LyGraphicalMapRegion
setSelected
in interface LySetSelectedInterface
setSelected
in interface leon.view.win.swing.map.LyMapElement
selected
- Boolean indicating if attribute selected is set or unset.LySetSelectedInterface.setSelected(boolean)
public boolean isSelected()
isSelected
in interface leon.view.win.swing.map.LyMapElement
true
if this element is selected, false
otherwiseLyMapElement.isSelected()
public void setSmallImageTooltip(java.lang.String tooltip)
setSmallImageTooltip
in interface LyGraphicalMapRegion
tooltip
- Not used in this implementation.LyGraphicalMapRegion.setSmallImageTooltip(java.lang.String)
public void setWeight(float weight)
setWeight
in interface LyGraphicalMapRegion
weight
- Not used in this implementation.LyGraphicalMapRegion.setWeight(float)
public void setSmallImage(java.lang.String smallImage)
setSmallImage
in interface LyGraphicalMapRegion
smallImage
- Not used in this implementation.LyGraphicalMapRegion.setSmallImage(String)
public void translate(float dx, float dy, float dz)
translate
in interface leon.view.win.swing.map.LyMapElement
dx
- Not used in this implementation.dy
- Not used in this implementation.dz
- Not used in this implementation.LyMapElement.translate(float, float, float)
public boolean isHidden()
isHidden
in interface leon.view.win.swing.map.LyMapElement
true
if this element is hidden, false
otherwiseLyMapElement.isHidden()
public void setHidden(boolean hidden)
setHidden
in interface LyGraphicalMapRegion
setHidden
in interface LySetHiddenInterface
hidden
- Boolean indicating if attribute hidden is set or unset.LySetHiddenInterface.setHidden(boolean)
public boolean isOverlay()
isOverlay
in interface leon.view.win.swing.map.LyMapElement
LyMapElement.isOverlay()
public void addMapRegion(LyMapRegion mapRegion, int pos)
addMapRegion
in interface LyGraphicalMapRegion
mapRegion
- a map region, not usedpos
- the position of the added map region, not usedLyGraphicalMapRegion.addMapRegion(LyMapRegion, int)
public void removeMapRegion(LyMapRegion mapRegion)
removeMapRegion
in interface LyGraphicalMapRegion
mapRegion
- a map region, not usedLyGraphicalMapRegion.removeMapRegion(LyMapRegion)
public boolean isSensitive()
isSensitive
in interface leon.view.win.swing.map.LyMapElement
true
if this element is sensitive, false
otherwiseLyMapElement.isSensitive()
public void setLabelFrame(java.awt.Rectangle rect)
rect
- a rectangle that define the borders of the label framepublic java.util.Vector<LyPoint> getPoints()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |