|
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.LySwingFieldItem
leon.view.win.swing.LySwingPanel
leon.view.win.swing.LySwingMap
public class LySwingMap
This class implements the Map object (as described in the dtd) for swing viewer.
A map allows to display any type of map view: maps representing geographic or synoptic areas, displaying of elements with different types of positioning, displaying of nodes, links, images, etc.
There are four types of elements that can be placed on a map: the nodes, the links, the regions and the images. The elements placed on a map can be sensitive or not (except the images that can never be sensitive). It is possible to specify for the nodes and the links the layer on which they are. This layer allows to place the elements of a higher layer over the elements of a lower layer (for example, the elements of the layer 2 are placed over the elements of the layer 1).
The 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.
The 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.
The regions allow to represent geometric areas defined by a discrete set of points. These areas can be sensitive. It is notably possible to lead to other map views when launching an action over one of these regions.
It is possible to define the background that will be used for the map (defined by an image), the selection mode (none, simple or multiple), the visualization mode (through a viewer or with scroll bars) and to specify if the map is in two or three dimensions.
The possible movements on a map are translations, zooms (forward/backward) and rotations. A map in three dimensions allows spatial rotations enabling to display the regions in three dimensions. A map in two dimensions allows the axial rotations around the center of the map.
LyMap
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static java.lang.String |
IS_CONTROL_KEY_DOWN
The constant used to represent the key IS_CONTROL_KEY_DOWN |
static java.lang.String |
IS_SHIFT_KEY_DOWN
The constant used to represent the key IS_SHIFT_KEY_DOWN |
static java.lang.Class<?> |
MANAGER_CLASS
The class used as the map manager. |
static java.lang.Class<?> |
PANEL_CLASS
The class used as the panel component. |
Constructor Summary | |
---|---|
LySwingMap(LyMap map)
Class constructor of a Map object for the Swing target. |
Method Summary | |
---|---|
void |
actionPerformed(LyActionEvent actionEvent)
Invoked when an action occurs. |
void |
addComponent(LyComponent component,
int pos)
Adds a map component in this map at the specified position. |
leon.view.win.swing.map.LyMapContainer |
createMapContainer()
Creates a generic container for this map. |
void |
demandPerformed(LyDemand demand)
Invoked when a demand occurs. |
void |
free()
(non-Javadoc). |
java.awt.Component |
getComponent()
(non-Javadoc). |
java.lang.String |
getController()
Gets the controller associated with this map. |
java.lang.Object |
getLock()
Get a lock on the table to prevent concurrent access on rows. |
LySwingMapNode |
getNodeById(java.lang.String nodeId)
Gets the map node with the specified Id. |
void |
initialize()
Initializes the default swing values of this component and registers its listeners. |
void |
print(LyPrintListenerInterface listener)
Initializes the printing process and starts printing the content of the map on the default printer. |
void |
printEnd(java.awt.PrintJob job,
leon.view.win.swing.map.LyMapComponent canvas,
LyPrintListenerInterface listener)
Prints the content of the map with the specified printer job. |
void |
removeComponent(LyComponent component)
(non-Javadoc). |
void |
resetContent()
(non-Javadoc). |
void |
resetContent(boolean full)
(non-Javadoc). |
void |
selectionPerformed(LySelectionEvent selectionEvent)
Invoked when a selection occurs. |
void |
setContent()
Sets the content of this component. |
void |
setIdle(boolean status)
(non-Javadoc). |
void |
setLabel(java.lang.String label)
Sets the title of this map. |
void |
setLayout(LyLayout layout)
Sets the Layout of the map. |
void |
setMapContent(LyMapContent mapContent)
Sets sub-component mapContent. |
void |
setSpatial(boolean spatial)
Sets the spatial mode. |
void |
setTranslation(boolean translation)
Updates attribute translation to the given value. |
void |
setTranslationStatus(LyMapBase.TranslationStatus translationStatus)
Updates attribute translationStatus to the given value. |
void |
setViewer(boolean viewer)
Sets the viewer mode. |
void |
setViewerStatus(LyMapBase.ViewerStatus viewerStatus)
(non-Javadoc). |
void |
setVisible(boolean status)
(non-Javadoc). |
void |
setZoom(boolean zoom)
Updates attribute zoom to the given value. |
void |
setZoomFactor(float zoomFactor)
Updates attribute zoomFactor to the given value. |
void |
setZoomStatus(LyMapBase.ZoomStatus zoomStatus)
Updates attribute zoomStatus to the given value. |
Methods inherited from class leon.view.win.swing.LySwingPanel |
---|
setPopupMenu |
Methods inherited from class leon.view.win.swing.LySwingFieldItem |
---|
getActionTransmitter, getSelectionTransmitter |
Methods inherited from class leon.view.win.swing.LySwingObject |
---|
getBounds, getChildrenBounds, getDefaultFrame |
Methods inherited from class leon.view.graphic.LyGraphicalObject |
---|
expand, 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 |
---|
getViewComponent |
Field Detail |
---|
public static final java.lang.String __VERSION
public static java.lang.Class<?> PANEL_CLASS
public static java.lang.Class<?> MANAGER_CLASS
public static final java.lang.String IS_SHIFT_KEY_DOWN
public static final java.lang.String IS_CONTROL_KEY_DOWN
Constructor Detail |
---|
public LySwingMap(LyMap map)
map
- a MAP component defined for every type of view targets. This map is initialized
for the swing view and filled with the default values.Method Detail |
---|
public void initialize()
public void setMapContent(LyMapContent mapContent)
setMapContent
in interface LyGraphicalMap
mapContent
- New value of mapContentpublic void setContent()
public leon.view.win.swing.map.LyMapContainer createMapContainer()
LyMapScrollPane
object.
public void free()
free
in interface LyGraphicalComponent
free
in interface LyFreeInterface
free
in class LyGraphicalObject
LyFreeInterface.free()
public void addComponent(LyComponent component, int pos)
addComponent
in interface LyGraphicalMap
component
- the new component to addpos
- the position of the component in this mapaddComponent(LyComponent, int, String)
,
LyGraphicalMap.addComponent(leon.view.LyComponent, int)
public void removeComponent(LyComponent component)
removeComponent
in interface LyGraphicalMap
component
- The components to remove to components list.LyGraphicalMap.removeComponent(leon.view.LyComponent)
public void setSpatial(boolean spatial)
setSpatial
in interface LyGraphicalMap
spatial
- Indicates if the map manager is spatial or not.LyAbstractMapComponentManager.SPATIAL
,
LyGraphicalMap.setSpatial(boolean)
public void setViewer(boolean viewer)
setViewer
in interface LyGraphicalMap
setViewer
in interface LySetViewerInterface
viewer
- Indicates if the map manager must show the viewer or not.LyAbstractMapComponentManager.VIEWER
,
LyGraphicalMap.setViewer(boolean)
public void setViewerStatus(LyMapBase.ViewerStatus viewerStatus)
setViewerStatus
in interface LyGraphicalMap
viewerStatus
- New value of viewerStatus.leon.view.graphic.LyGraphicalMap#setViewerMode(leon.view.LyMapBase.ViewerMode)
public java.lang.Object getLock()
getLock
in interface LyGetLockInterface
public void setLayout(LyLayout layout)
setLayout
in interface LyGraphicalMap
layout
- the new layout to useLyGraphicalMap.setLayout(LyLayout)
public void setLabel(java.lang.String label)
setLabel
in interface LyGraphicalMap
setLabel
in interface LySetLabelInterface
label
- the new title of the mapLyAbstractMapContainerManager.setTitle(String)
,
LySetLabelInterface.setLabel(java.lang.String)
public void actionPerformed(LyActionEvent actionEvent)
LyActionDemand.TYPE_ACTION
LyMenuDemand.TYPE_POPUP
LyActionDemand.TYPE_MOVE
LyActionDemand.TYPE_DELETE
LyDragDropDemand.TYPE_DRAG_START
to LyDragDropDemand.TYPE_DRAG_OVER
actionPerformed
in interface LyActionListener
LyActionListener.actionPerformed(leon.view.event.LyActionEvent)
public void selectionPerformed(LySelectionEvent selectionEvent)
selectionPerformed
in interface LySelectionListener
selectionEvent
- description of the selection which has occuredLySelectionListener.selectionPerformed(LySelectionEvent)
public void demandPerformed(LyDemand demand)
demand
- the demand to processLyDemandListener.demandPerformed(LyDemand)
public void setIdle(boolean status)
setIdle
in interface LySetIdleInterface
status
- new idle status (LySetIdleInterface interface)LySetIdleInterface.setIdle(boolean)
public void setVisible(boolean status)
setVisible
in interface LySetVisibleInterface
status
- new visibility status, if true the component will be shown, if false it will be
hidenLySetVisibleInterface.setVisible(boolean)
public void resetContent()
resetContent
in interface LyResetContentInterface
LyResetContentInterface.resetContent()
public void resetContent(boolean full)
resetContent
in interface LyResetContentInterface
full
- indicates whether old components must be removed from graphical view.LyResetContentInterface.resetContent()
public java.awt.Component getComponent()
getComponent
in interface LySwingComponent
getComponent
in class LySwingObject
LySwingComponent.getComponent()
public LySwingMapNode getNodeById(java.lang.String nodeId)
null
if the node is not found.
nodeId
- the Id of the node to retreive
public java.lang.String getController()
getController
in class LyGraphicalObject
LyGraphicalObject.getController()
public void print(LyPrintListenerInterface listener)
print
in interface LyPrintInterface
listener
- the printing listenerLyPrintInterface.print(LyPrintListenerInterface)
public void printEnd(java.awt.PrintJob job, leon.view.win.swing.map.LyMapComponent canvas, LyPrintListenerInterface listener)
job
- the printer handlercanvas
- the drawing arealistener
- the print listener, not used in this implementationpublic void setTranslation(boolean translation)
LyGraphicalMap
setTranslation
in interface LyGraphicalMap
translation
- Boolean indicating if attribute translation is set or unset.public void setTranslationStatus(LyMapBase.TranslationStatus translationStatus)
LyGraphicalMap
setTranslationStatus
in interface LyGraphicalMap
translationStatus
- New value of translationStatus.public void setZoom(boolean zoom)
LyGraphicalMap
setZoom
in interface LyGraphicalMap
zoom
- Boolean indicating if attribute zoom is set or unset.public void setZoomFactor(float zoomFactor)
LyGraphicalMap
setZoomFactor
in interface LyGraphicalMap
zoomFactor
- New value of zoomFactor.public void setZoomStatus(LyMapBase.ZoomStatus zoomStatus)
LyGraphicalMap
setZoomStatus
in interface LyGraphicalMap
zoomStatus
- New value of zoomStatus.
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |