|
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.LySwingMapNode
public class LySwingMapNode
This class implements the Map node object (as described in the dtd) for swing viewer.
LyMapNode
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static int |
DEFAULT_SIZE
Default size of the image node. |
Fields inherited from interface leon.view.win.swing.map.LyMapElement |
---|
NORMAL_MODE, REDUCED_MODE |
Constructor Summary | |
---|---|
LySwingMapNode(LyMapNode mapNode)
Class constructor of a Map node object for the Swing target. |
Method Summary | |
---|---|
void |
draw(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g,
int mode)
(non-Javadoc). |
void |
drawInViewer(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g)
(non-Javadoc). |
void |
free()
Free the map node. |
leon.view.win.swing.map.LyMapNodeBeanInterface |
getBean()
Build the bean associated to this node. |
java.lang.String |
getBottomLabel()
Implementation of LyMapElement. |
java.awt.Dimension |
getBottomLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g)
Returns the dimension of the bottom label part of the node. |
java.awt.Dimension |
getBottomLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g,
boolean recalculate)
Returns the dimension of the bottom label part of the node. |
Ly3DBox |
getBoundingBox(leon.view.win.swing.map.LyAbstractMapComponentManager map)
(non-Javadoc). |
java.awt.Rectangle |
getBoundingRectangle(leon.view.win.swing.map.LyAbstractMapComponentManager map)
(non-Javadoc). |
java.awt.Rectangle |
getBoundingRectangleOfChild(leon.view.win.swing.map.LyAbstractMapComponentManager map,
double alpha)
Returns the rectangle of the largest child node. |
LyPoint |
getCenter()
Returns the center of the node. |
java.util.Vector<LySwingMapNode> |
getChildren()
Returns all children of the node. |
java.awt.Shape |
getClippingArea(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Image image)
Gets the clipping area of this node. |
java.awt.Color |
getCrossColor(LyEnvironment environment)
Returns the cross color of the node or null if there is none. |
java.awt.Color |
getExternalFrameColor(LyEnvironment environment)
Returns the external frame color of the node or null if there is none. |
java.awt.Color |
getFontColor(LyEnvironment environment)
Returns the font color of the node. |
java.lang.String |
getId()
Return current component identification (LyGetIdInterface interface). |
java.awt.Image |
getImage(LyEnvironment environment)
Returns the image of the node in the specified environment. |
java.awt.Image[] |
getImages()
Returns the image and small image of this node. |
java.awt.Dimension |
getImageSize(java.awt.Component comp)
Returns the dimension of the image part of the node. |
java.awt.Dimension |
getImageSize(java.awt.Component comp,
boolean recalculate)
Returns the dimension of the image part of the node. |
java.awt.Color |
getInactiveSelectedColor(LyEnvironment environment)
Returns the inactive selected color of the node. |
java.awt.Color |
getInternalFrameColor(LyEnvironment environment)
Returns the internal frame color of the node or null if there is none. |
java.lang.String |
getLabel()
(non-Javadoc). |
java.awt.Dimension |
getLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g)
Returns the dimension of the label part of the node. |
java.awt.Dimension |
getLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g,
boolean recalculate)
Returns the dimension of the label part of the node. |
int |
getLayer()
(non-Javadoc). |
java.lang.String |
getLayoutInfo()
Returns the layout info of the node. |
java.lang.String |
getLeftLabel()
Implementation of LyMapElement. |
java.awt.Dimension |
getLeftLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g)
Returns the dimension of the left label part of the node. |
java.awt.Dimension |
getLeftLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g,
boolean recalculate)
Returns the dimension of the left label part of the node. |
LyMapNode.Style |
getMapNodeStyle()
getMapNodeStyle |
java.awt.Color |
getNodeColor(LyEnvironment environment)
Returns the current node color or null if there is none. |
int |
getNumberOfChildren()
Returns the children count. |
java.awt.Point |
getOffset()
Returns the shift between the node and his parent. |
java.awt.Color |
getOutlineColor(LyEnvironment environment)
Returns the outline color of the node. |
LySwingMapNode |
getParentNode()
Returns the parent node of the node. |
java.lang.String |
getRightLabel()
Implementation of LyMapElement. |
java.awt.Dimension |
getRightLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g)
Returns the dimension of the right label part of the node. |
java.awt.Dimension |
getRightLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g,
boolean recalculate)
Returns the dimension of the right label part of the node. |
java.awt.Color |
getSelectedColor(LyEnvironment environment)
Returns the selected color of the node. |
java.awt.Image |
getSmallImage(LyEnvironment environment)
Returns the small image of the node or null if there is none. |
java.awt.Dimension |
getSymbolSize(java.awt.Component comp)
Returns the dimension of the image part of the node (without the frame). |
java.lang.String |
getTooltip()
(non-Javadoc). |
java.lang.String |
getTopLabel()
Implementation of LyMapElement. |
java.awt.Dimension |
getTopLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g)
Returns the dimension of the top label part of the node. |
java.awt.Dimension |
getTopLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g,
boolean recalculate)
Returns the dimension of the top label part of the node. |
boolean |
isAtPosition(leon.view.win.swing.map.LyAbstractMapComponentManager map,
java.awt.Graphics g,
int x,
int y)
(non-Javadoc). |
boolean |
isHidden()
Indicates whether this element is hidden or not. |
boolean |
isLabelZoomable()
Return true is displayed label should be zoom dependant. |
boolean |
isMovable()
Checks if value of attribute movable is set. |
boolean |
isOverlay()
A map node has always the overlay property. |
boolean |
isSelected()
(non-Javadoc). |
boolean |
isSensitive()
(non-Javadoc). |
void |
setBottomLabel(java.lang.String label)
Sets attribute bottom label to the given value. |
void |
setChild(LySwingMapNode node)
Sets the child node of this node if the child element is not already in the children list. |
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)
Updates attribute hidden to the given value. |
void |
setImage(java.lang.String image)
Sets this node image name to null to get rid of cache. |
void |
setLabel(java.lang.String label)
Sets the label attribute and its offset to null in order to get rid of cache. |
void |
setLayer(int layer)
(non-Javadoc). |
void |
setLeftLabel(java.lang.String label)
Sets attribute left label to the given value. |
void |
setMovable(boolean movable)
Initializes attribute movable to the given value. |
void |
setOffset(java.awt.Point offset)
Sets the offset between this component and its parent. |
void |
setParentNode(LySwingMapNode node)
Sets the parent node of this node. |
void |
setPosition(LyPoint point3D)
(non-Javadoc). |
void |
setRightLabel(java.lang.String label)
Sets attribute right label to the given value. |
void |
setSelected(boolean selected)
Updates attribute selected to the given value. |
void |
setTooltip(java.lang.String tooltip)
Do not set tooltips of a map node as it is not used. |
void |
setTopLabel(java.lang.String label)
Sets attribute top label to the given value. |
void |
setViewerImage(java.lang.String viewerImage)
Updates attribute viewerImage to the given value. |
void |
setX(float x)
Updates attribute x to the given value. |
void |
setY(float y)
Updates attribute y to the given value. |
void |
setZ(float z)
Updates attribute z to the given value. |
java.lang.String |
toString()
|
void |
translate(float dx,
float dy,
float dz)
(non-Javadoc). |
Methods inherited from class leon.view.win.swing.LySwingObject |
---|
getBounds, getChildrenBounds, getComponent, getDefaultFrame |
Methods inherited from class leon.view.graphic.LyGraphicalObject |
---|
expand, 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, 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 LySwingMapNode(LyMapNode mapNode)
mapNode
- a MAP_NODE component defined for every type of view targets. This map node is
initialized for the swing view.Method Detail |
---|
public java.awt.Image[] getImages()
getImages
in interface leon.view.win.swing.map.LyMapElement
setImage(String)
,
LyMapElement.getImages()
public java.awt.Image getImage(LyEnvironment environment)
environment
- the environment
setImage(String)
public java.awt.Image getSmallImage(LyEnvironment environment)
null
if there is none.
environment
- the environment is not needed to find the small image. This parameter is
not used in this implementation.
public java.awt.Color getNodeColor(LyEnvironment environment)
null
if there is none.
environment
- the environment is not needed to find this node color. This parameter is
not used in this implementation.
public java.awt.Color getCrossColor(LyEnvironment environment)
null
if there is none.
environment
- the environment is not needed to find this node cross color. This
parameter is not used in this implementation.
public java.awt.Color getInternalFrameColor(LyEnvironment environment)
null
if there is none.
environment
- the environment is not needed to find this node's internal frame color.
This parameter is not used in this implementation.
public java.awt.Color getExternalFrameColor(LyEnvironment environment)
null
if there is none.
environment
- the environment is not needed to find this node's external frame color.
This parameter is not used in this implementation.
public java.awt.Color getSelectedColor(LyEnvironment environment)
environment
- the environment is not needed to find the selected color of this node.
This parameter is not used in this implementation.
public java.awt.Color getInactiveSelectedColor(LyEnvironment environment)
environment
- the environment is not needed to find the inactive selected color of this
node. This parameter is not used in this implementation.
public java.awt.Color getOutlineColor(LyEnvironment environment)
environment
- the environment is not needed to find the outline color of this node.
This parameter is not used in this implementation.
public java.awt.Color getFontColor(LyEnvironment environment)
environment
- the environment is not needed to find the font color of this node. This
parameter is not used in this implementation.
public java.awt.Dimension getImageSize(java.awt.Component comp)
comp
- the map
getImageSize(Component, boolean)
public java.awt.Dimension getSymbolSize(java.awt.Component comp)
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(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g)
map
- the map representing the nodeg
- the graphics context
#getLabelSize(Graphics, boolean)
public java.awt.Dimension getLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g, boolean recalculate)
map
- the map representing the nodeg
- the graphics contextrecalculate
- indicates if the size must be recalculated
public java.awt.Dimension getLeftLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g)
map
- the map representing the nodeg
- the graphics contextpublic java.awt.Dimension getLeftLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g, boolean recalculate)
map
- the map representing the nodeg
- the graphics contextrecalculate
- indicates if the size must be recalculatedpublic java.awt.Dimension getRightLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g)
map
- the map representing the nodeg
- the graphics contextpublic java.awt.Dimension getRightLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g, boolean recalculate)
map
- the map representing the nodeg
- the graphics contextrecalculate
- indicates if the size must be recalculatedpublic java.awt.Dimension getTopLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g)
map
- the map representing the nodeg
- the graphics contextpublic java.awt.Dimension getTopLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g, boolean recalculate)
map
- the map representing the nodeg
- the graphics contextrecalculate
- indicates if the size must be recalculatedpublic java.awt.Dimension getBottomLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g)
map
- the map representing the nodeg
- the graphics contextpublic java.awt.Dimension getBottomLabelSize(leon.view.win.swing.map.LyAbstractMapComponentManager map, java.awt.Graphics g, boolean recalculate)
map
- the map representing the nodeg
- the graphics contextrecalculate
- indicates if the size must be recalculatedpublic 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 modeLyMapElement.draw(leon.view.win.swing.map.LyAbstractMapComponentManager,
java.awt.Graphics, int)
public 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 component to retrieve its bounding box
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 component to retrieve its bounding rectangle
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 java.awt.Rectangle getBoundingRectangleOfChild(leon.view.win.swing.map.LyAbstractMapComponentManager map, double alpha)
map
- the map representing the nodealpha
- angle of node points alignment
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 getLeftLabel()
public java.lang.String getRightLabel()
public java.lang.String getTopLabel()
public java.lang.String getBottomLabel()
public void setLabel(java.lang.String label)
null
in order to get rid of cache.
setLabel
in interface LyGraphicalMapNode
setLabel
in interface LySetLabelInterface
label
- This attribute is not used in this implementation.getLabel()
public void setLeftLabel(java.lang.String label)
setLeftLabel
in interface LyGraphicalMapNode
label
- New value of left labelpublic void setRightLabel(java.lang.String label)
setRightLabel
in interface LyGraphicalMapNode
label
- New value of right labelpublic void setTopLabel(java.lang.String label)
setTopLabel
in interface LyGraphicalMapNode
label
- New value of top labelpublic void setBottomLabel(java.lang.String label)
setBottomLabel
in interface LyGraphicalMapNode
label
- New value of bottom labelpublic java.lang.String getTooltip()
getTooltip
in interface leon.view.win.swing.map.LyMapElement
LyMapElement.getTooltip()
public void setTooltip(java.lang.String tooltip)
tooltip
- This attribute is not used in this implementation.getTooltip()
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()
LyGetIdInterface
getId
in interface LyGetIdInterface
public void setSelected(boolean selected)
LyGraphicalMapNode
setSelected
in interface LyGraphicalMapNode
setSelected
in interface LySetSelectedInterface
setSelected
in interface leon.view.win.swing.map.LyMapElement
selected
- Boolean indicating if attribute selected is set or unset.public boolean isHidden()
leon.view.win.swing.map.LyMapElement
isHidden
in interface leon.view.win.swing.map.LyMapElement
true
if this element is hidden, false
otherwisepublic void setHidden(boolean hidden)
LyGraphicalMapNode
setHidden
in interface LyGraphicalMapNode
setHidden
in interface LySetHiddenInterface
hidden
- Boolean indicating if attribute hidden is set or unset.public boolean isMovable()
public void setMovable(boolean movable)
movable
- Boolean indicating if attribute movable is set or unset.public void setImage(java.lang.String image)
null
to get rid of cache.
setImage
in interface LyGraphicalMapNode
setImage
in interface LySetImageInterface
image
- This attribute is not used in this implementation.getImage(LyEnvironment)
,
LySetImageInterface.setImage(java.lang.String)
public void setX(float x)
LyGraphicalMapNode
setX
in interface LyGraphicalMapNode
x
- New value of x.public void setY(float y)
LyGraphicalMapNode
setY
in interface LyGraphicalMapNode
y
- New value of y.public void setZ(float z)
LyGraphicalMapNode
setZ
in interface LyGraphicalMapNode
z
- New value of z.public void setLayer(int layer)
setLayer
in interface LyGraphicalMapNode
layer
- New value of layer.LyGraphicalMapNode.setLayer(int)
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 boolean isSelected()
isSelected
in interface leon.view.win.swing.map.LyMapElement
true
if this element is selected, false
otherwiseLyMapElement.isSelected()
public void translate(float dx, float dy, float dz)
translate
in interface leon.view.win.swing.map.LyMapElement
dx
- the x translation delta.dy
- the y translation delta.dz
- the z translation delta.LyMapElement.translate(float, float, float)
public void setPosition(LyPoint point3D)
setPosition
in interface leon.view.win.swing.map.LyLayElement
point3D
- the position of the element in the 3D space.LyLayElement.setPosition(leon.view.LyPoint)
public boolean isOverlay()
isOverlay
in interface leon.view.win.swing.map.LyMapElement
true
LyMapElement.isOverlay()
public boolean isSensitive()
isSensitive
in interface leon.view.win.swing.map.LyMapElement
true
if this element is sensitive, false
otherwiseLyMapElement.isSensitive()
public void setOffset(java.awt.Point offset)
offset
- the new value of the offsetgetOffset()
public void setParentNode(LySwingMapNode node)
node
- the parent nodegetParentNode()
public void setChild(LySwingMapNode node)
node
- the child nodegetChildren()
public LyPoint getCenter()
public java.awt.Point getOffset()
setOffset(Point)
public LySwingMapNode getParentNode()
setParentNode(LySwingMapNode)
public java.util.Vector<LySwingMapNode> getChildren()
setChild(LySwingMapNode)
public int getNumberOfChildren()
public java.lang.String getLayoutInfo()
public leon.view.win.swing.map.LyMapNodeBeanInterface getBean()
public void free()
free
in interface LyGraphicalComponent
free
in interface LyFreeInterface
free
in class LyGraphicalObject
LyFreeInterface.free()
public LyMapNode.Style getMapNodeStyle()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isLabelZoomable()
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 |