|
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.LyStrutsMapNode
public class LyStrutsMapNode
This class implements the Map Node object (as described in the dtd) for Struts viewer.
MAP_NODE: Map Node
Nodes allow to define elements that can be placed at any location on the map and that can be
moved. By using a special positioning manager, it is possible to place these nodes according to a
predefined geometry (matrix, circle, ellipse, line,...). When zooming on the map, a node keeps
always the same aspect unlike an element of image type.
LyMap
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static int |
DEFAULT_SIZE
Default size. |
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 | |
---|---|
LyStrutsMapNode(LyMapNode mapNode)
Class constructor of a Map object for the struts target. |
Method Summary | |
---|---|
void |
draw(leon.view.web.struts.map.LyStrutsMapCanvas map,
java.awt.Graphics g,
int mode)
(non-Javadoc). |
void |
drawHtml(leon.view.web.struts.map.LyStrutsMapCanvas map,
LyWebPageWriter pw)
(non-Javadoc). |
void |
drawInViewer(leon.view.web.struts.map.LyStrutsMapCanvas map,
java.awt.Graphics g)
(non-Javadoc). |
void |
free()
Free resources allocated to this component. |
java.lang.String |
getBottomLabel()
(non-Javadoc). |
java.awt.Dimension |
getBottomLabelSize(java.awt.Graphics g)
Returns the dimension of the bottom label part of the node. |
java.awt.Dimension |
getBottomLabelSize(java.awt.Graphics g,
boolean recalculate)
Returns the dimension of the bottom label part of the node. |
Ly3DBox |
getBoundingBox(leon.view.web.struts.map.LyStrutsMapCanvas map)
(non-Javadoc). |
java.awt.Rectangle |
getBoundingRectangle(leon.view.web.struts.map.LyStrutsMapCanvas map)
(non-Javadoc). |
LyPoint |
getCenter()
Gets the center of the node. |
java.awt.Shape |
getClippingArea(leon.view.web.struts.map.LyStrutsMapCanvas map,
java.awt.Image image)
(non-Javadoc). |
java.awt.Color |
getCrossColor()
Gets the cross color. |
java.awt.Color |
getExternalFrameColor()
Gets the external frame color. |
java.lang.String |
getId()
(non-Javadoc). |
java.awt.Image |
getImage()
Gets the image of the node. |
java.awt.Image[] |
getImages()
(non-Javadoc). |
int[] |
getImageSize()
Gets the dimension of the image part of the node. |
java.awt.Dimension |
getImageSize(java.awt.Component comp)
Gets the dimension of the image part of the node. |
java.awt.Dimension |
getImageSize(java.awt.Component comp,
boolean recalculate)
Gets the dimension of the image part of the node. |
java.awt.Color |
getInternalFrameColor()
Gets the internal frame color. |
java.lang.String |
getLabel()
(non-Javadoc). |
java.awt.Dimension |
getLabelSize(java.awt.Graphics g)
Gets the dimension of the label part of the node. |
java.awt.Dimension |
getLabelSize(java.awt.Graphics g,
boolean recalculate)
Gets the dimension of the label part of the node. |
int |
getLayer()
(non-Javadoc). |
java.lang.String |
getLayoutInfo()
Gets the layout info of the node. |
java.lang.String |
getLeftLabel()
(non-Javadoc). |
java.awt.Dimension |
getLeftLabelSize(java.awt.Graphics g)
Returns the dimension of the left label part of the node. |
java.awt.Dimension |
getLeftLabelSize(java.awt.Graphics g,
boolean recalculate)
Returns the dimension of the left label part of the node. |
java.awt.Rectangle |
getNodeBoundingRectangle(leon.view.web.struts.map.LyStrutsMapCanvas map)
Gets the node bounding rectangle. |
java.awt.Color |
getNodeColor()
Gets the node color. |
java.awt.Color |
getOutlineColor()
Gets the outline color. |
LyStrutsMapNode |
getParentNode()
Gets the parent node of the node. |
java.lang.String |
getRightLabel()
(non-Javadoc). |
java.awt.Dimension |
getRightLabelSize(java.awt.Graphics g)
Returns the dimension of the right label part of the node. |
java.awt.Dimension |
getRightLabelSize(java.awt.Graphics g,
boolean recalculate)
Returns the dimension of the right label part of the node. |
java.awt.Rectangle |
getSelectBoundingRectangle(leon.view.web.struts.map.LyStrutsMapCanvas map)
Gets the bounding rectangle where the checkbox can be selected. |
java.awt.Image |
getSmallImage()
Gets the small image of the node. |
java.awt.Dimension |
getSymbolSize(java.awt.Component comp)
Gets the dimension of the image part of the node (without the frame) if the style of the node is leon.view.LyMapNode#Style.IMAGE , the default size otherwise. |
java.lang.String |
getTooltip()
(non-Javadoc). |
java.lang.String |
getTopLabel()
(non-Javadoc). |
java.awt.Dimension |
getTopLabelSize(java.awt.Graphics g)
Returns the dimension of the top label part of the node. |
java.awt.Dimension |
getTopLabelSize(java.awt.Graphics g,
boolean recalculate)
Returns the dimension of the top label part of the node. |
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)
(non-Javadoc). |
boolean |
isHidden()
(non-Javadoc). |
boolean |
isOverlay()
(non-Javadoc). |
boolean |
isSelected()
(non-Javadoc). |
boolean |
isSensitive()
(non-Javadoc). |
void |
refresh()
Refresh map containing this map link. |
void |
resetPosition()
Generates the Javascript code that resets the position of the element. |
java.lang.String |
saveImage(java.awt.Image image,
java.lang.String filename)
Saves the given image with the given file name and return the image path if save is successful. |
void |
setBottomLabel(java.lang.String label)
(non-Javadoc). |
void |
setColorFrameExt(java.lang.String colorFrameExt)
Updates attribute colorFrameExt to the given value. |
void |
setColorFrameInt(java.lang.String colorFrameInt)
Updates attribute colorFrameInt to the given value. |
void |
setFontColor(java.lang.String labelColor)
Updates attribute fontColor to the given value. |
void |
setHidden(boolean hidden)
(non-Javadoc). |
void |
setImage(java.lang.String image)
(non-Javadoc). |
void |
setLabel(java.lang.String label)
(non-Javadoc). |
void |
setLayer(int layer)
(non-Javadoc). |
void |
setLeftLabel(java.lang.String label)
(non-Javadoc). |
void |
setParentNode(LyStrutsMapNode node)
Sets the parent node. |
void |
setPosition(LyPoint point3D)
(non-Javadoc). |
void |
setRightLabel(java.lang.String label)
(non-Javadoc). |
void |
setSelected(boolean selected)
(non-Javadoc). |
void |
setTooltip(java.lang.String tooltip)
Sets attribute tooltip to the given value. |
void |
setTopLabel(java.lang.String label)
(non-Javadoc). |
void |
setViewerImage(java.lang.String viewerImage)
Updates attribute viewerImage to the given value. |
void |
setX(float x)
(non-Javadoc). |
void |
setY(float y)
(non-Javadoc). |
void |
setZ(float z)
(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, getDisabledImageUrl, getFontSize, getFontString, getFontString, getFontString, getHexColor, getHexColor, getHtmlEntitiesString, getHtmlString, getImageSize, getImageSize, getImageUrl, getJavascriptString, getLastFrameName, getLyFont, getMessage, getRootUrl, getRootURL, getScrollHeightForSplitter, getUrl, getWebViewManager, 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 |
---|
getViewComponent |
Field Detail |
---|
public static final java.lang.String __VERSION
public static int DEFAULT_SIZE
Constructor Detail |
---|
public LyStrutsMapNode(LyMapNode mapNode)
map
- the generic Map defined for every type of view targets.Method Detail |
---|
public void free()
LyGraphicalObject
free
in interface LyGraphicalComponent
free
in interface LyFreeInterface
free
in class LyWebObject
LyFreeInterface.free()
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 setX(float x)
setX
in interface LyGraphicalMapNode
x
- New value of x.LyGraphicalMapNode.setX(float)
public void setY(float y)
setY
in interface LyGraphicalMapNode
y
- New value of y.LyGraphicalMapNode.setY(float)
public void setZ(float z)
setZ
in interface LyGraphicalMapNode
z
- New value of z.LyGraphicalMapNode.setZ(float)
public void setLayer(int layer)
setLayer
in interface LyGraphicalMapNode
layer
- New value of layer.LyGraphicalMapNode.setLayer(int)
public void resetPosition()
resetPosition
in interface leon.view.web.struts.map.LyStrutsMapElement
public void setPosition(LyPoint point3D)
setPosition
in interface leon.view.web.struts.map.LyStrutsLayElement
point3D
- the three dimensions pointLyStrutsLayElement.setPosition(leon.view.LyPoint)
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 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 java.lang.String saveImage(java.awt.Image image, java.lang.String filename)
filename
.gif
image
- the image to savefilename
- the file name of the image (without extention)
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.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.Rectangle getNodeBoundingRectangle(leon.view.web.struts.map.LyStrutsMapCanvas map)
map
- the node map
public java.awt.Rectangle getSelectBoundingRectangle(leon.view.web.struts.map.LyStrutsMapCanvas map)
map
- the node map
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 java.lang.String getLeftLabel()
leon.view.graphic.LyGraphicalMapNode#getLeftLabel()
public java.lang.String getRightLabel()
leon.view.graphic.LyGraphicalMapNode#getRightLabel()
public java.lang.String getTopLabel()
leon.view.graphic.LyGraphicalMapNode#getTopLabel()
public java.lang.String getBottomLabel()
leon.view.graphic.LyGraphicalMapNode#getBottomLabel()
public java.lang.String getTooltip()
getTooltip
in interface leon.view.web.struts.map.LyStrutsMapElement
LyStrutsMapElement.getTooltip()
public void setTooltip(java.lang.String tooltip)
tooltip
- New value of the tooltipgetTooltip()
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 setHidden(boolean hidden)
setHidden
in interface LyGraphicalMapNode
setHidden
in interface LySetHiddenInterface
hidden
- Boolean indicating if attribute hidden is set or unset.LySetHiddenInterface.setHidden(boolean)
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 boolean isSensitive()
isSensitive
in interface leon.view.web.struts.map.LyStrutsMapElement
LyStrutsMapElement.isSensitive()
public void setParentNode(LyStrutsMapNode node)
node
- the new parent nodegetParentNode()
public LyPoint getCenter()
public LyStrutsMapNode getParentNode()
setParentNode(LyStrutsMapNode)
public java.lang.String getLayoutInfo()
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 java.awt.Image getImage()
setImage(String)
public java.awt.Image getSmallImage()
public java.awt.Color getNodeColor()
public java.awt.Color getCrossColor()
public java.awt.Color getInternalFrameColor()
public java.awt.Color getExternalFrameColor()
public java.awt.Color getOutlineColor()
public int[] getImageSize()
getImageSize(Component, boolean)
public java.awt.Dimension getImageSize(java.awt.Component comp)
comp
- the map of the node
getImageSize(Component, boolean)
public java.awt.Dimension getSymbolSize(java.awt.Component comp)
leon.view.LyMapNode#Style.IMAGE
, the default size otherwise.
comp
- the map
public java.awt.Dimension getImageSize(java.awt.Component comp, boolean recalculate)
comp
- the maprecalculate
- indicates if the size must be recalculated
public java.awt.Dimension getLabelSize(java.awt.Graphics g)
g
- the graphics context
public java.awt.Dimension getLabelSize(java.awt.Graphics g, boolean recalculate)
g
- the graphics contextrecalculate
- indicates if the size must be recalculated
public java.awt.Dimension getLeftLabelSize(java.awt.Graphics g)
g
- the graphics context
public java.awt.Dimension getLeftLabelSize(java.awt.Graphics g, boolean recalculate)
g
- the graphics contextrecalculate
- indicates if the size must be recalculated
public java.awt.Dimension getRightLabelSize(java.awt.Graphics g)
g
- the graphics context
public java.awt.Dimension getRightLabelSize(java.awt.Graphics g, boolean recalculate)
g
- the graphics contextrecalculate
- indicates if the size must be recalculated
public java.awt.Dimension getTopLabelSize(java.awt.Graphics g)
g
- the graphics context
public java.awt.Dimension getTopLabelSize(java.awt.Graphics g, boolean recalculate)
g
- the graphics contextrecalculate
- indicates if the size must be recalculated
public java.awt.Dimension getBottomLabelSize(java.awt.Graphics g)
g
- the graphics context
public java.awt.Dimension getBottomLabelSize(java.awt.Graphics g, boolean recalculate)
g
- the graphics contextrecalculate
- indicates if the size must be recalculated
public boolean isDrawableInterface(leon.view.web.struts.map.LyStrutsMapCanvas map)
isDrawableInterface
in interface leon.view.web.struts.map.LyStrutsMapElement
map
- the map
LyStrutsMapElement.isDrawableInterface(leon.view.web.struts.map.LyStrutsMapCanvas)
public void setSelected(boolean selected)
setSelected
in interface LyGraphicalMapNode
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 refresh()
refreshMapImage()
on the LyStrutsMapLink
instance.
refresh
in class LyWebObject
public void setLabel(java.lang.String label)
setLabel
in interface LyGraphicalMapNode
setLabel
in interface LySetLabelInterface
label
- New value of label.LySetLabelInterface.setLabel(java.lang.String)
public void setLeftLabel(java.lang.String label)
setLeftLabel
in interface LyGraphicalMapNode
label
- New value of leftLabel.LyGraphicalMapNode.setLeftLabel(String)
public void setRightLabel(java.lang.String label)
setRightLabel
in interface LyGraphicalMapNode
label
- New value of rightLabel.LyGraphicalMapNode.setRightLabel(String)
public void setTopLabel(java.lang.String label)
setTopLabel
in interface LyGraphicalMapNode
label
- New value of topLabel.LyGraphicalMapNode.setTopLabel(String)
public void setBottomLabel(java.lang.String label)
setBottomLabel
in interface LyGraphicalMapNode
label
- New value of bottomLabel.LyGraphicalMapNode.setBottomLabel(String)
public void setImage(java.lang.String image)
setImage
in interface LyGraphicalMapNode
setImage
in interface LySetImageInterface
image
- New value of image.LySetImageInterface.setImage(java.lang.String)
public void setColorFrameInt(java.lang.String colorFrameInt)
LyGraphicalMapNode
setColorFrameInt
in interface LyGraphicalMapNode
colorFrameInt
- New value of colorFrameInt.public void setColorFrameExt(java.lang.String colorFrameExt)
LyGraphicalMapNode
setColorFrameExt
in interface LyGraphicalMapNode
colorFrameExt
- New value of colorFrameExt.public void setFontColor(java.lang.String labelColor)
LyGraphicalMapNode
setFontColor
in interface LyGraphicalMapNode
labelColor
- New value of fontColor.public void setViewerImage(java.lang.String viewerImage)
LyGraphicalMapNode
setViewerImage
in interface LyGraphicalMapNode
viewerImage
- New value of viewerImage.
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |