com.ontimize.util.gis.client.interfaces
Interface IGisViewer

All Superinterfaces:
IGisDataRequester
All Known Subinterfaces:
IGisEditionViewer, IGisSelectionViewer
All Known Implementing Classes:
DefaultGisViewer, EditionGisViewer, GridRasterBaseGisViewer, GSelectorGisViewer, ParallelThreadEditionGisViewer, ParallelThreadGisViewer, ParallelThreadSelectorGisViewer

public interface IGisViewer
extends IGisDataRequester

Interface for the Gis map viewer component. This will be the main class inside the gis component.


Field Summary
static java.lang.String APPLIED_FILTERS
           
static int FILTER_CONDITION_AND
           
static int FILTER_CONDITION_NOT
           
static int FILTER_CONDITION_OR
           
static int FILTER_PROPERTY_BETWEEN
           
static int FILTER_PROPERTY_EQUAL
           
static int FILTER_PROPERTY_GREATER_OR_EQUAL
           
static int FILTER_PROPERTY_GREATER_THAN
           
static int FILTER_PROPERTY_LESS_OR_EQUAL
           
static int FILTER_PROPERTY_LESS_THAN
           
static int FILTER_PROPERTY_NOT_EQUAL
           
static int FILTER_PROPERTY_NULL
           
static java.lang.String GEO_OBJECT_ID
           
static java.lang.String GEOMETRY
           
static int STATE_EDITION
          Edition state
static int STATE_GOOGLE_SELECTOR
          New gis viewer state used to show the multiple elements selector on map panel, in this state certains event as mouse wheel and mouse dragging are ignored Value: 777
static int STATE_PAN_SELECTION
          Pan - Selection state
static int STATE_VIEWER_DISABLED
          Disabled viewer state
static int STATE_ZOOM_IN
          Zoom in state
static int STATE_ZOOM_OUT
          Zoom out state
static int ZOOM_STATE_DISABLED
          Zoom state disabled
static int ZOOM_STATE_ZOOMING_IN
          Zoom state: Zoom In
static int ZOOM_STATE_ZOOMING_OUT
          Zoom state: Zoom Out
 
Method Summary
 void addAreaChangeListener(AreaChangeListener listener)
          Adds a listener for area change events
 void addLayerChangeListener(LayerChangeListener listener)
          Adds a listener for layers change events
 void addStateChangeListener(StateChangeListener listener)
          Adds a listener for viewer state change events
 void applyFilters(java.lang.Object appliedFilters)
          Apply the given filters appliedFilters to the gis map panel
 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
 void cleanSelectedData()
          Clear the actual selected elements list
 void deleteLayerData(java.lang.Object layerKeys, java.lang.Object deletedKeys)
          Delete the data identified by deletedKeys from the layer layerId
 void disableMouseListeners()
          Disable the mouse listeners for the current viewer
 void enableMouseListeners()
          Enable the mouse listeners for the current viewer
 void forceExternalRepaint(java.lang.Object source)
          Forces the repaint of the gis map viewer from a external class
 com.vividsolutions.jts.geom.Envelope getActualZoomArea()
          Gets the actual area for the current viewer, this method is usually called to know the current area during zoom animations
 java.awt.Color getBackground()
          Gets the background color of the gis viewer
 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
 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
 com.vividsolutions.jts.geom.Envelope getMapArea()
          Returns the actual map bounding box
 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()
           
 int getState()
          Gets the actual state of the gis viewer
 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
 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 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 removeLayerChangeListener(LayerChangeListener listener)
          Removes a listener for viewer layer 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[] boundingBoxes, 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
 void setEnabled(boolean enabled)
          Set the gis viewer enabled
 void setLayerFilters(java.lang.Object layerAttribute, java.lang.Object filters)
          Set the defined filters for the indicated layer
 void setLayersConfigurationId(java.lang.Object layersConfigurationId)
          Set the layers configuration assigned to the actual gis viewer
 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.
 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
 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 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 interface com.ontimize.util.gis.client.interfaces.IGisDataRequester
setData
 

Field Detail

STATE_VIEWER_DISABLED

static final int STATE_VIEWER_DISABLED
Disabled viewer state

See Also:
Constant Field Values

STATE_PAN_SELECTION

static final int STATE_PAN_SELECTION
Pan - Selection state

See Also:
Constant Field Values

STATE_ZOOM_IN

static final int STATE_ZOOM_IN
Zoom in state

See Also:
Constant Field Values

STATE_ZOOM_OUT

static final int STATE_ZOOM_OUT
Zoom out state

See Also:
Constant Field Values

STATE_EDITION

static final int STATE_EDITION
Edition state

See Also:
Constant Field Values

ZOOM_STATE_DISABLED

static final int ZOOM_STATE_DISABLED
Zoom state disabled

See Also:
Constant Field Values

ZOOM_STATE_ZOOMING_IN

static final int ZOOM_STATE_ZOOMING_IN
Zoom state: Zoom In

See Also:
Constant Field Values

ZOOM_STATE_ZOOMING_OUT

static final int ZOOM_STATE_ZOOMING_OUT
Zoom state: Zoom Out

See Also:
Constant Field Values

STATE_GOOGLE_SELECTOR

static final int STATE_GOOGLE_SELECTOR
New gis viewer state used to show the multiple elements selector on map panel, in this state certains event as mouse wheel and mouse dragging are ignored Value: 777

See Also:
Constant Field Values

FILTER_CONDITION_AND

static final int FILTER_CONDITION_AND
See Also:
Constant Field Values

FILTER_CONDITION_NOT

static final int FILTER_CONDITION_NOT
See Also:
Constant Field Values

FILTER_CONDITION_OR

static final int FILTER_CONDITION_OR
See Also:
Constant Field Values

FILTER_PROPERTY_EQUAL

static final int FILTER_PROPERTY_EQUAL
See Also:
Constant Field Values

FILTER_PROPERTY_NOT_EQUAL

static final int FILTER_PROPERTY_NOT_EQUAL
See Also:
Constant Field Values

FILTER_PROPERTY_LESS_THAN

static final int FILTER_PROPERTY_LESS_THAN
See Also:
Constant Field Values

FILTER_PROPERTY_GREATER_THAN

static final int FILTER_PROPERTY_GREATER_THAN
See Also:
Constant Field Values

FILTER_PROPERTY_LESS_OR_EQUAL

static final int FILTER_PROPERTY_LESS_OR_EQUAL
See Also:
Constant Field Values

FILTER_PROPERTY_GREATER_OR_EQUAL

static final int FILTER_PROPERTY_GREATER_OR_EQUAL
See Also:
Constant Field Values

FILTER_PROPERTY_BETWEEN

static final int FILTER_PROPERTY_BETWEEN
See Also:
Constant Field Values

FILTER_PROPERTY_NULL

static final int FILTER_PROPERTY_NULL
See Also:
Constant Field Values

GEO_OBJECT_ID

static final java.lang.String GEO_OBJECT_ID
See Also:
Constant Field Values

GEOMETRY

static final java.lang.String GEOMETRY
See Also:
Constant Field Values

APPLIED_FILTERS

static final java.lang.String APPLIED_FILTERS
See Also:
Constant Field Values
Method Detail

getBackground

java.awt.Color getBackground()
Gets the background color of the gis viewer

Returns:
background color

getState

int getState()
Gets the actual state of the gis viewer

Returns:
actual gis viewer state

isDragging

boolean isDragging()
Check is the mouse is actual dragging the map viewer

Returns:
mouse dragging state

getZoomState

int getZoomState()
Gets the actual map viewer zoom state.

Returns:
Actual zoom state

forceExternalRepaint

void forceExternalRepaint(java.lang.Object source)
Forces the repaint of the gis map viewer from a external class

Parameters:
source - Class which calls the repaint method

setState

void setState(int state)
Sets the actual state of the gis viewer

Parameters:
state - New gis viewer state

setOGisComponent

void setOGisComponent(IOGisComponent gisComponent)
Sets the Ontimize Gis Component for the gis viewer. This method is for internal use of the OntimizeGis module.

Parameters:
gisComponent - Ontimize Gis Component interface

getOGisComponent

IOGisComponent getOGisComponent()
Return a reference for the gis viewer ontimize gis component

Returns:
gis component reference

init

void init(java.lang.Object initParameters)
Init the gis viewer with the given parameters

Parameters:
initParameters - Parameters for the gisViewer initialization

setEnabled

void setEnabled(boolean enabled)
Set the gis viewer enabled

Parameters:
enabled -

setVisible

void setVisible(boolean visible)
Set the gis viewer visible

Parameters:
visible -

setViewerPreferences

void setViewerPreferences(java.util.Hashtable<java.lang.String,java.lang.Object> preferences)
Set the viewer preferences

Parameters:
preferences - Preferences parameters: bounding box, coordinate reference system (crs), background color...

setLayersConfigurationId

void setLayersConfigurationId(java.lang.Object layersConfigurationId)
                              throws java.lang.Exception
Set the layers configuration assigned to the actual gis viewer

Parameters:
layersConfigurationId - Identifier for the layers configuration
Throws:
java.lang.Exception

changeCRS

void changeCRS(java.lang.Object newCRS)
Change the gis viewer coordinate reference system

Parameters:
newCRS - New coordinate reference system for the viewer

applyFilters

void applyFilters(java.lang.Object appliedFilters)
Apply the given filters appliedFilters to the gis map panel

Parameters:
appliedFilters - Filters applied to the map panel

getGisClientUtilities

java.lang.Object getGisClientUtilities()
Get a reference to the GisClientManager interface

Returns:
GisClientManager interface reference

getLayersConfigurationId

java.lang.Object getLayersConfigurationId()
Get the layers configuration identifier

Returns:
Layer configuration name

getLayer

java.lang.Object getLayer(java.lang.Object layerId)
Get the requested layer reference

Parameters:
layerId - identifier of the requested layer
Returns:
Layer interface

getLayersList

java.util.List<IGisLayer> getLayersList()
Get the list of viewer layers

Returns:
viewer layers list

isEnabled

boolean isEnabled()
Get the gis viewer enabled state

Returns:
gis enable state

isVisible

boolean isVisible()
Get the gis viewer visible state

Returns:
gis visible state

inTransientPaint

boolean inTransientPaint()
Checks if the gis viewer is actually painting data form the second buffer image

Returns:
trasient painting value

getViewerPreferences

java.lang.Object getViewerPreferences()
Get the gis map viewer preferences

Returns:
gis viewer preferences

addAreaChangeListener

void addAreaChangeListener(AreaChangeListener listener)
Adds a listener for area change events

Parameters:
listener - Area change events listener to add

removeAreaChangeListener

void removeAreaChangeListener(AreaChangeListener listener)
Removes a listener for viewer area change events

Parameters:
listener - Viewer area change events listener to remove

addLayerChangeListener

void addLayerChangeListener(LayerChangeListener listener)
Adds a listener for layers change events

Parameters:
listener - Layers change events listener to add

removeLayerChangeListener

void removeLayerChangeListener(LayerChangeListener listener)
Removes a listener for viewer layer change events

Parameters:
listener - Viewer layer change events listener to remove

addStateChangeListener

void addStateChangeListener(StateChangeListener listener)
Adds a listener for viewer state change events

Parameters:
listener - Viewer state change events listener to add

removeStateChangeListener

void removeStateChangeListener(StateChangeListener listener)
Removes a listener for viewer state change events

Parameters:
listener - Viewer state change events listener to remove

centerView

void centerView(java.awt.Rectangle panelBounds)
Centers the view of the gis panel on the given bounding box

Parameters:
panelBounds - Desired map panel bounding box

centerViewOnEnvelope

void centerViewOnEnvelope(com.vividsolutions.jts.geom.Envelope panelBounds)
Centers the view of the gis panel on the given bounding box

Parameters:
panelBounds - Desired map panel bounding box

centerOnPoint

void centerOnPoint(double xCoord,
                   double yCoord)
Centers the view of the gis panel on the given location

Parameters:
xCoord - X or longitude coordinate of the desired center location
yCoord - Y or longitude coordinate of the desired center location

setMapArea

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

Parameters:
mapArea - New map bounding box

getMapArea

com.vividsolutions.jts.geom.Envelope getMapArea()
Returns the actual map bounding box

Returns:
Actual map bounding box

requestCurrentData

void requestCurrentData(boolean forceServerQuery)
Force the map panel to refresh the actual displaying data

Parameters:
forceServerQuery - If enabled forces the panel to request the data to the server

requestCurrentData

void requestCurrentData(com.vividsolutions.jts.geom.Envelope[] boundingBoxes,
                        boolean forceServerQuery)
Force the map panel to refresh the given bounding boxes related data

Parameters:
forceServerQuery - If enabled forces the panel to request the data to the server
boundingBoxes - List of bounding boxes object of refresh

requestCurrentDataForLayer

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

Parameters:
layer - Gis layer to refresh data
forceServerQuery - If enabled forces the panel to request the data to the server
requestBBoxes - List of bounding boxes object of refresh

insertLayerData

void insertLayerData(java.lang.Object layerKeys,
                     java.lang.Object insertedValues)
Insert the given data insertedValues into the layer indentified by layerId

Parameters:
layerKeys - Identifiers for the layer to insert
insertedValues - New values to insert

updateLayerData

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

Parameters:
layerKeys - Identifiers for the layer to update
updatedKeys - Identifiers of the values to update
newValues - Values to update

deleteLayerData

void deleteLayerData(java.lang.Object layerKeys,
                     java.lang.Object deletedKeys)
Delete the data identified by deletedKeys from the layer layerId

Parameters:
layerKeys - Identifiers for the layer to delete
deletedKeys - Identifiers of the values to delete

getCursorLocation

double[] getCursorLocation(java.awt.event.MouseEvent ev)
Gets the actual cursor location in map coordinates

Parameters:
ev - Mouse event
Returns:
actual mouse coordinates in double format

setLayerFilters

void setLayerFilters(java.lang.Object layerAttribute,
                     java.lang.Object filters)
Set the defined filters for the indicated layer

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

getCRS

java.lang.Object getCRS()
Get current map panel Coordinate Reference System

Returns:
Actual panel Coordinate Reference System

getLayerRenderer

IGisRenderer getLayerRenderer(java.lang.String layerAttr)
Get the renderer related to the given lauer

Parameters:
layerAttr - Layer identifier
Returns:
Requested renderer

getDefaultRenderer

IGisRenderer getDefaultRenderer()
Get the default map panel renderer

Returns:
Requested renderer

getPixelSize

double getPixelSize()
Gets the actual gis viewer pixel size in map units per pixel

Returns:
Actual pixel size

cleanSelectedData

void cleanSelectedData()
Clear the actual selected elements list


isRendering

boolean isRendering()
Check if the map viewer is actually on a render process

Returns:
Rendering state

enableMouseListeners

void enableMouseListeners()
Enable the mouse listeners for the current viewer


disableMouseListeners

void disableMouseListeners()
Disable the mouse listeners for the current viewer


getActualZoomArea

com.vividsolutions.jts.geom.Envelope getActualZoomArea()
Gets the actual area for the current viewer, this method is usually called to know the current area during zoom animations

Returns:
Actual map viewer area during zoom animation

zoomToMinLevel

void zoomToMinLevel()
Method to run a zoom event setting the map resolution to the minimum zoom level


zoomToMaxLevel

void zoomToMaxLevel()
Method to run a zoom event setting the map resolution to the maximum zoom level


reloadViewer

void reloadViewer()
Reloads the map viewer, clearing all the data caches, and going to the initial state


getResourceBundle

java.util.ResourceBundle getResourceBundle()