|
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.LyStrutsMapLink
public class LyStrutsMapLink
This class implements the Map Link object (as described in the dtd) for Struts viewer.
MAP_LINK: Map Link
Map links allow to define segments between two nodes
of the map. If one of the two nodes defining the link is moved, the link follows the moved node
so that it always starts from its source node and that it always arrives to its destination node.
LyMapLink
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static int |
SELECTION_OFFSET
Offset between the link and the selection area. |
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 | |
---|---|
LyStrutsMapLink(LyMapLink mapLink)
Class constructor of a Map Link object for the struts target. |
Method Summary | |
---|---|
void |
addPoint(LyPoint point,
int pos)
This method does nothing. |
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 |
drawLabels(leon.view.web.struts.map.LyStrutsMapCanvas map,
java.awt.Graphics g,
int mode)
Draws the label of this link on the specified map. |
void |
drawLink(leon.view.web.struts.map.LyStrutsMapCanvas map,
java.awt.Graphics g,
int mode)
Draws the link. |
void |
free()
Free resources allocated to this component. |
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 bounding shape of the link. |
java.awt.Shape |
getClippingArea(leon.view.web.struts.map.LyStrutsMapCanvas map,
java.awt.Image image)
(non-Javadoc). |
java.awt.Color |
getColor()
Gets the color of the middle part of the link. |
java.awt.Color |
getColorEnd()
Gets the color of the end part of the link. |
java.awt.Color |
getColorStart()
Gets the color of the start part of the link. |
java.lang.String |
getEndLabel()
(non-Javadoc). |
java.awt.Dimension |
getEndLabelSize(java.awt.Graphics g)
Returns the dimension of the label part of the link. |
java.awt.Color |
getFontColor()
Gets the font color of the link. |
java.lang.String |
getId()
(non-Javadoc). |
java.awt.Image[] |
getImages()
Gets images used by this element and sets images class attributes with those new values. |
java.lang.String |
getLabel()
(non-Javadoc). |
java.awt.Dimension |
getLabelSize(java.awt.Graphics g)
Gets the dimension of the label part of the link. |
int |
getLayer()
(non-Javadoc). |
java.awt.Color |
getOutlineColor()
Gets the outline color of this map link. |
java.awt.Color |
getSelectedColor()
Gets the color of a selected link. |
java.lang.String |
getStartLabel()
(non-Javadoc). |
java.awt.Dimension |
getStartLabelSize(java.awt.Graphics g)
Returns the dimension of the label part of the link. |
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 is 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 |
refresh()
Refresh map containing this map link. |
void |
removePoint(LyPoint point)
This method does nothing. |
void |
resetPosition()
Generates the Javascript code that resets the position of the element. |
void |
setColor(java.lang.String color)
|
void |
setColorEnd(java.lang.String colorEnd)
Updates attribute colorEnd to the given value. |
void |
setColorStart(java.lang.String colorStart)
Updates attribute colorStart to the given value. |
void |
setEndLabel(java.lang.String leftLabel)
Set the left label and clear the label cache. |
void |
setEndNode(LyStrutsMapNode node)
Sets the end node. |
void |
setFontColor(java.lang.String labelColor)
|
void |
setHidden(boolean hidden)
(non-Javadoc). |
void |
setLabel(java.lang.String label)
(non-Javadoc). |
void |
setSelected(boolean selected)
(non-Javadoc). |
void |
setStartLabel(java.lang.String rightLabel)
Set the right label and clear the label cache. |
void |
setStartNode(LyStrutsMapNode node)
Sets the start node. |
void |
translate(float dx,
float dy,
float dz)
This method does nothing. |
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 final int SELECTION_OFFSET
Constructor Detail |
---|
public LyStrutsMapLink(LyMapLink mapLink)
mapLink
- the generic Map Link defined for every type of view targetsMethod 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 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.Color getColorStart()
public java.awt.Color getColor()
public java.awt.Color getColorEnd()
public java.awt.Color getSelectedColor()
public java.awt.Color getFontColor()
public java.awt.Color getOutlineColor()
public java.awt.Dimension getLabelSize(java.awt.Graphics g)
g
- the graphics context
public java.awt.Dimension getStartLabelSize(java.awt.Graphics g)
_labelWidth
and _labelHeight
values of this link are not set (equal -1), the width and height are computed
to the correct values for the label to be displayed.
g
- the graphics context
public java.awt.Dimension getEndLabelSize(java.awt.Graphics g)
_labelWidth
and _labelHeight
values of this link are not set (equal -1), the width and height are computed
to the correct values for the label to be displayed.
g
- the graphics context
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 void drawLabels(leon.view.web.struts.map.LyStrutsMapCanvas map, java.awt.Graphics g, int mode)
map
- the map containing the label to drawg
- the graphics contextmode
- the mode of the drawing, not used in this implementationpublic void drawLink(leon.view.web.struts.map.LyStrutsMapCanvas map, java.awt.Graphics g, int mode)
map
- the map of the linkg
- the graphics contextmode
- the drawing mode (can be LyStrutsMapElement.DRAW_MODE_NORMAL
or LyStrutsMapElement.DRAW_MODE_REDUCED
)public java.lang.String getId()
getId
in interface LyGetIdInterface
LyGetIdInterface.getId()
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.Polygon getBoundingShape(leon.view.web.struts.map.LyStrutsMapCanvas map)
map
- the map of the link
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 getStartLabel()
LyMapElement.getLabel()
public java.lang.String getEndLabel()
LyMapElement.getLabel()
public void setLabel(java.lang.String label)
setLabel
in interface LyGraphicalMapLink
setLabel
in interface LySetLabelInterface
label
- New value of label.LySetLabelInterface.setLabel(java.lang.String)
public java.lang.String getTooltip()
getTooltip
in interface leon.view.web.struts.map.LyStrutsMapElement
LyStrutsMapElement.getTooltip()
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 void setSelected(boolean selected)
setSelected
in interface LyGraphicalMapLink
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 boolean isSelected()
isSelected
in interface leon.view.web.struts.map.LyStrutsMapElement
LyStrutsMapElement.isSelected()
public void setHidden(boolean hidden)
setHidden
in interface LyGraphicalMapLink
setHidden
in interface LySetHiddenInterface
hidden
- Boolean indicating if attribute hidden is set or unset.LySetHiddenInterface.setHidden(boolean)
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 setStartNode(LyStrutsMapNode node)
node
- the new start nodepublic void setEndNode(LyStrutsMapNode node)
node
- the new end nodepublic void addPoint(LyPoint point, int pos)
addPoint
in interface LyGraphicalMapLink
point
- The points to add to points list.pos
- Position where the sub-component is inserted.LyGraphicalMapLink.addPoint(leon.view.LyPoint, int)
public void removePoint(LyPoint point)
removePoint
in interface LyGraphicalMapLink
point
- The points to remove to points list.LyGraphicalMapLink.removePoint(leon.view.LyPoint)
public void setColorStart(java.lang.String colorStart)
LyGraphicalMapLink
setColorStart
in interface LyGraphicalMapLink
colorStart
- New value of colorStart.public void setColor(java.lang.String color)
public void setColorEnd(java.lang.String colorEnd)
LyGraphicalMapLink
setColorEnd
in interface LyGraphicalMapLink
colorEnd
- New value of colorEnd.public void setFontColor(java.lang.String labelColor)
public void refresh()
refreshMapImage()
on the LyStrutsMapLink
instance.
refresh
in class LyWebObject
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 setEndLabel(java.lang.String leftLabel)
setEndLabel
in interface LyGraphicalMapLink
leftLabel
- New value of endLabel.leon.view.graphic.LyGraphicalMapLink#setLeftLabel(java.lang.String)
public void setStartLabel(java.lang.String rightLabel)
setStartLabel
in interface LyGraphicalMapLink
rightLabel
- New value of startLabel.leon.view.graphic.LyGraphicalMapLink#setRightLabel(java.lang.String)
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 |