|
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.web.LyWebObject
leon.view.web.struts.LyStrutsMapObject
leon.view.web.struts.LyStrutsMapRegion
public class LyStrutsMapRegion
This class implements the Map Region object (as described in the dtd) for Struts viewer.
MAP_REGION: Map Region
Regions allow representing geometric areas, who can be sensitive, defined by a discrete set of
points. These points define polygons that are displayed on the map with a given color. It is
notably possible to lead to other map views when launching an action over one of these regions.
Regions follow zooms made on the map (their size increases or decreases when zooming in or out).
LyMap
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static int |
SHADOW_OFFSET
Offset for region shadow. |
static boolean |
USE_DIV_FOR_TREEMAP_LAYOUT
Indicates id the HTML tag DIV has to be used for treemap layout. |
Fields inherited from class leon.view.web.LyWebObject |
---|
WEB_COMPONENT_ID, WEB_CONTROLLER_ID, WEB_SESSION_ID |
Fields inherited from interface leon.view.web.struts.map.LyStrutsMapElement |
---|
DRAW_MODE_NORMAL, DRAW_MODE_REDUCED |
Constructor Summary | |
---|---|
LyStrutsMapRegion(LyMapRegion region)
Class constructor of a Map region object for the Struts target. |
Method Summary | |
---|---|
void |
addMapRegion(LyMapRegion mapRegion,
int pos)
(non-Javadoc). |
void |
draw(leon.view.web.struts.map.LyStrutsMapCanvas map,
java.awt.Graphics g,
int mode)
(non-Javadoc). |
void |
draw(leon.view.web.struts.map.LyStrutsMapCanvas map,
java.awt.Graphics g,
int mode,
boolean forceDraw,
int level)
Draws the map region. |
void |
drawHtml(leon.view.web.struts.map.LyStrutsMapCanvas map,
LyWebPageWriter pw)
(non-Javadoc). |
void |
drawHtml(leon.view.web.struts.map.LyStrutsMapCanvas map,
LyWebPageWriter pw,
int level)
Draws the HTML tag for this region. |
void |
drawHtmlPolygon(leon.view.web.struts.map.LyStrutsMapCanvas mapCanvas,
LyWebPageWriter pw,
LyPolygon polygon,
boolean selected)
Draws the HTML tag for a polygon on the map canvas. |
void |
drawHtmlTooltip(leon.view.web.struts.map.LyStrutsMapCanvas mapCanvas,
LyWebPageWriter pw,
boolean smallImage)
Draws the HTML tag for the tooltip of the current map region or its small image. |
void |
drawInViewer(leon.view.web.struts.map.LyStrutsMapCanvas map,
java.awt.Graphics g)
(non-Javadoc). |
Ly3DBox |
getBoundingBox(leon.view.web.struts.map.LyStrutsMapCanvas map)
(non-Javadoc). |
java.awt.Rectangle |
getBoundingRectangle(leon.view.web.struts.map.LyStrutsMapCanvas map)
(non-Javadoc). |
java.awt.Polygon |
getBoundingShape(leon.view.web.struts.map.LyStrutsMapCanvas map)
Gets the polygon that contains this region. |
java.awt.Shape |
getClippingArea(leon.view.web.struts.map.LyStrutsMapCanvas map,
java.awt.Image image)
(non-Javadoc). |
java.lang.String |
getId()
(non-Javadoc). |
java.awt.Image[] |
getImages()
(non-Javadoc). |
java.lang.String |
getLabel()
(non-Javadoc). |
java.awt.Rectangle |
getLabelFrame()
Gets the rectangle frame where the label can be drawn. |
int |
getLayer()
(non-Javadoc). |
java.util.Vector<LyPoint> |
getPoints()
Gets all points of this region polygon and of all its subcomponents. |
java.awt.Rectangle |
getSmallImageBounds()
Gets the small image bounds. |
java.lang.String |
getSmallImageTooltip()
Gets the tooltip for small image. |
java.lang.String |
getTooltip()
(non-Javadoc). |
boolean |
isAtPosition(leon.view.web.struts.map.LyStrutsMapCanvas map,
java.awt.Graphics g,
int x,
int y)
(non-Javadoc). |
boolean |
isDrawableInterface(leon.view.web.struts.map.LyStrutsMapCanvas map)
Indicates if the component is drawable or not in web. |
boolean |
isHidden()
(non-Javadoc). |
boolean |
isOverlay()
(non-Javadoc). |
boolean |
isSelected()
(non-Javadoc). |
boolean |
isSensitive()
(non-Javadoc). |
void |
removeMapRegion(LyMapRegion mapRegion)
(non-Javadoc). |
void |
resetPosition()
Generates the Javascript code that resets the position of the element. |
void |
setContent()
Sets the content of the map region. |
void |
setHidden(boolean hidden)
(non-Javadoc). |
void |
setLabelFrame(java.awt.Rectangle rect)
Sets the frame reserved for the label. |
void |
setSelected(boolean selected)
(non-Javadoc). |
void |
setSmallImage(java.lang.String smallImage)
(non-Javadoc). |
void |
setSmallImageTooltip(java.lang.String tooltip)
(non-Javadoc). |
void |
setWeight(float weight)
(non-Javadoc). |
void |
translate(float dx,
float dy,
float dz)
(non-Javadoc). |
void |
writeHtml(LyWebPageWriter pw)
(non-Javadoc). |
Methods inherited from class leon.view.web.struts.LyStrutsMapObject |
---|
getColor, getFont, getHexString, getImage |
Methods inherited from class leon.view.web.LyWebObject |
---|
addFileScript, decodeUrl, displayUpPage, encodeUrl, encodeUrlXhtml, expandUrl, free, getDisabledImageUrl, getFontSize, getFontString, getFontString, getFontString, getHexColor, getHexColor, getHtmlEntitiesString, getHtmlString, getImageSize, getImageSize, getImageUrl, getJavascriptString, getLastFrameName, getLyFont, getMessage, getRootUrl, getRootURL, getScrollHeightForSplitter, getUrl, getWebViewManager, refresh, replaceUrl, replaceUrl, setUpdating, updateRefreshInfo, writeJson |
Methods inherited from class leon.view.graphic.LyGraphicalObject |
---|
expand, getBounds, getChildrenBounds, getController, getEnv, getEnvironment, getIdCode, getIntResource, 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 boolean USE_DIV_FOR_TREEMAP_LAYOUT
public static final int SHADOW_OFFSET
Constructor Detail |
---|
public LyStrutsMapRegion(LyMapRegion region)
region
- the generic Map region defined for every type of view targets.Method Detail |
---|
public void setContent()
public void writeHtml(LyWebPageWriter pw)
writeHtml
in interface LyWebComponent
pw
- the page writerLyWebComponent.writeHtml(leon.view.web.LyWebPageWriter)
public java.awt.Image[] getImages()
getImages
in interface leon.view.web.struts.map.LyStrutsMapElement
LyStrutsMapElement.getImages()
public void drawInViewer(leon.view.web.struts.map.LyStrutsMapCanvas map, java.awt.Graphics g)
drawInViewer
in interface leon.view.web.struts.map.LyStrutsMapElement
map
- the mapg
- the graphical contextleon.view.web.struts.map.LyStrutsMapElement#drawInViewer(leon.view.web.struts.map.LyStrutsMapCanvas,
java.awt.Graphics, int)
public void draw(leon.view.web.struts.map.LyStrutsMapCanvas map, java.awt.Graphics g, int mode)
draw
in interface leon.view.web.struts.map.LyStrutsMapElement
map
- the mapg
- the graphical contextmode
- drawing modeLyStrutsMapElement.draw(leon.view.web.struts.map.LyStrutsMapCanvas,
java.awt.Graphics, int)
public void draw(leon.view.web.struts.map.LyStrutsMapCanvas map, java.awt.Graphics g, int mode, boolean forceDraw, int level)
map
- the map of this regiong
- ths graphics contextmode
- the map styleforceDraw
- indicates if the region must be drawnlevel
- te level of the region (its children will be at the level
level+1
for example)public Ly3DBox getBoundingBox(leon.view.web.struts.map.LyStrutsMapCanvas map)
getBoundingBox
in interface leon.view.web.struts.map.LyStrutsMapElement
map
- the map
LyStrutsMapElement.getBoundingBox(leon.view.web.struts.map.LyStrutsMapCanvas)
public java.awt.Polygon getBoundingShape(leon.view.web.struts.map.LyStrutsMapCanvas map)
map
- the region map
public java.awt.Rectangle getBoundingRectangle(leon.view.web.struts.map.LyStrutsMapCanvas map)
getBoundingRectangle
in interface leon.view.web.struts.map.LyStrutsMapElement
map
- the map
LyStrutsMapElement.getBoundingRectangle(leon.view.web.struts.map.LyStrutsMapCanvas)
public java.awt.Shape getClippingArea(leon.view.web.struts.map.LyStrutsMapCanvas map, java.awt.Image image)
getClippingArea
in interface leon.view.web.struts.map.LyStrutsMapElement
map
- the mapimage
- the image
LyStrutsMapElement.getClippingArea(leon.view.web.struts.map.LyStrutsMapCanvas,
java.awt.Image)
public int getLayer()
getLayer
in interface leon.view.web.struts.map.LyStrutsMapElement
LyStrutsMapElement.getLayer()
public java.lang.String getLabel()
getLabel
in interface leon.view.web.struts.map.LyStrutsMapElement
LyStrutsMapElement.getLabel()
public void drawHtml(leon.view.web.struts.map.LyStrutsMapCanvas map, LyWebPageWriter pw)
drawHtml
in interface leon.view.web.struts.map.LyStrutsMapElement
map
- the map where the element must be drawnpw
- the page writerLyStrutsMapElement.drawHtml(leon.view.web.struts.map.LyStrutsMapCanvas,
leon.view.web.LyWebPageWriter)
public void drawHtml(leon.view.web.struts.map.LyStrutsMapCanvas map, LyWebPageWriter pw, int level)
map
- the ragion mappw
- the page writerlevel
- the level of the region (for example, its children are at the level
level
+1public void drawHtmlPolygon(leon.view.web.struts.map.LyStrutsMapCanvas mapCanvas, LyWebPageWriter pw, LyPolygon polygon, boolean selected)
mapCanvas
- the map canvaspw
- the page writerpolygon
- the polygon to drawselected
- indicates whether polygon is selected or notpublic void drawHtmlTooltip(leon.view.web.struts.map.LyStrutsMapCanvas mapCanvas, LyWebPageWriter pw, boolean smallImage)
mapCanvas
- the map canvaspw
- the web page writersmallImage
- indicates whether tooltip is needed for the small image or notpublic java.lang.String getTooltip()
getTooltip
in interface leon.view.web.struts.map.LyStrutsMapElement
LyStrutsMapElement.getTooltip()
public java.lang.String getSmallImageTooltip()
setSmallImageTooltip(String)
public boolean isDrawableInterface(leon.view.web.struts.map.LyStrutsMapCanvas map)
isDrawableInterface
in interface leon.view.web.struts.map.LyStrutsMapElement
map
- the map
public boolean isAtPosition(leon.view.web.struts.map.LyStrutsMapCanvas map, java.awt.Graphics g, int x, int y)
isAtPosition
in interface leon.view.web.struts.map.LyStrutsMapElement
map
- the mapg
- the graphical contextx
- the x coordonatey
- the y coordonate
LyStrutsMapElement.isAtPosition(leon.view.web.struts.map.LyStrutsMapCanvas,
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.web.struts.map.LyStrutsMapElement
selected
- Boolean indicating if attribute selected is set or unset.LySetSelectedInterface.setSelected(boolean)
public void setSmallImageTooltip(java.lang.String tooltip)
setSmallImageTooltip
in interface LyGraphicalMapRegion
tooltip
- New value of smallImageTooltip.LyGraphicalMapRegion.setSmallImageTooltip(java.lang.String)
public void setWeight(float weight)
setWeight
in interface LyGraphicalMapRegion
weight
- New value of weight.LyGraphicalMapRegion.setWeight(float)
public void setSmallImage(java.lang.String smallImage)
setSmallImage
in interface LyGraphicalMapRegion
smallImage
- New value of smallImage.LyGraphicalMapRegion.setSmallImage(java.lang.String)
public boolean isSelected()
isSelected
in interface leon.view.web.struts.map.LyStrutsMapElement
LyStrutsMapElement.isSelected()
public void translate(float dx, float dy, float dz)
translate
in interface leon.view.web.struts.map.LyStrutsMapElement
dx
- x translation.dy
- y translation.dz
- z translation.LyStrutsMapElement.translate(float, float, float)
public boolean isOverlay()
isOverlay
in interface leon.view.web.struts.map.LyStrutsMapElement
LyStrutsMapElement.isOverlay()
public boolean isHidden()
isHidden
in interface leon.view.web.struts.map.LyStrutsMapElement
LyStrutsMapElement.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 isSensitive()
isSensitive
in interface leon.view.web.struts.map.LyStrutsMapElement
LyStrutsMapElement.isSensitive()
public void addMapRegion(LyMapRegion mapRegion, int pos)
addMapRegion
in interface LyGraphicalMapRegion
mapRegion
- The mapRegions to add to mapRegions list.pos
- Position where the sub-component is inserted.LyGraphicalMapRegion.addMapRegion(leon.view.LyMapRegion, int)
public void removeMapRegion(LyMapRegion mapRegion)
removeMapRegion
in interface LyGraphicalMapRegion
mapRegion
- The mapRegions to remove to mapRegions list.LyGraphicalMapRegion.removeMapRegion(leon.view.LyMapRegion)
public void setLabelFrame(java.awt.Rectangle rect)
rect
- the new label framegetLabelFrame()
public java.util.Vector<LyPoint> getPoints()
public java.awt.Rectangle getLabelFrame()
setLabelFrame(Rectangle)
public java.awt.Rectangle getSmallImageBounds()
public void resetPosition()
resetPosition
in interface leon.view.web.struts.map.LyStrutsMapElement
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |