Class AbstractDataSetLayer
- java.lang.Object
-
- oracle.spatial.network.nfe.vis.maps.layer.BasicLayer
-
- oracle.spatial.network.nfe.vis.maps.layer.AbstractDataSetLayer
-
- All Implemented Interfaces:
java.util.EventListener
,javax.swing.event.ChangeListener
,EditableLayer
,GeoObjectLayer
,HoverableLayer
,Layer
,MVThemeLayer
,SelectableLayer
,PropertySupport
public abstract class AbstractDataSetLayer extends BasicLayer implements EditableLayer, SelectableLayer, HoverableLayer, MVThemeLayer, javax.swing.event.ChangeListener
(non-Javadoc)
-
-
Field Summary
Fields Modifier and Type Field Description protected AnimatedStroke
animatedStroke
protected java.awt.Color
boundaryColor
protected AbstractDataSource
dataSource
protected AnimatedStroke
highliteAnimatedStroke
protected java.awt.Color
hoverBorderColor
protected java.awt.Color
hoverColor
protected DefaultSelectionManager
hoverManager
protected java.awt.Stroke
hoverStroke
protected AbstractIndexedDataSet
indexedSet
protected java.awt.geom.Rectangle2D
lastDataWindow
protected java.awt.geom.AffineTransform
lastViewXFM
protected javax.swing.event.EventListenerList
listenerList
protected java.awt.image.BufferedImage
liveImg
protected AbstractDataSetProducer
liveProducer
protected java.awt.image.BufferedImage
mvImg
protected java.awt.geom.AffineTransform
mvLastViewXFM
protected java.util.Hashtable<java.lang.String,AbstractFeature>
myDeleteObjects
protected java.util.Hashtable<java.lang.String,AbstractFeature>
myNewObjects
protected java.lang.String[]
nonComplexAttrs
protected AnimatedStroke
nontargetAnimatedStroke
static java.lang.String
PROPERTY_BASETABLE
static java.lang.String
PROPERTY_DATASOURCE
static java.lang.String
PROPERTY_EDITOR
static java.lang.String
PROPERTY_JSESSIONID
static java.lang.String
PROPERTY_KEYCOLUMN
static java.lang.String
PROPERTY_KEYSEQUENCE
static java.lang.String
PROPERTY_LABELCOLUMN
static java.lang.String
PROPERTY_LABELSTYLE
static java.lang.String
PROPERTY_LIVESCALE
static java.lang.String
PROPERTY_OPTIMIZE_GEOMOP
static java.lang.String
PROPERTY_OWNER
static java.lang.String
PROPERTY_QUERYCONDITION
static java.lang.String
PROPERTY_RENDER_MVNOTEDITING
static java.lang.String
PROPERTY_RENDER_ONZOOMIN
static java.lang.String
PROPERTY_RENDER_ONZOOMOUT
static java.lang.String
PROPERTY_RENDERSTYLE
static java.lang.String
PROPERTY_RENDERSTYLE_NONLIVE
static java.lang.String
PROPERTY_SERVERURL
static java.lang.String
PROPERTY_SPATIALCOLUMN
protected DefaultSelectionManager
selectionManager
protected java.awt.Stroke
simpleStroke
protected java.lang.Boolean
versionEnabled
-
Fields inherited from class oracle.spatial.network.nfe.vis.maps.layer.BasicLayer
canvas, properties
-
Fields inherited from interface oracle.spatial.network.nfe.vis.maps.core.EditableLayer
PROPERTY_EDITABLE
-
Fields inherited from interface oracle.spatial.network.nfe.vis.maps.core.Layer
PROPERTY_NAME, PROPERTY_PROVIDERID, PROPERTY_SRID, PROPERTY_VISIBLE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDataSetLayer(MapCanvas canvas)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addEditChangeListener(EditChangeListener l)
Adds a change listener to listen for editing changes.void
addSelectionListener(SelectionListener l)
Adds a SelectionListenerboolean
appendToObject(java.lang.Object key, java.lang.Object spatialObject)
Appends the provided spatialObject to an existing featurevoid
clearChanges()
boolean
clearHover()
Removes the hovering state from all the geo-objectsboolean
clearSelection()
Clears all selected objectsGeoObject
deleteObject(java.lang.Object key)
Deletes an existing GeoObject instance.protected abstract void
doRealRendering()
protected void
fireStateChanged()
void
fromXMLElement(org.w3c.dom.Element element)
Loads the content from an XML representationAbstractFeature[]
getCurrentDeletedFeatures()
AbstractDataSet
getDataSet()
AbstractDataSource
getDataSource()
java.awt.geom.Rectangle2D
getFullExtent()
GeoDataProducer
getGeoDataProducer()
Gets the currently set GeoDataProducer.java.util.List<GeoObject>
getHover()
Returns all the geo-object that are being hoveredAbstractIndexedDataSet
getIndexedDataSet()
protected java.lang.String
getModelString()
java.lang.String[]
getNonComplexAttributes()
GeoObject
getObject(java.lang.Object key)
Gets the GeoObject corresponding to the provided keyGeoObject[]
getObjects()
Gets all GeoObjects in this layerboolean
getRenderOnZoomIn()
boolean
getRenderOnZoomOut()
java.util.List<GeoObject>
getSelection()
Returns all selected objectsjava.util.List<GeoObject>
getSelection(GeoObject obj)
Returns selected objects that are children of the provided objects GeoObject's isSubElementOf() determines if an object is children of another objectvoid
getTableKeyColumn()
WorkSpace
getWorkspace()
boolean
handleEvent(java.util.EventObject evt)
The main method that performs event handling for this tool.java.util.List<GeoObject>
hitTest(int x, int y, int granularity)
Performs a hit test for the given mouse location (x,y).java.util.List<GeoObject>
hitTest(java.awt.geom.Rectangle2D box, int granularity)
Performs a hit test for the given rectangle.boolean
insertObject(java.lang.Object key, GeoObject obj)
Inserts a new GeoObject instanceboolean
isEditable()
boolean
isHover(GeoObject obj)
Returns true if the geo-object is being hoveredboolean
isModified()
boolean
isSelected(GeoObject obj)
Checks if an object is selectedprotected void
labelFeature(java.awt.Graphics2D g, java.awt.geom.AffineTransform xfm, AbstractFeature feat)
protected void
loadMetadata()
void
mapRegionChanged(MapRegionEvent e)
When the associated canvas's map region is changed, this method is called to notify the layer of the change.GeoObject
newObject(java.lang.Object spatialObject, java.lang.Object[] params)
Creates a new GeoObject with the provided parametersint
numHovered()
Returns the number of geo-objects that are being hoveredint
numSelected()
Returns the number of selected objectsvoid
onDataException(DataProducer producer, java.lang.Throwable exception)
A call-back function to handle exceptions during data loading.void
onDataReady(DataProducer producer, java.util.List<AbstractFeature> data)
A call-back function to handle data ready state.void
redo(EditChangeEvent change)
void
removeEditChangeListener(EditChangeListener l)
void
removeSelectionListener(SelectionListener l)
Removes the given SelectionListenerlong
render(java.awt.Graphics2D g)
Renders the layer contents to the given Graphics.protected abstract void
renderFeature(java.awt.Graphics2D g, AbstractFeature feat, java.awt.geom.AffineTransform at, oracle.sdovis.style.Style style)
protected void
renderHoverPoint(java.awt.geom.Point2D pt, java.awt.Graphics2D g)
protected abstract void
renderHoverShape(GeoObject object, java.awt.Shape shape, java.awt.Graphics2D dest, java.awt.geom.AffineTransform transf)
boolean
save()
boolean
select(java.util.List<GeoObject> objs)
Adds the provided objects to the selection listvoid
setCanvas(MapCanvas canvas)
Sets the map canvas on which this layer is displayed.void
setDataSource(AbstractDataSource dataSource)
void
setEditable(boolean editable)
void
setGeoDataProducer(AbstractDataSetProducer geoProducer)
Sets a AbstractDataSetProducer on this layer.void
setHighliteGeometries(JGeometry[] geoms)
boolean
setHover(java.util.List<GeoObject> objs)
A list of geo-objects being hoveredvoid
setIndexedDataSet(AbstractIndexedDataSet indexedSet)
void
setRenderOnZoomIn(boolean render)
void
setRenderOnZoomOut(boolean render)
boolean
setSelection(java.util.List<GeoObject> objs)
Clears selection before setting the provided objects as selectedvoid
setToUpdate()
void
stateChanged(javax.swing.event.ChangeEvent e)
abstract int
transformFeatures(GeoObject[] features, java.awt.geom.AffineTransform at)
void
undo(EditChangeEvent change)
Performs and undo operation.boolean
unselect(java.util.List<GeoObject> objs)
Removes the provided objects from the selection listvoid
update(long elapsedTime)
updates the contents data model or structure.protected boolean
updateDataSetSpatialInfo()
GeoObject
updateObject(java.lang.Object key, GeoObject changedObject)
Updates an existing GeoObject with the specified change.boolean
updateObjectAttributes(java.lang.String key, oracle.mapviewer.share.Field[] updAttrs)
Updates one or more object attributes.-
Methods inherited from class oracle.spatial.network.nfe.vis.maps.layer.BasicLayer
added, addPropertyChangeListener, addPropertyChangeListener, clear, getCanvas, getDataMBR, getIcon, getName, getProperties, getProperty, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getProviderID, getSRID, handleTheEvent, isMyEvent, isVisible, propagateEvent, removed, removePropertyChangeListener, removePropertyChangeListener, repaint, setMyCursor, setName, setProperty, setProviderID, setSRID, setVisible, toXMLElement
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface oracle.spatial.network.nfe.vis.maps.core.Layer
added, clear, getCanvas, getDataMBR, getIcon, getName, getProviderID, getSRID, isVisible, removed, repaint, setName, setProviderID, setSRID, setVisible, toXMLElement
-
Methods inherited from interface oracle.spatial.network.nfe.vis.maps.core.MVThemeLayer
getThemeDescriptor
-
Methods inherited from interface oracle.spatial.network.nfe.vis.maps.util.PropertySupport
addPropertyChangeListener, addPropertyChangeListener, getProperties, getProperty, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, setProperty
-
-
-
-
Field Detail
-
PROPERTY_SERVERURL
public static final java.lang.String PROPERTY_SERVERURL
- See Also:
- Constant Field Values
-
PROPERTY_DATASOURCE
public static final java.lang.String PROPERTY_DATASOURCE
- See Also:
- Constant Field Values
-
PROPERTY_EDITOR
public static final java.lang.String PROPERTY_EDITOR
- See Also:
- Constant Field Values
-
PROPERTY_JSESSIONID
public static final java.lang.String PROPERTY_JSESSIONID
- See Also:
- Constant Field Values
-
PROPERTY_OWNER
public static final java.lang.String PROPERTY_OWNER
- See Also:
- Constant Field Values
-
PROPERTY_BASETABLE
public static final java.lang.String PROPERTY_BASETABLE
- See Also:
- Constant Field Values
-
PROPERTY_KEYCOLUMN
public static final java.lang.String PROPERTY_KEYCOLUMN
- See Also:
- Constant Field Values
-
PROPERTY_SPATIALCOLUMN
public static final java.lang.String PROPERTY_SPATIALCOLUMN
- See Also:
- Constant Field Values
-
PROPERTY_QUERYCONDITION
public static final java.lang.String PROPERTY_QUERYCONDITION
- See Also:
- Constant Field Values
-
PROPERTY_KEYSEQUENCE
public static final java.lang.String PROPERTY_KEYSEQUENCE
- See Also:
- Constant Field Values
-
PROPERTY_RENDERSTYLE
public static final java.lang.String PROPERTY_RENDERSTYLE
- See Also:
- Constant Field Values
-
PROPERTY_RENDERSTYLE_NONLIVE
public static final java.lang.String PROPERTY_RENDERSTYLE_NONLIVE
- See Also:
- Constant Field Values
-
PROPERTY_LABELCOLUMN
public static final java.lang.String PROPERTY_LABELCOLUMN
- See Also:
- Constant Field Values
-
PROPERTY_LABELSTYLE
public static final java.lang.String PROPERTY_LABELSTYLE
- See Also:
- Constant Field Values
-
PROPERTY_RENDER_MVNOTEDITING
public static final java.lang.String PROPERTY_RENDER_MVNOTEDITING
- See Also:
- Constant Field Values
-
PROPERTY_LIVESCALE
public static final java.lang.String PROPERTY_LIVESCALE
- See Also:
- Constant Field Values
-
PROPERTY_RENDER_ONZOOMOUT
public static final java.lang.String PROPERTY_RENDER_ONZOOMOUT
- See Also:
- Constant Field Values
-
PROPERTY_RENDER_ONZOOMIN
public static final java.lang.String PROPERTY_RENDER_ONZOOMIN
- See Also:
- Constant Field Values
-
PROPERTY_OPTIMIZE_GEOMOP
public static final java.lang.String PROPERTY_OPTIMIZE_GEOMOP
- See Also:
- Constant Field Values
-
hoverColor
protected java.awt.Color hoverColor
-
hoverBorderColor
protected java.awt.Color hoverBorderColor
-
simpleStroke
protected java.awt.Stroke simpleStroke
-
hoverStroke
protected java.awt.Stroke hoverStroke
-
boundaryColor
protected java.awt.Color boundaryColor
-
animatedStroke
protected AnimatedStroke animatedStroke
-
nontargetAnimatedStroke
protected AnimatedStroke nontargetAnimatedStroke
-
highliteAnimatedStroke
protected AnimatedStroke highliteAnimatedStroke
-
dataSource
protected AbstractDataSource dataSource
-
nonComplexAttrs
protected java.lang.String[] nonComplexAttrs
-
versionEnabled
protected java.lang.Boolean versionEnabled
-
liveImg
protected java.awt.image.BufferedImage liveImg
-
liveProducer
protected AbstractDataSetProducer liveProducer
-
mvImg
protected java.awt.image.BufferedImage mvImg
-
mvLastViewXFM
protected java.awt.geom.AffineTransform mvLastViewXFM
-
lastViewXFM
protected java.awt.geom.AffineTransform lastViewXFM
-
lastDataWindow
protected java.awt.geom.Rectangle2D lastDataWindow
-
selectionManager
protected DefaultSelectionManager selectionManager
-
hoverManager
protected DefaultSelectionManager hoverManager
-
indexedSet
protected AbstractIndexedDataSet indexedSet
-
myNewObjects
protected java.util.Hashtable<java.lang.String,AbstractFeature> myNewObjects
-
myDeleteObjects
protected java.util.Hashtable<java.lang.String,AbstractFeature> myDeleteObjects
-
listenerList
protected javax.swing.event.EventListenerList listenerList
-
-
Constructor Detail
-
AbstractDataSetLayer
protected AbstractDataSetLayer(MapCanvas canvas)
-
-
Method Detail
-
updateDataSetSpatialInfo
protected boolean updateDataSetSpatialInfo()
-
getModelString
protected java.lang.String getModelString()
-
fromXMLElement
public void fromXMLElement(org.w3c.dom.Element element)
Description copied from interface:Layer
Loads the content from an XML representation- Specified by:
fromXMLElement
in interfaceLayer
- Overrides:
fromXMLElement
in classBasicLayer
-
setCanvas
public void setCanvas(MapCanvas canvas)
Description copied from interface:Layer
Sets the map canvas on which this layer is displayed.- Specified by:
setCanvas
in interfaceLayer
- Overrides:
setCanvas
in classBasicLayer
-
getTableKeyColumn
public void getTableKeyColumn()
-
update
public void update(long elapsedTime)
Description copied from interface:Layer
updates the contents data model or structure.- Specified by:
update
in interfaceLayer
- Overrides:
update
in classBasicLayer
- Parameters:
elapsedTime
- The elapsed time since last update.
-
getWorkspace
public WorkSpace getWorkspace() throws java.lang.Exception
- Throws:
java.lang.Exception
-
getRenderOnZoomOut
public boolean getRenderOnZoomOut()
-
setRenderOnZoomOut
public void setRenderOnZoomOut(boolean render)
-
getRenderOnZoomIn
public boolean getRenderOnZoomIn()
-
setRenderOnZoomIn
public void setRenderOnZoomIn(boolean render)
-
getIndexedDataSet
public AbstractIndexedDataSet getIndexedDataSet()
- Returns:
-
setIndexedDataSet
public void setIndexedDataSet(AbstractIndexedDataSet indexedSet)
-
getNonComplexAttributes
public java.lang.String[] getNonComplexAttributes()
-
handleEvent
public boolean handleEvent(java.util.EventObject evt)
Description copied from interface:Layer
The main method that performs event handling for this tool. Returns whether the event should be propagated to other layers down stream (further down the layer stack) after the event has been handled.- Specified by:
handleEvent
in interfaceLayer
- Overrides:
handleEvent
in classBasicLayer
-
getDataSet
public AbstractDataSet getDataSet()
-
getFullExtent
public java.awt.geom.Rectangle2D getFullExtent()
- Specified by:
getFullExtent
in interfaceLayer
- Overrides:
getFullExtent
in classBasicLayer
-
setEditable
public void setEditable(boolean editable)
- Specified by:
setEditable
in interfaceEditableLayer
-
isEditable
public boolean isEditable()
- Specified by:
isEditable
in interfaceEditableLayer
-
isModified
public boolean isModified()
- Specified by:
isModified
in interfaceEditableLayer
-
save
public boolean save()
- Specified by:
save
in interfaceEditableLayer
-
clearChanges
public void clearChanges()
- Specified by:
clearChanges
in interfaceEditableLayer
-
getObjects
public GeoObject[] getObjects()
Description copied from interface:GeoObjectLayer
Gets all GeoObjects in this layer- Specified by:
getObjects
in interfaceGeoObjectLayer
- Returns:
-
getObject
public GeoObject getObject(java.lang.Object key)
Description copied from interface:GeoObjectLayer
Gets the GeoObject corresponding to the provided key- Specified by:
getObject
in interfaceGeoObjectLayer
- Returns:
-
newObject
public GeoObject newObject(java.lang.Object spatialObject, java.lang.Object[] params) throws java.lang.Exception
Description copied from interface:EditableLayer
Creates a new GeoObject with the provided parameters- Specified by:
newObject
in interfaceEditableLayer
- Returns:
- Throws:
java.lang.Exception
-
appendToObject
public boolean appendToObject(java.lang.Object key, java.lang.Object spatialObject) throws java.lang.Exception
Description copied from interface:EditableLayer
Appends the provided spatialObject to an existing feature- Specified by:
appendToObject
in interfaceEditableLayer
- Returns:
- Throws:
java.lang.Exception
-
hitTest
public java.util.List<GeoObject> hitTest(int x, int y, int granularity)
Performs a hit test for the given mouse location (x,y). All the geo-objects that pass the hit test will be returned.- Specified by:
hitTest
in interfaceLayer
- Overrides:
hitTest
in classBasicLayer
- Parameters:
x
- mouse location xy
- mouse location y- Returns:
- an array of features that pass the hit test; if no feature passes the hit test, null is returned.
-
hitTest
public java.util.List<GeoObject> hitTest(java.awt.geom.Rectangle2D box, int granularity)
Performs a hit test for the given rectangle. All the geo-objects that are either inside or intersect the rectangle will be returned.- Specified by:
hitTest
in interfaceLayer
- Overrides:
hitTest
in classBasicLayer
- Parameters:
box
- the test rectangle, in device coordinates- Returns:
- an array of features that pass the box hit test; if no feature passes the hit test, null is returned.
-
setGeoDataProducer
public void setGeoDataProducer(AbstractDataSetProducer geoProducer)
Sets a AbstractDataSetProducer on this layer.- Parameters:
geoProducer
- a AbstractDataSetProducer instance
-
getGeoDataProducer
public GeoDataProducer getGeoDataProducer()
Gets the currently set GeoDataProducer.- Returns:
- geoDataProducer
-
onDataException
public void onDataException(DataProducer producer, java.lang.Throwable exception)
A call-back function to handle exceptions during data loading. The exception is typically caught by an associated data producer.- Parameters:
producer
- the producer that throws the exception during data loadingexception
- the exception or error that was encountered.
-
updateObject
public GeoObject updateObject(java.lang.Object key, GeoObject changedObject)
Updates an existing GeoObject with the specified change.- Specified by:
updateObject
in interfaceEditableLayer
- Parameters:
changedObject
- the object containing changes- Returns:
- the old object
-
updateObjectAttributes
public boolean updateObjectAttributes(java.lang.String key, oracle.mapviewer.share.Field[] updAttrs) throws java.lang.Exception
Updates one or more object attributes.- Parameters:
updAttrs
- the object attributes to be updated- Returns:
- Throws:
java.lang.Exception
-
deleteObject
public GeoObject deleteObject(java.lang.Object key)
Deletes an existing GeoObject instance.- Specified by:
deleteObject
in interfaceEditableLayer
- Parameters:
key
- the object to be deleted- Returns:
- the deleted object
-
insertObject
public boolean insertObject(java.lang.Object key, GeoObject obj) throws java.lang.Exception
Inserts a new GeoObject instance- Specified by:
insertObject
in interfaceEditableLayer
- Parameters:
obj
- the new object to be added to this layer.- Returns:
- Throws:
java.lang.Exception
-
undo
public void undo(EditChangeEvent change) throws java.lang.Exception
Performs and undo operation.- Throws:
java.lang.Exception
-
redo
public void redo(EditChangeEvent change) throws java.lang.Exception
- Throws:
java.lang.Exception
-
mapRegionChanged
public void mapRegionChanged(MapRegionEvent e)
When the associated canvas's map region is changed, this method is called to notify the layer of the change. Note that either a device window change (as a result of resizing the application window) or a data window change can cause this method to be invoked. Query the canvas' MapRegion object to get the changed values.- Specified by:
mapRegionChanged
in interfaceLayer
- Overrides:
mapRegionChanged
in classBasicLayer
-
onDataReady
public void onDataReady(DataProducer producer, java.util.List<AbstractFeature> data)
A call-back function to handle data ready state.- Parameters:
producer
- the producer whose data is ready to be consumed by this layer.
-
renderFeature
protected abstract void renderFeature(java.awt.Graphics2D g, AbstractFeature feat, java.awt.geom.AffineTransform at, oracle.sdovis.style.Style style)
-
render
public long render(java.awt.Graphics2D g)
Description copied from interface:Layer
Renders the layer contents to the given Graphics.- Specified by:
render
in interfaceLayer
- Overrides:
render
in classBasicLayer
- Parameters:
g
- the graphics object- Returns:
- the rendering time in milliseconds.
-
doRealRendering
protected abstract void doRealRendering()
-
labelFeature
protected void labelFeature(java.awt.Graphics2D g, java.awt.geom.AffineTransform xfm, AbstractFeature feat)
-
renderHoverShape
protected abstract void renderHoverShape(GeoObject object, java.awt.Shape shape, java.awt.Graphics2D dest, java.awt.geom.AffineTransform transf)
- Parameters:
object
-shape
-dest
-transf
-
-
renderHoverPoint
protected void renderHoverPoint(java.awt.geom.Point2D pt, java.awt.Graphics2D g)
- Parameters:
pt
-g
-
-
addEditChangeListener
public void addEditChangeListener(EditChangeListener l)
Adds a change listener to listen for editing changes.- Specified by:
addEditChangeListener
in interfaceEditableLayer
- Parameters:
l
-
-
removeEditChangeListener
public void removeEditChangeListener(EditChangeListener l)
- Specified by:
removeEditChangeListener
in interfaceEditableLayer
-
fireStateChanged
protected void fireStateChanged()
-
getCurrentDeletedFeatures
public AbstractFeature[] getCurrentDeletedFeatures()
-
setToUpdate
public void setToUpdate()
-
transformFeatures
public abstract int transformFeatures(GeoObject[] features, java.awt.geom.AffineTransform at) throws java.lang.Exception
- Throws:
java.lang.Exception
-
isSelected
public boolean isSelected(GeoObject obj)
Description copied from interface:SelectableLayer
Checks if an object is selected- Specified by:
isSelected
in interfaceSelectableLayer
- Returns:
- true if the provided object is selected
-
clearSelection
public boolean clearSelection()
Description copied from interface:SelectableLayer
Clears all selected objects- Specified by:
clearSelection
in interfaceSelectableLayer
- Returns:
- true if changes where made
-
numSelected
public int numSelected()
Description copied from interface:SelectableLayer
Returns the number of selected objects- Specified by:
numSelected
in interfaceSelectableLayer
- Returns:
- the number of selected objects
-
getSelection
public java.util.List<GeoObject> getSelection()
Description copied from interface:SelectableLayer
Returns all selected objects- Specified by:
getSelection
in interfaceSelectableLayer
- Returns:
-
getSelection
public java.util.List<GeoObject> getSelection(GeoObject obj)
Description copied from interface:SelectableLayer
Returns selected objects that are children of the provided objects GeoObject's isSubElementOf() determines if an object is children of another object- Specified by:
getSelection
in interfaceSelectableLayer
- Returns:
-
setSelection
public boolean setSelection(java.util.List<GeoObject> objs)
Description copied from interface:SelectableLayer
Clears selection before setting the provided objects as selected- Specified by:
setSelection
in interfaceSelectableLayer
- Returns:
-
select
public boolean select(java.util.List<GeoObject> objs)
Description copied from interface:SelectableLayer
Adds the provided objects to the selection list- Specified by:
select
in interfaceSelectableLayer
- Returns:
-
unselect
public boolean unselect(java.util.List<GeoObject> objs)
Description copied from interface:SelectableLayer
Removes the provided objects from the selection list- Specified by:
unselect
in interfaceSelectableLayer
- Returns:
-
addSelectionListener
public void addSelectionListener(SelectionListener l)
Description copied from interface:SelectableLayer
Adds a SelectionListener- Specified by:
addSelectionListener
in interfaceSelectableLayer
-
removeSelectionListener
public void removeSelectionListener(SelectionListener l)
Description copied from interface:SelectableLayer
Removes the given SelectionListener- Specified by:
removeSelectionListener
in interfaceSelectableLayer
-
setHover
public boolean setHover(java.util.List<GeoObject> objs)
Description copied from interface:HoverableLayer
A list of geo-objects being hovered- Specified by:
setHover
in interfaceHoverableLayer
- Returns:
- true if the objects were hovered
-
clearHover
public boolean clearHover()
Description copied from interface:HoverableLayer
Removes the hovering state from all the geo-objects- Specified by:
clearHover
in interfaceHoverableLayer
- Returns:
-
getHover
public java.util.List<GeoObject> getHover()
Description copied from interface:HoverableLayer
Returns all the geo-object that are being hovered- Specified by:
getHover
in interfaceHoverableLayer
- Returns:
-
isHover
public boolean isHover(GeoObject obj)
Description copied from interface:HoverableLayer
Returns true if the geo-object is being hovered- Specified by:
isHover
in interfaceHoverableLayer
- Returns:
-
numHovered
public int numHovered()
Description copied from interface:HoverableLayer
Returns the number of geo-objects that are being hovered- Specified by:
numHovered
in interfaceHoverableLayer
- Returns:
-
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent e)
- Specified by:
stateChanged
in interfacejavax.swing.event.ChangeListener
-
getDataSource
public AbstractDataSource getDataSource()
-
setDataSource
public void setDataSource(AbstractDataSource dataSource)
-
loadMetadata
protected void loadMetadata()
-
setHighliteGeometries
public void setHighliteGeometries(JGeometry[] geoms)
- Parameters:
geoms
-
-
-