Class AbstractDataSetLayer

    • 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_JSESSIONID

        public static final java.lang.String PROPERTY_JSESSIONID
        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
      • nontargetAnimatedStroke

        protected AnimatedStroke nontargetAnimatedStroke
      • highliteAnimatedStroke

        protected AnimatedStroke highliteAnimatedStroke
      • nonComplexAttrs

        protected java.lang.String[] nonComplexAttrs
      • versionEnabled

        protected java.lang.Boolean versionEnabled
      • liveImg

        protected java.awt.image.BufferedImage liveImg
      • 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
      • 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 interface Layer
        Overrides:
        fromXMLElement in class BasicLayer
      • 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 interface Layer
        Overrides:
        setCanvas in class BasicLayer
      • 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 interface Layer
        Overrides:
        update in class BasicLayer
        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)
      • 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 interface Layer
        Overrides:
        handleEvent in class BasicLayer
      • 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 interface GeoObjectLayer
        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 interface EditableLayer
        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 interface EditableLayer
        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 interface Layer
        Overrides:
        hitTest in class BasicLayer
        Parameters:
        x - mouse location x
        y - 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 interface Layer
        Overrides:
        hitTest in class BasicLayer
        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 loading
        exception - 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 interface EditableLayer
        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 interface EditableLayer
        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 interface EditableLayer
        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 interface Layer
        Overrides:
        mapRegionChanged in class BasicLayer
      • 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 interface Layer
        Overrides:
        render in class BasicLayer
        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 -
      • 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 interface SelectableLayer
        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 interface SelectableLayer
        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 interface SelectableLayer
        Returns:
        the number of selected objects
      • 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 interface SelectableLayer
        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 interface SelectableLayer
        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 interface SelectableLayer
        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 interface SelectableLayer
        Returns:
      • 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 interface HoverableLayer
        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 interface HoverableLayer
        Returns:
      • numHovered

        public int numHovered()
        Description copied from interface: HoverableLayer
        Returns the number of geo-objects that are being hovered
        Specified by:
        numHovered in interface HoverableLayer
        Returns:
      • stateChanged

        public void stateChanged​(javax.swing.event.ChangeEvent e)
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener
      • loadMetadata

        protected void loadMetadata()
      • setHighliteGeometries

        public void setHighliteGeometries​(JGeometry[] geoms)
        Parameters:
        geoms -