com.ontimize.util.gis.client.viewer
Class ParallelThreadGisViewer

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.ontimize.util.gis.client.viewer.ParallelThreadGisViewer
All Implemented Interfaces:
com.ontimize.gui.i18n.Internationalization, AreaChangeListener, IGisDataRequester, IGisLayerUtilities, IGisSelectionViewer, IGisViewer, java.awt.event.ComponentListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible
Direct Known Subclasses:
DefaultGisViewer, ParallelThreadEditionGisViewer

public class ParallelThreadGisViewer
extends javax.swing.JPanel
implements IGisViewer, IGisSelectionViewer, IGisDataRequester, IGisLayerUtilities, java.awt.event.MouseWheelListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, AreaChangeListener, java.awt.event.KeyListener, com.ontimize.gui.i18n.Internationalization, java.awt.event.ComponentListener

See Also:
Serialized Form

Nested Class Summary
(package private)  class ParallelThreadGisViewer.InternalRenderer
           
protected  class ParallelThreadGisViewer.RepaintThread
          Thread used to repaint the gis viewer when possible
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  com.vividsolutions.jts.geom.Envelope actualZoomArea
           
protected  java.util.HashMap<java.lang.String,IGisRenderer> alternativeRenderers
           
protected  boolean animatedViewer
           
protected static int animRes
           
protected static int animTime
           
protected  java.util.List<AreaChangeListener> areaChangeListeners
           
protected  java.awt.Color backgroundColor
           
protected  java.awt.Graphics2D bboxGraphics
           
protected  java.awt.image.BufferedImage bboxImage
          The base image of the map viewer
protected static java.awt.image.BufferedImageOp blur
           
protected static float[] blurKernel
           
protected  com.vividsolutions.jts.geom.Envelope boundingBox
          The area of the map to draw
protected static float centerWeight
           
protected  boolean changed
           
protected  IGisConfigurationParameters configurationParameters
           
protected  boolean controlPressed
           
protected  org.opengis.referencing.crs.CoordinateReferenceSystem crs
           
protected  java.lang.String crsCode
           
protected  java.util.HashMap<java.lang.Object,java.util.List<java.util.Hashtable>> currentData
           
protected static boolean DEBUG
           
protected  java.awt.Rectangle dr
           
protected  boolean enabled
           
protected  java.util.Hashtable<java.lang.String,java.lang.Object> filters
           
protected  boolean firstTime
           
protected static com.vividsolutions.jts.geom.GeometryFactory gf
           
protected  IGisClientManager gisClientManager
           
protected  IOGisComponent gisComponent
           
protected  java.util.ArrayList<HighlightChangeListener> highlightChangeListeners
           
protected  java.util.List<java.util.Hashtable> highlightData
           
protected  IGisInternalRenderer internalRender
           
protected  int lastInsertedIndex
           
protected  int lastX
           
protected  int lastY
           
protected  java.util.List<IGisLayer> layers
           
protected  java.util.List<LayerChangeListener> layersChangeListeners
           
protected  java.lang.Object layersConfigurationId
           
protected  java.lang.String[] layersNotVisible
           
protected  java.lang.String[] layersOrder
           
protected  java.lang.String[] layersVisible
           
protected  double maximumZoomLevel
           
protected  boolean maximumZoomLevelEnabled
          Enables/disables the maximum zoom level property
(package private)  PopupMenuPanel menuPanel
           
protected  double minimumZoomLevel
           
protected  boolean minimumZoomLevelEnabled
          Enables/disables the minimum zoom level property
protected  boolean mouseDragging
           
protected  boolean mouseIn
           
protected  boolean mouseListenerDisabled
           
(package private)  java.awt.event.MouseListener[] mouseListeners
          Array to store and disable mouselistener during selector animations
(package private)  java.awt.event.MouseMotionListener[] mouseMotionListeners
           
(package private)  java.awt.event.MouseWheelListener[] mouseWheelListeners
           
protected static float neighbourWeight
           
protected  com.vividsolutions.jts.geom.Envelope newZoomArea
           
protected  java.awt.Rectangle newZoomBounds
           
protected  int numLayers
           
protected  java.awt.Rectangle oldRect
          Size of the viewer panel last time we painted
protected  boolean paintZoomBox
           
protected  java.awt.image.BufferedImage panelImage
           
protected  int pendingMouseWheelClicks
           
protected  double pixelSize
           
protected  com.vividsolutions.jts.geom.Envelope prevBoundingBox
          The last area of the map
protected  java.util.List<java.util.Hashtable> prevHighlightData
           
protected  boolean rasterVisibilityExclusion
          Enables/disables the raster layers exclusive visibility
protected  IGisRenderer renderer
           
protected  java.lang.String rendererClassName
          Map painting related parameters
protected  boolean renderFinished
           
protected  boolean rendering
           
protected static boolean repaintMessages
           
protected  ParallelThreadGisViewer.RepaintThread repaintThread
           
protected  java.util.ResourceBundle res
           
protected  java.util.List<java.util.Hashtable> selectedData
           
protected  java.util.ArrayList<SelectionChangeListener> selectionChangeListeners
           
protected  IGisLayer selectionLayer
           
protected  double selectionPrecision
           
protected  IGisStyleDefinition selectionStyle
           
protected  boolean shiftPressed
           
protected  int startX
           
protected  int startY
           
protected  int state
           
protected  java.util.List<StateChangeListener> stateChangeListeners
           
protected  java.lang.StringBuilder strBuilder
           
protected  java.awt.image.BufferedImage tempImage
           
protected  java.util.concurrent.ExecutorService tpesRender
           
protected  boolean transientPaint
           
protected  boolean visible
           
protected  long waitMillisBetweenThreads
           
protected  org.jdesktop.animation.timing.Animator zoomAnim
           
protected  double zoomInFactor
           
protected  boolean zoomOnClick
          Enables/disables zooming when the user double-clicks on the panel
protected  double zoomOutFactor
           
protected  int[] zoomPos
           
protected  int zoomState
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface com.ontimize.util.gis.client.interfaces.IGisViewer
APPLIED_FILTERS, FILTER_CONDITION_AND, FILTER_CONDITION_NOT, FILTER_CONDITION_OR, FILTER_PROPERTY_BETWEEN, FILTER_PROPERTY_EQUAL, FILTER_PROPERTY_GREATER_OR_EQUAL, FILTER_PROPERTY_GREATER_THAN, FILTER_PROPERTY_LESS_OR_EQUAL, FILTER_PROPERTY_LESS_THAN, FILTER_PROPERTY_NOT_EQUAL, FILTER_PROPERTY_NULL, GEO_OBJECT_ID, GEOMETRY, STATE_EDITION, STATE_GOOGLE_SELECTOR, STATE_PAN_SELECTION, STATE_VIEWER_DISABLED, STATE_ZOOM_IN, STATE_ZOOM_OUT, ZOOM_STATE_DISABLED, ZOOM_STATE_ZOOMING_IN, ZOOM_STATE_ZOOMING_OUT
 
Fields inherited from interface com.ontimize.gui.i18n.Internationalization
DEBUG_LANGUAGE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ParallelThreadGisViewer()
           
ParallelThreadGisViewer(java.util.Hashtable parameters)
           
 
Method Summary
 void addAreaChangeListener(AreaChangeListener listener)
          Adds a listener for area change events
 void addHighlightChangeListener(HighlightChangeListener listener)
          Adds a listener for data highlight change events
 void addLayerChangeListener(LayerChangeListener listener)
          Adds a listener for layers change events
 void addNewLayer(IGisLayer layerDefinition)
          Adds a new layer to the current viewer using the given layer definition
 void addSelectionChangeListener(SelectionChangeListener listener)
          Adds a listener for data selection change events
 void addStateChangeListener(StateChangeListener listener)
          Adds a listener for viewer state change events
protected  void adjustBoundingBoxToLayer(int layerIndex)
          Adjust the viewer actual bounding box to maximum bounding box of an existing layer or all layers
 void applyFilters(java.lang.Object appliedFilters)
          Apply the given filters appliedFilters to the gis map panel
 void areaChanged(AreaChangeEvent event)
          Invoked when the gis viewer area changes
protected  void autoUpdateCRS()
          Update the viewer coordinate reference system if it actually has no crs value
protected  void autoZoomOnPoint(double[] location, boolean ZoomIn, double newZoomLevel)
           
 void centerOnPoint(double xCoord, double yCoord)
          Centers the view of the gis panel on the given location
 void centerView(java.awt.Rectangle panelBounds)
          Centers the view of the gis panel on the given bounding box
 void centerViewOnEnvelope(com.vividsolutions.jts.geom.Envelope panelBounds)
          Centers the view of the gis panel on the given bounding box
 void changeCRS(java.lang.Object newCRS)
          Change the gis viewer coordinate reference system
protected  boolean checkIfRecordIsInCurrentData(java.util.Hashtable recordToInsert, java.util.List<java.util.Hashtable> actualData)
          Check if the given record is in the data contained by the gis viewer.
protected  boolean checkIfRecordIsInCurrentDataByID(java.util.Hashtable<java.lang.String,java.lang.Object> recordToInsert, java.util.List<java.util.Hashtable> actualData, IGisLayer actualLayer)
          Check if the given record is in the data contained by the gis viewer.
protected  boolean checkValidityForSelection(java.util.Hashtable recordData, IGisLayer layer)
           
 void cleanSelectedData()
          Clear the actual selected elements list
 void componentHidden(java.awt.event.ComponentEvent ev)
           
 void componentMoved(java.awt.event.ComponentEvent ev)
           
 void componentResized(java.awt.event.ComponentEvent ev)
           
 void componentShown(java.awt.event.ComponentEvent ev)
           
protected  AreaChangeEvent createAreaChangeEvent()
          Create and AreaChangeEvent based on the actual map viewer bounding box
protected  void deleteDataInsideBBox(com.vividsolutions.jts.geom.Envelope boundingBox, java.lang.Object layerAttr)
          Delete all the elements for the layer that intersects with the given bounding box
protected  void deleteFilteredData()
          Delete all the layers data that is filtered by parent keys
 void deleteLayerData(java.lang.Object layerKeys, java.lang.Object deletedKeys)
          Delete the data identified by deletedKeys from the layer layerId
protected  void deleteOuterData()
          Delete current data placed out of the panel bounding box
protected  void deleteOutFilteredData()
          Delete all the filtered data on the gis viewer component
protected  void deleteTransparentRecords()
          Delete all the data elements corresponding to transparent WMS datasources that are actually out of focus (its pixel size is bigger than the map viewer actual pixel size)
 void disableMouseListeners()
          Disables all the map panel mouse listener, this method is used to avoid mouse events handling during animations
protected  void drawRectangle(java.awt.Graphics graphics)
          Draw a black retangle on the screen using the initial and final mouse coordinates indicated on the integer values (startX, startY) and (lastX, lastY)
 void enableMouseListeners()
          Enables all the map panel mouse listeners, this method is used to restore the map panel status once the animations finished
 void expandSelectionByDistance(double distance)
          Expands the actual selection by the given distance,
adding the new selected elements to the actual selection
protected  void fireAreaChangeEvent(AreaChangeEvent event)
          Fire all the area change listeners
protected  void fireHighLight()
           
protected  void fireLayerChangeEvent(LayerChangeEvent event)
          Fire all the layer change listeners
protected  void fireSelectionListeners()
          Fire the selection change listeners added to the gis viewer
 void forceExternalRepaint(java.lang.Object source)
          Forces the repaint of the gis map viewer from a external class
 void forceRepaint()
          Force the repaint of the gis viewer
 com.vividsolutions.jts.geom.Envelope getActualZoomArea()
          Get the actual map area when the viewer is actually zooming in or out
 java.lang.Object getCRS()
          Get current map panel Coordinate Reference System
 double[] getCursorLocation(java.awt.event.MouseEvent ev)
          Gets the actual cursor location in map coordinates
 IGisRenderer getDefaultRenderer()
          Get the default map panel renderer
 java.lang.Object getGisClientUtilities()
          Get a reference to the GisClientManager interface
 java.lang.Object getLayer(java.lang.Object layerId)
          Get the requested layer reference
 java.util.List<java.util.Hashtable> getLayerData(java.lang.String layerAttribute)
          Gets the actual layer data for the given layer
 IGisRenderer getLayerRenderer(java.lang.String layerAttr)
          Get the renderer related to the given lauer
 java.lang.Object getLayersConfigurationId()
          Get the layers configuration identifier
 java.util.List<IGisLayer> getLayersList()
          Get the list of viewer layers
 java.lang.Object getLayerStyle(java.lang.Object layerId)
          Get the layer layerId style definition
 com.vividsolutions.jts.geom.Envelope getMapArea()
          Returns the actual map bounding box
 java.util.List<java.util.Hashtable> getMapAreaLayerData(java.lang.String layerAttribute)
          Gets the actual painted layer data for the given layer
 IOGisComponent getOGisComponent()
          Return a reference for the gis viewer ontimize gis component
 double getPixelSize()
          Gets the actual gis viewer pixel size in map units per pixel
 java.util.ResourceBundle getResourceBundle()
           
 java.lang.Object getSelectedData()
          Get actually selected data from gis viewer panel
 IGisLayer getSelectionLayer()
          Gets the map viewer selection layer
 int getState()
          Gets the actual state of the gis viewer
 java.util.Vector getTextsToTranslate()
           
 java.lang.Object getViewerPreferences()
          Get the gis map viewer preferences
 int getZoomState()
          Gets the actual map viewer zoom state.
 void init(java.lang.Object initParameters)
          Init the gis viewer with the given parameters
protected  void insertDataIntoCurrent(java.lang.String layerName, java.lang.Object requestedData, com.vividsolutions.jts.geom.Envelope dataBBox, java.lang.Double dataPixelSize)
          Insert the given data into the gis viewer actually contained data
 void insertLayerData(java.lang.Object layerKeys, java.lang.Object insertedValues)
          Insert the given data insertedValues into the layer indentified by layerId
 boolean inTransientPaint()
          Checks if the gis viewer is actually painting data form the second buffer image
 boolean isDragging()
          Check is the mouse is actual dragging the map viewer
 boolean isEnabled()
          Get the gis viewer enabled state
 boolean isRendering()
          Check if the map viewer is actually on a render process
 boolean isVisible()
          Get the gis viewer visible state
 void keyPressed(java.awt.event.KeyEvent ev)
           
 void keyReleased(java.awt.event.KeyEvent ev)
           
 void keyTyped(java.awt.event.KeyEvent ev)
           
protected  void log(java.lang.Object o, int level)
          Add a new message to the gis logger
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
           
 void moveLayerDown(java.lang.Object layerId)
          Move the layer down in list
 void moveLayerUp(java.lang.Object layerId)
          Move the layer up in list
 void paintComponent(java.awt.Graphics g)
           
protected  void processDrag(int x1, int y1, int x2, int y2)
          Process the mouse drag event
 void reloadViewer()
          Reloads the map viewer, clearing all the data caches, and going to the initial state
 void removeAreaChangeListener(AreaChangeListener listener)
          Removes a listener for viewer area change events
 void removeHighlightChangeListener(HighlightChangeListener listener)
          Removes a listener for data highlight change events
 void removeLayerChangeListener(LayerChangeListener listener)
          Removes a listener for viewer layer change events
 void removeSelectionChangeListener(SelectionChangeListener listener)
          Removes a listener for data selection change events
 void removeStateChangeListener(StateChangeListener listener)
          Removes a listener for viewer state change events
 void requestCurrentData(boolean forceServerQuery)
          Force the map panel to refresh the actual displaying data
 void requestCurrentData(com.vividsolutions.jts.geom.Envelope[] requestBBoxes, boolean forceServerQuery)
          Force the map panel to refresh the given bounding boxes related data
 void requestCurrentDataForLayer(IGisLayer layer, com.vividsolutions.jts.geom.Envelope[] requestBBoxes, boolean forceServerQuery)
          Force the map panel to refresh the given bounding boxes and layer related data
protected  void setBBoxImageFromZoomAction()
          Set the actual zooming state map viewer image
 void setComponentLocale(java.util.Locale locale)
           
 void setData(java.lang.Object layerKeys, java.lang.Object appliedFilters, java.lang.Object requestedData)
          Sets requested data for the layer given by layerKeys and with the filters defined in appliedFilters
 void setEnabled(boolean enabled)
          Set the gis viewer enabled
 void setLayerData(java.util.List<java.util.Hashtable> layerData, java.lang.Object layerId)
          Sets the layer data to show in the map panel for the given layer.
 void setLayerDefinition(IGisLayer layerDefinition)
          Update the given layer definition.
 void setLayerFilters(java.lang.Object layerAttribute, java.lang.Object filters)
          Set the defined filters for the indicated layer
 void setLayerPosition(java.lang.Object layerId, int position)
          Sets the layer position
 void setLayersConfigurationId(java.lang.Object layersConfigurationId)
          Set the layers configuration assigned to the actual gis viewer
 void setLayerStyle(java.lang.Object layerId, java.lang.Object styleDefinition)
          Set the rendering style for the layer layerId
 void setLayerVisible(java.lang.Object layerId, boolean visible)
          Set the layer layerId visible
 void setMapArea(com.vividsolutions.jts.geom.Envelope mapArea)
          Sets the new envelope of the actual map panel.
 void setOGisComponent(IOGisComponent gisComponent)
          Sets the Ontimize Gis Component for the gis viewer.
protected  void setRasterLayersVisibilityExclusion(IGisLayer priorityLayer)
           
protected  void setRenderers()
          Set each layer renderer based on the defined layer parameter "rendererClass"
 void setResourceBundle(java.util.ResourceBundle res)
           
 void setSelectionByID(java.util.List<java.lang.Object> dataIdList, java.lang.String keyName)
          Sets the actual map selected data by defining a list of values
 void setSelectionLayer(java.lang.Object layerId)
          Sets the main selection layers
 void setSelectionValues(java.util.Hashtable values)
          Set the values for the actual selection
 void setState(int state)
          Sets the actual state of the gis viewer
 void setViewerPreferences(java.util.Hashtable<java.lang.String,java.lang.Object> preferences)
          Set the viewer preferences
 void setVisible(boolean visible)
          Set the gis viewer visible
protected  void updateHighlightedDataOnPoint(com.vividsolutions.jts.geom.Geometry interestPoint, double pixelSize)
          Update the actually highlighted elements for the given location
 void updateLayerData(java.lang.Object layerKeys, java.lang.Object updatedKeys, java.lang.Object newValues)
          Update the data identified by updatedKeys with the values newValues for the layer layerId
 void updateSelectedData(com.vividsolutions.jts.geom.Envelope selectionBBox)
          Update the actually selected elements contained by the given rectangle area
protected  void updateSelectedDataOnPoint(com.vividsolutions.jts.geom.Geometry interestPoint, double pixelSize)
          Update the actually selected elements for the given location
protected  void updateSelectionLayer()
          Update the actual selection layer by choosing the latest selectable and visible layer
protected  void updateValidLayersInRange()
          Checks if all the panel layers are inside their respective maximum and minimum scale ratios
 void zoomToMaxLevel()
          Method to run a zoom event setting the map resolution to the maximum zoom level
 void zoomToMinLevel()
          Method to run a zoom event setting the map resolution to the minimum zoom level
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ontimize.util.gis.client.interfaces.IGisViewer
getBackground
 

Field Detail

mouseIn

protected boolean mouseIn

waitMillisBetweenThreads

protected long waitMillisBetweenThreads

rendering

protected boolean rendering

renderFinished

protected boolean renderFinished

tpesRender

protected java.util.concurrent.ExecutorService tpesRender

DEBUG

protected static final boolean DEBUG
See Also:
Constant Field Values

repaintMessages

protected static final boolean repaintMessages
See Also:
Constant Field Values

state

protected int state

strBuilder

protected final java.lang.StringBuilder strBuilder

internalRender

protected IGisInternalRenderer internalRender

minimumZoomLevelEnabled

protected boolean minimumZoomLevelEnabled
Enables/disables the minimum zoom level property


maximumZoomLevelEnabled

protected boolean maximumZoomLevelEnabled
Enables/disables the maximum zoom level property


minimumZoomLevel

protected double minimumZoomLevel

maximumZoomLevel

protected double maximumZoomLevel

rasterVisibilityExclusion

protected boolean rasterVisibilityExclusion
Enables/disables the raster layers exclusive visibility


zoomOnClick

protected boolean zoomOnClick
Enables/disables zooming when the user double-clicks on the panel


selectionChangeListeners

protected java.util.ArrayList<SelectionChangeListener> selectionChangeListeners

highlightChangeListeners

protected java.util.ArrayList<HighlightChangeListener> highlightChangeListeners

mouseListeners

java.awt.event.MouseListener[] mouseListeners
Array to store and disable mouselistener during selector animations


mouseMotionListeners

java.awt.event.MouseMotionListener[] mouseMotionListeners

mouseWheelListeners

java.awt.event.MouseWheelListener[] mouseWheelListeners

menuPanel

PopupMenuPanel menuPanel

mouseListenerDisabled

protected boolean mouseListenerDisabled

selectionLayer

protected IGisLayer selectionLayer

selectedData

protected java.util.List<java.util.Hashtable> selectedData

highlightData

protected java.util.List<java.util.Hashtable> highlightData

prevHighlightData

protected java.util.List<java.util.Hashtable> prevHighlightData

selectionStyle

protected IGisStyleDefinition selectionStyle

selectionPrecision

protected final double selectionPrecision
See Also:
Constant Field Values

gisComponent

protected IOGisComponent gisComponent

gisClientManager

protected IGisClientManager gisClientManager

layersConfigurationId

protected java.lang.Object layersConfigurationId

configurationParameters

protected IGisConfigurationParameters configurationParameters

layers

protected java.util.List<IGisLayer> layers

numLayers

protected int numLayers

filters

protected java.util.Hashtable<java.lang.String,java.lang.Object> filters

dr

protected java.awt.Rectangle dr

lastInsertedIndex

protected int lastInsertedIndex

areaChangeListeners

protected java.util.List<AreaChangeListener> areaChangeListeners

layersChangeListeners

protected java.util.List<LayerChangeListener> layersChangeListeners

stateChangeListeners

protected java.util.List<StateChangeListener> stateChangeListeners

firstTime

protected boolean firstTime

controlPressed

protected boolean controlPressed

shiftPressed

protected boolean shiftPressed

enabled

protected boolean enabled

visible

protected boolean visible

mouseDragging

protected boolean mouseDragging

zoomInFactor

protected double zoomInFactor

zoomOutFactor

protected double zoomOutFactor

transientPaint

protected boolean transientPaint

repaintThread

protected final ParallelThreadGisViewer.RepaintThread repaintThread

gf

protected static final com.vividsolutions.jts.geom.GeometryFactory gf

backgroundColor

protected java.awt.Color backgroundColor

layersOrder

protected java.lang.String[] layersOrder

layersVisible

protected java.lang.String[] layersVisible

layersNotVisible

protected java.lang.String[] layersNotVisible

boundingBox

protected com.vividsolutions.jts.geom.Envelope boundingBox
The area of the map to draw


prevBoundingBox

protected com.vividsolutions.jts.geom.Envelope prevBoundingBox
The last area of the map


crsCode

protected java.lang.String crsCode

crs

protected org.opengis.referencing.crs.CoordinateReferenceSystem crs

bboxImage

protected java.awt.image.BufferedImage bboxImage
The base image of the map viewer


panelImage

protected java.awt.image.BufferedImage panelImage

bboxGraphics

protected java.awt.Graphics2D bboxGraphics

tempImage

protected java.awt.image.BufferedImage tempImage

rendererClassName

protected java.lang.String rendererClassName
Map painting related parameters


renderer

protected IGisRenderer renderer

alternativeRenderers

protected java.util.HashMap<java.lang.String,IGisRenderer> alternativeRenderers

oldRect

protected java.awt.Rectangle oldRect
Size of the viewer panel last time we painted


pixelSize

protected double pixelSize

changed

protected boolean changed

currentData

protected java.util.HashMap<java.lang.Object,java.util.List<java.util.Hashtable>> currentData

res

protected java.util.ResourceBundle res

startX

protected int startX

startY

protected int startY

lastX

protected int lastX

lastY

protected int lastY

animatedViewer

protected boolean animatedViewer

zoomAnim

protected org.jdesktop.animation.timing.Animator zoomAnim

newZoomBounds

protected java.awt.Rectangle newZoomBounds

newZoomArea

protected com.vividsolutions.jts.geom.Envelope newZoomArea

actualZoomArea

protected com.vividsolutions.jts.geom.Envelope actualZoomArea

paintZoomBox

protected boolean paintZoomBox

zoomPos

protected int[] zoomPos

zoomState

protected int zoomState

pendingMouseWheelClicks

protected int pendingMouseWheelClicks

animTime

protected static final int animTime
See Also:
Constant Field Values

animRes

protected static final int animRes
See Also:
Constant Field Values

centerWeight

protected static final float centerWeight
See Also:
Constant Field Values

neighbourWeight

protected static final float neighbourWeight
See Also:
Constant Field Values

blurKernel

protected static final float[] blurKernel

blur

protected static final java.awt.image.BufferedImageOp blur
Constructor Detail

ParallelThreadGisViewer

public ParallelThreadGisViewer()

ParallelThreadGisViewer

public ParallelThreadGisViewer(java.util.Hashtable parameters)
Method Detail

applyFilters

public void applyFilters(java.lang.Object appliedFilters)
Description copied from interface: IGisViewer
Apply the given filters appliedFilters to the gis map panel

Specified by:
applyFilters in interface IGisViewer
Parameters:
appliedFilters - Filters applied to the map panel

changeCRS

public void changeCRS(java.lang.Object newCRS)
Description copied from interface: IGisViewer
Change the gis viewer coordinate reference system

Specified by:
changeCRS in interface IGisViewer
Parameters:
newCRS - New coordinate reference system for the viewer

getCRS

public java.lang.Object getCRS()
Description copied from interface: IGisViewer
Get current map panel Coordinate Reference System

Specified by:
getCRS in interface IGisViewer
Returns:
Actual panel Coordinate Reference System

getGisClientUtilities

public java.lang.Object getGisClientUtilities()
Description copied from interface: IGisViewer
Get a reference to the GisClientManager interface

Specified by:
getGisClientUtilities in interface IGisViewer
Returns:
GisClientManager interface reference

getViewerPreferences

public java.lang.Object getViewerPreferences()
Description copied from interface: IGisViewer
Get the gis map viewer preferences

Specified by:
getViewerPreferences in interface IGisViewer
Returns:
gis viewer preferences

init

public void init(java.lang.Object initParameters)
Description copied from interface: IGisViewer
Init the gis viewer with the given parameters

Specified by:
init in interface IGisViewer
Parameters:
initParameters - Parameters for the gisViewer initialization

setBBoxImageFromZoomAction

protected void setBBoxImageFromZoomAction()
Set the actual zooming state map viewer image


isVisible

public boolean isVisible()
Description copied from interface: IGisViewer
Get the gis viewer visible state

Specified by:
isVisible in interface IGisViewer
Overrides:
isVisible in class java.awt.Component
Returns:
gis visible state

isEnabled

public boolean isEnabled()
Description copied from interface: IGisViewer
Get the gis viewer enabled state

Specified by:
isEnabled in interface IGisViewer
Overrides:
isEnabled in class java.awt.Component
Returns:
gis enable state

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: IGisViewer
Set the gis viewer enabled

Specified by:
setEnabled in interface IGisViewer
Overrides:
setEnabled in class javax.swing.JComponent

setVisible

public void setVisible(boolean visible)
Description copied from interface: IGisViewer
Set the gis viewer visible

Specified by:
setVisible in interface IGisViewer
Overrides:
setVisible in class javax.swing.JComponent

setLayersConfigurationId

public void setLayersConfigurationId(java.lang.Object layersConfigurationId)
Description copied from interface: IGisViewer
Set the layers configuration assigned to the actual gis viewer

Specified by:
setLayersConfigurationId in interface IGisViewer
Parameters:
layersConfigurationId - Identifier for the layers configuration

updateSelectionLayer

protected void updateSelectionLayer()
Update the actual selection layer by choosing the latest selectable and visible layer


updateValidLayersInRange

protected void updateValidLayersInRange()
Checks if all the panel layers are inside their respective maximum and minimum scale ratios


setRenderers

protected void setRenderers()
Set each layer renderer based on the defined layer parameter "rendererClass"


requestCurrentData

public void requestCurrentData(com.vividsolutions.jts.geom.Envelope[] requestBBoxes,
                               boolean forceServerQuery)
Description copied from interface: IGisViewer
Force the map panel to refresh the given bounding boxes related data

Specified by:
requestCurrentData in interface IGisViewer
Parameters:
requestBBoxes - List of bounding boxes object of refresh
forceServerQuery - If enabled forces the panel to request the data to the server

requestCurrentData

public void requestCurrentData(boolean forceServerQuery)
Description copied from interface: IGisViewer
Force the map panel to refresh the actual displaying data

Specified by:
requestCurrentData in interface IGisViewer
Parameters:
forceServerQuery - If enabled forces the panel to request the data to the server

requestCurrentDataForLayer

public void requestCurrentDataForLayer(IGisLayer layer,
                                       com.vividsolutions.jts.geom.Envelope[] requestBBoxes,
                                       boolean forceServerQuery)
Description copied from interface: IGisViewer
Force the map panel to refresh the given bounding boxes and layer related data

Specified by:
requestCurrentDataForLayer in interface IGisViewer
Parameters:
layer - Gis layer to refresh data
requestBBoxes - List of bounding boxes object of refresh
forceServerQuery - If enabled forces the panel to request the data to the server

adjustBoundingBoxToLayer

protected void adjustBoundingBoxToLayer(int layerIndex)
Adjust the viewer actual bounding box to maximum bounding box of an existing layer or all layers

Parameters:
layerIndex - Interest layer index, if layerIndex then adjust the bounding box to the maximum extension of all existing layers

setViewerPreferences

public void setViewerPreferences(java.util.Hashtable<java.lang.String,java.lang.Object> preferences)
Description copied from interface: IGisViewer
Set the viewer preferences

Specified by:
setViewerPreferences in interface IGisViewer
Parameters:
preferences - Preferences parameters: bounding box, coordinate reference system (crs), background color...

paintComponent

public void paintComponent(java.awt.Graphics g)
Overrides:
paintComponent in class javax.swing.JComponent

setMapArea

public void setMapArea(com.vividsolutions.jts.geom.Envelope mapArea)
Description copied from interface: IGisViewer
Sets the new envelope of the actual map panel. It's recommended to use centerView method instead of this one.

Specified by:
setMapArea in interface IGisViewer
Parameters:
mapArea - New map bounding box

getMapArea

public com.vividsolutions.jts.geom.Envelope getMapArea()
Description copied from interface: IGisViewer
Returns the actual map bounding box

Specified by:
getMapArea in interface IGisViewer
Returns:
Actual map bounding box

createAreaChangeEvent

protected AreaChangeEvent createAreaChangeEvent()
Create and AreaChangeEvent based on the actual map viewer bounding box

Returns:
Map viewer actual area

deleteOutFilteredData

protected void deleteOutFilteredData()
Delete all the filtered data on the gis viewer component


deleteOuterData

protected void deleteOuterData()
Delete current data placed out of the panel bounding box


deleteTransparentRecords

protected void deleteTransparentRecords()
Delete all the data elements corresponding to transparent WMS datasources that are actually out of focus (its pixel size is bigger than the map viewer actual pixel size)


setOGisComponent

public void setOGisComponent(IOGisComponent gisComponent)
Description copied from interface: IGisViewer
Sets the Ontimize Gis Component for the gis viewer. This method is for internal use of the OntimizeGis module.

Specified by:
setOGisComponent in interface IGisViewer
Parameters:
gisComponent - Ontimize Gis Component interface

setData

public void setData(java.lang.Object layerKeys,
                    java.lang.Object appliedFilters,
                    java.lang.Object requestedData)
Description copied from interface: IGisDataRequester
Sets requested data for the layer given by layerKeys and with the filters defined in appliedFilters

Specified by:
setData in interface IGisDataRequester
Parameters:
layerKeys - Gis layer reference
appliedFilters - Previous query applied filters
requestedData - Requested data

insertDataIntoCurrent

protected void insertDataIntoCurrent(java.lang.String layerName,
                                     java.lang.Object requestedData,
                                     com.vividsolutions.jts.geom.Envelope dataBBox,
                                     java.lang.Double dataPixelSize)
Insert the given data into the gis viewer actually contained data

Parameters:
layerName - Layer name
requestedData - Data to insert
dataBBox - Data rectangle area
dataPixelSize - Data related pixel size

checkIfRecordIsInCurrentData

protected boolean checkIfRecordIsInCurrentData(java.util.Hashtable recordToInsert,
                                               java.util.List<java.util.Hashtable> actualData)
Check if the given record is in the data contained by the gis viewer. For that purpose the method will check the correspondence of all the record fields

Parameters:
recordToInsert - Record to insert in the viewer component
actualData - Actual data contained by the viewer
Returns:
Record existence

checkIfRecordIsInCurrentDataByID

protected boolean checkIfRecordIsInCurrentDataByID(java.util.Hashtable<java.lang.String,java.lang.Object> recordToInsert,
                                                   java.util.List<java.util.Hashtable> actualData,
                                                   IGisLayer actualLayer)
Check if the given record is in the data contained by the gis viewer. For that purpose the method will check the correspondence on the record field "geoObjectID"

Parameters:
recordToInsert - Record to insert in the viewer component
actualData - Actual data contained by the viewer
Returns:
Record existence

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

drawRectangle

protected void drawRectangle(java.awt.Graphics graphics)
Draw a black retangle on the screen using the initial and final mouse coordinates indicated on the integer values (startX, startY) and (lastX, lastY)

Parameters:
graphics - Gis viewer graphics component

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

processDrag

protected void processDrag(int x1,
                           int y1,
                           int x2,
                           int y2)
Process the mouse drag event

Parameters:
x1 - Initial X mouse location
y1 - Initial Y mouse location
x2 - Final X mouse location
y2 - Final Y mouse location

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseWheelMoved

public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Specified by:
mouseWheelMoved in interface java.awt.event.MouseWheelListener

getState

public int getState()
Description copied from interface: IGisViewer
Gets the actual state of the gis viewer

Specified by:
getState in interface IGisViewer
Returns:
actual gis viewer state

setState

public void setState(int state)
Description copied from interface: IGisViewer
Sets the actual state of the gis viewer

Specified by:
setState in interface IGisViewer
Parameters:
state - New gis viewer state

getLayersConfigurationId

public java.lang.Object getLayersConfigurationId()
Description copied from interface: IGisViewer
Get the layers configuration identifier

Specified by:
getLayersConfigurationId in interface IGisViewer
Returns:
Layer configuration name

inTransientPaint

public boolean inTransientPaint()
Description copied from interface: IGisViewer
Checks if the gis viewer is actually painting data form the second buffer image

Specified by:
inTransientPaint in interface IGisViewer
Returns:
trasient painting value

getLayerStyle

public java.lang.Object getLayerStyle(java.lang.Object layerId)
Description copied from interface: IGisLayerUtilities
Get the layer layerId style definition

Specified by:
getLayerStyle in interface IGisLayerUtilities
Parameters:
layerId - Layer identifier
Returns:
layer style definition

setLayerStyle

public void setLayerStyle(java.lang.Object layerId,
                          java.lang.Object styleDefinition)
Description copied from interface: IGisLayerUtilities
Set the rendering style for the layer layerId

Specified by:
setLayerStyle in interface IGisLayerUtilities
Parameters:
layerId - Layer identifier
styleDefinition - Style definition for the layer

setLayerVisible

public void setLayerVisible(java.lang.Object layerId,
                            boolean visible)
Description copied from interface: IGisLayerUtilities
Set the layer layerId visible

Specified by:
setLayerVisible in interface IGisLayerUtilities
Parameters:
layerId - Layer identifier

forceRepaint

public void forceRepaint()
Force the repaint of the gis viewer


addAreaChangeListener

public void addAreaChangeListener(AreaChangeListener listener)
Description copied from interface: IGisViewer
Adds a listener for area change events

Specified by:
addAreaChangeListener in interface IGisViewer
Parameters:
listener - Area change events listener to add

removeAreaChangeListener

public void removeAreaChangeListener(AreaChangeListener listener)
Description copied from interface: IGisViewer
Removes a listener for viewer area change events

Specified by:
removeAreaChangeListener in interface IGisViewer
Parameters:
listener - Viewer area change events listener to remove

fireAreaChangeEvent

protected void fireAreaChangeEvent(AreaChangeEvent event)
Fire all the area change listeners

Parameters:
event - Area change event

addLayerChangeListener

public void addLayerChangeListener(LayerChangeListener listener)
Description copied from interface: IGisViewer
Adds a listener for layers change events

Specified by:
addLayerChangeListener in interface IGisViewer
Parameters:
listener - Layers change events listener to add

removeLayerChangeListener

public void removeLayerChangeListener(LayerChangeListener listener)
Description copied from interface: IGisViewer
Removes a listener for viewer layer change events

Specified by:
removeLayerChangeListener in interface IGisViewer
Parameters:
listener - Viewer layer change events listener to remove

fireLayerChangeEvent

protected void fireLayerChangeEvent(LayerChangeEvent event)
Fire all the layer change listeners

Parameters:
event - Layer change event

areaChanged

public void areaChanged(AreaChangeEvent event)
Description copied from interface: AreaChangeListener
Invoked when the gis viewer area changes

Specified by:
areaChanged in interface AreaChangeListener
Parameters:
event - Gis viewer area change event containing the actual gis viewer panel area

centerOnPoint

public void centerOnPoint(double xCoord,
                          double yCoord)
Description copied from interface: IGisViewer
Centers the view of the gis panel on the given location

Specified by:
centerOnPoint in interface IGisViewer
Parameters:
xCoord - X or longitude coordinate of the desired center location
yCoord - Y or longitude coordinate of the desired center location

keyReleased

public void keyReleased(java.awt.event.KeyEvent ev)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent ev)
Specified by:
keyTyped in interface java.awt.event.KeyListener

getOGisComponent

public IOGisComponent getOGisComponent()
Description copied from interface: IGisViewer
Return a reference for the gis viewer ontimize gis component

Specified by:
getOGisComponent in interface IGisViewer
Returns:
gis component reference

getTextsToTranslate

public java.util.Vector getTextsToTranslate()
Specified by:
getTextsToTranslate in interface com.ontimize.gui.i18n.Internationalization

setComponentLocale

public void setComponentLocale(java.util.Locale locale)
Specified by:
setComponentLocale in interface com.ontimize.gui.i18n.Internationalization

setResourceBundle

public void setResourceBundle(java.util.ResourceBundle res)
Specified by:
setResourceBundle in interface com.ontimize.gui.i18n.Internationalization

log

protected void log(java.lang.Object o,
                   int level)
Add a new message to the gis logger

Parameters:
o - message to log
level - priority level

getLayerData

public java.util.List<java.util.Hashtable> getLayerData(java.lang.String layerAttribute)
Description copied from interface: IGisLayerUtilities
Gets the actual layer data for the given layer

Specified by:
getLayerData in interface IGisLayerUtilities
Parameters:
layerAttribute - layer identifier
Returns:
layer data

getMapAreaLayerData

public java.util.List<java.util.Hashtable> getMapAreaLayerData(java.lang.String layerAttribute)
Description copied from interface: IGisLayerUtilities
Gets the actual painted layer data for the given layer

Specified by:
getMapAreaLayerData in interface IGisLayerUtilities
Parameters:
layerAttribute - layer identifier
Returns:
layer data

insertLayerData

public void insertLayerData(java.lang.Object layerKeys,
                            java.lang.Object insertedValues)
Description copied from interface: IGisViewer
Insert the given data insertedValues into the layer indentified by layerId

Specified by:
insertLayerData in interface IGisViewer
Parameters:
layerKeys - Identifiers for the layer to insert
insertedValues - New values to insert

updateLayerData

public void updateLayerData(java.lang.Object layerKeys,
                            java.lang.Object updatedKeys,
                            java.lang.Object newValues)
Description copied from interface: IGisViewer
Update the data identified by updatedKeys with the values newValues for the layer layerId

Specified by:
updateLayerData in interface IGisViewer
Parameters:
layerKeys - Identifiers for the layer to update
updatedKeys - Identifiers of the values to update
newValues - Values to update

deleteLayerData

public void deleteLayerData(java.lang.Object layerKeys,
                            java.lang.Object deletedKeys)
Description copied from interface: IGisViewer
Delete the data identified by deletedKeys from the layer layerId

Specified by:
deleteLayerData in interface IGisViewer
Parameters:
layerKeys - Identifiers for the layer to delete
deletedKeys - Identifiers of the values to delete

getLayersList

public java.util.List<IGisLayer> getLayersList()
Description copied from interface: IGisViewer
Get the list of viewer layers

Specified by:
getLayersList in interface IGisViewer
Returns:
viewer layers list

setLayerData

public void setLayerData(java.util.List<java.util.Hashtable> layerData,
                         java.lang.Object layerId)
Description copied from interface: IGisLayerUtilities
Sets the layer data to show in the map panel for the given layer. This method is useful in case of using local layers

Specified by:
setLayerData in interface IGisLayerUtilities
Parameters:
layerData - Layer data
layerId - Layer identifier

getCursorLocation

public double[] getCursorLocation(java.awt.event.MouseEvent ev)
Description copied from interface: IGisViewer
Gets the actual cursor location in map coordinates

Specified by:
getCursorLocation in interface IGisViewer
Parameters:
ev - Mouse event
Returns:
actual mouse coordinates in double format

centerView

public void centerView(java.awt.Rectangle panelBounds)
Description copied from interface: IGisViewer
Centers the view of the gis panel on the given bounding box

Specified by:
centerView in interface IGisViewer
Parameters:
panelBounds - Desired map panel bounding box

getLayer

public java.lang.Object getLayer(java.lang.Object layerId)
Description copied from interface: IGisViewer
Get the requested layer reference

Specified by:
getLayer in interface IGisViewer
Parameters:
layerId - identifier of the requested layer
Returns:
Layer interface

deleteFilteredData

protected void deleteFilteredData()
Delete all the layers data that is filtered by parent keys


setLayerDefinition

public void setLayerDefinition(IGisLayer layerDefinition)
Description copied from interface: IGisLayerUtilities
Update the given layer definition. The method searches the layer with same attribute
as the given layer and replaces its definition with the given one.

Specified by:
setLayerDefinition in interface IGisLayerUtilities
Parameters:
layerDefinition - New layer definition

addStateChangeListener

public void addStateChangeListener(StateChangeListener listener)
Description copied from interface: IGisViewer
Adds a listener for viewer state change events

Specified by:
addStateChangeListener in interface IGisViewer
Parameters:
listener - Viewer state change events listener to add

removeStateChangeListener

public void removeStateChangeListener(StateChangeListener listener)
Description copied from interface: IGisViewer
Removes a listener for viewer state change events

Specified by:
removeStateChangeListener in interface IGisViewer
Parameters:
listener - Viewer state change events listener to remove

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Specified by:
getResourceBundle in interface IGisViewer

moveLayerUp

public void moveLayerUp(java.lang.Object layerId)
Description copied from interface: IGisLayerUtilities
Move the layer up in list

Specified by:
moveLayerUp in interface IGisLayerUtilities
Parameters:
layerId - Layer identifier

moveLayerDown

public void moveLayerDown(java.lang.Object layerId)
Description copied from interface: IGisLayerUtilities
Move the layer down in list

Specified by:
moveLayerDown in interface IGisLayerUtilities
Parameters:
layerId - Layer identifier

deleteDataInsideBBox

protected void deleteDataInsideBBox(com.vividsolutions.jts.geom.Envelope boundingBox,
                                    java.lang.Object layerAttr)
Delete all the elements for the layer that intersects with the given bounding box

Parameters:
boundingBox - Rectangle area to delete elements
layerAttr - Layer identifier

isDragging

public boolean isDragging()
Description copied from interface: IGisViewer
Check is the mouse is actual dragging the map viewer

Specified by:
isDragging in interface IGisViewer
Returns:
mouse dragging state

getZoomState

public int getZoomState()
Description copied from interface: IGisViewer
Gets the actual map viewer zoom state.

Specified by:
getZoomState in interface IGisViewer
Returns:
Actual zoom state

setLayerFilters

public void setLayerFilters(java.lang.Object layerAttribute,
                            java.lang.Object filters)
Description copied from interface: IGisViewer
Set the defined filters for the indicated layer

Specified by:
setLayerFilters in interface IGisViewer
Parameters:
layerAttribute - Layer identifier
filters - Defined filters (only one or an array of elements implementing Filter interface)

autoUpdateCRS

protected void autoUpdateCRS()
Update the viewer coordinate reference system if it actually has no crs value


getLayerRenderer

public IGisRenderer getLayerRenderer(java.lang.String layerAttr)
Description copied from interface: IGisViewer
Get the renderer related to the given lauer

Specified by:
getLayerRenderer in interface IGisViewer
Parameters:
layerAttr - Layer identifier
Returns:
Requested renderer

centerViewOnEnvelope

public void centerViewOnEnvelope(com.vividsolutions.jts.geom.Envelope panelBounds)
Description copied from interface: IGisViewer
Centers the view of the gis panel on the given bounding box

Specified by:
centerViewOnEnvelope in interface IGisViewer
Parameters:
panelBounds - Desired map panel bounding box

getDefaultRenderer

public IGisRenderer getDefaultRenderer()
Description copied from interface: IGisViewer
Get the default map panel renderer

Specified by:
getDefaultRenderer in interface IGisViewer
Returns:
Requested renderer

forceExternalRepaint

public void forceExternalRepaint(java.lang.Object source)
Description copied from interface: IGisViewer
Forces the repaint of the gis map viewer from a external class

Specified by:
forceExternalRepaint in interface IGisViewer
Parameters:
source - Class which calls the repaint method

updateSelectedData

public void updateSelectedData(com.vividsolutions.jts.geom.Envelope selectionBBox)
Update the actually selected elements contained by the given rectangle area

Parameters:
selectionBBox - Selection area

updateSelectedDataOnPoint

protected void updateSelectedDataOnPoint(com.vividsolutions.jts.geom.Geometry interestPoint,
                                         double pixelSize)
Update the actually selected elements for the given location

Parameters:
interestPoint - Interest location
pixelSize - Gis viewer pixel resolution in units-per-pixel

updateHighlightedDataOnPoint

protected void updateHighlightedDataOnPoint(com.vividsolutions.jts.geom.Geometry interestPoint,
                                            double pixelSize)
Update the actually highlighted elements for the given location

Parameters:
interestPoint - Interest location
pixelSize - Gis viewer pixel resolution in units-per-pixel

keyPressed

public void keyPressed(java.awt.event.KeyEvent ev)
Specified by:
keyPressed in interface java.awt.event.KeyListener

fireSelectionListeners

protected void fireSelectionListeners()
Fire the selection change listeners added to the gis viewer


setSelectionByID

public void setSelectionByID(java.util.List<java.lang.Object> dataIdList,
                             java.lang.String keyName)
Description copied from interface: IGisSelectionViewer
Sets the actual map selected data by defining a list of values

Specified by:
setSelectionByID in interface IGisSelectionViewer
Parameters:
dataIdList - List of values for map selected data
keyName - Identifier of the key referenced by the list

setSelectionValues

public void setSelectionValues(java.util.Hashtable values)
Description copied from interface: IGisSelectionViewer
Set the values for the actual selection

Specified by:
setSelectionValues in interface IGisSelectionViewer
Parameters:
values - Hashtable with the selected values

addSelectionChangeListener

public void addSelectionChangeListener(SelectionChangeListener listener)
Description copied from interface: IGisSelectionViewer
Adds a listener for data selection change events

Specified by:
addSelectionChangeListener in interface IGisSelectionViewer
Parameters:
listener - Data selection events listener to add

removeSelectionChangeListener

public void removeSelectionChangeListener(SelectionChangeListener listener)
Description copied from interface: IGisSelectionViewer
Removes a listener for data selection change events

Specified by:
removeSelectionChangeListener in interface IGisSelectionViewer
Parameters:
listener - Data selection events listener to remove

setSelectionLayer

public void setSelectionLayer(java.lang.Object layerId)
Description copied from interface: IGisSelectionViewer
Sets the main selection layers

Specified by:
setSelectionLayer in interface IGisSelectionViewer
Parameters:
layerId - Selection layer identifier

expandSelectionByDistance

public void expandSelectionByDistance(double distance)
Description copied from interface: IGisSelectionViewer
Expands the actual selection by the given distance,
adding the new selected elements to the actual selection

Specified by:
expandSelectionByDistance in interface IGisSelectionViewer
Parameters:
distance - Distance in map panel units

cleanSelectedData

public void cleanSelectedData()
Description copied from interface: IGisViewer
Clear the actual selected elements list

Specified by:
cleanSelectedData in interface IGisViewer

setLayerPosition

public void setLayerPosition(java.lang.Object layerId,
                             int position)
Description copied from interface: IGisLayerUtilities
Sets the layer position

Specified by:
setLayerPosition in interface IGisLayerUtilities
Parameters:
layerId - Layer identifier
position - New layer position inside the layers list

getActualZoomArea

public com.vividsolutions.jts.geom.Envelope getActualZoomArea()
Get the actual map area when the viewer is actually zooming in or out

Specified by:
getActualZoomArea in interface IGisViewer
Returns:
Zoom area

getPixelSize

public double getPixelSize()
Description copied from interface: IGisViewer
Gets the actual gis viewer pixel size in map units per pixel

Specified by:
getPixelSize in interface IGisViewer
Returns:
Actual pixel size

getSelectionLayer

public IGisLayer getSelectionLayer()
Description copied from interface: IGisSelectionViewer
Gets the map viewer selection layer

Specified by:
getSelectionLayer in interface IGisSelectionViewer
Returns:
Selection layer

componentHidden

public void componentHidden(java.awt.event.ComponentEvent ev)
Specified by:
componentHidden in interface java.awt.event.ComponentListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent ev)
Specified by:
componentMoved in interface java.awt.event.ComponentListener

componentResized

public void componentResized(java.awt.event.ComponentEvent ev)
Specified by:
componentResized in interface java.awt.event.ComponentListener

componentShown

public void componentShown(java.awt.event.ComponentEvent ev)
Specified by:
componentShown in interface java.awt.event.ComponentListener

isRendering

public boolean isRendering()
Description copied from interface: IGisViewer
Check if the map viewer is actually on a render process

Specified by:
isRendering in interface IGisViewer
Returns:
Rendering state

addHighlightChangeListener

public void addHighlightChangeListener(HighlightChangeListener listener)
Description copied from interface: IGisSelectionViewer
Adds a listener for data highlight change events

Specified by:
addHighlightChangeListener in interface IGisSelectionViewer
Parameters:
listener - Data highlight events listener to add

removeHighlightChangeListener

public void removeHighlightChangeListener(HighlightChangeListener listener)
Description copied from interface: IGisSelectionViewer
Removes a listener for data highlight change events

Specified by:
removeHighlightChangeListener in interface IGisSelectionViewer
Parameters:
listener - Data highlight events listener to remove

fireHighLight

protected void fireHighLight()

disableMouseListeners

public void disableMouseListeners()
Disables all the map panel mouse listener, this method is used to avoid mouse events handling during animations

Specified by:
disableMouseListeners in interface IGisViewer

enableMouseListeners

public void enableMouseListeners()
Enables all the map panel mouse listeners, this method is used to restore the map panel status once the animations finished

Specified by:
enableMouseListeners in interface IGisViewer

addNewLayer

public void addNewLayer(IGisLayer layerDefinition)
Description copied from interface: IGisLayerUtilities
Adds a new layer to the current viewer using the given layer definition

Specified by:
addNewLayer in interface IGisLayerUtilities
Parameters:
layerDefinition - New layer definition

reloadViewer

public void reloadViewer()
Description copied from interface: IGisViewer
Reloads the map viewer, clearing all the data caches, and going to the initial state

Specified by:
reloadViewer in interface IGisViewer

autoZoomOnPoint

protected void autoZoomOnPoint(double[] location,
                               boolean ZoomIn,
                               double newZoomLevel)

zoomToMinLevel

public void zoomToMinLevel()
Description copied from interface: IGisViewer
Method to run a zoom event setting the map resolution to the minimum zoom level

Specified by:
zoomToMinLevel in interface IGisViewer

zoomToMaxLevel

public void zoomToMaxLevel()
Description copied from interface: IGisViewer
Method to run a zoom event setting the map resolution to the maximum zoom level

Specified by:
zoomToMaxLevel in interface IGisViewer

setRasterLayersVisibilityExclusion

protected void setRasterLayersVisibilityExclusion(IGisLayer priorityLayer)

checkValidityForSelection

protected boolean checkValidityForSelection(java.util.Hashtable recordData,
                                            IGisLayer layer)

getSelectedData

public java.lang.Object getSelectedData()
Description copied from interface: IGisSelectionViewer
Get actually selected data from gis viewer panel

Specified by:
getSelectedData in interface IGisSelectionViewer
Returns:
Selected data