Class CanvasEvent

    • Constructor Detail

      • CanvasEvent

        public CanvasEvent​(Canvas source)
        Creates a new event having the given canvas as a source.
        Parameters:
        source - The canvas on which the event initially occurred.
        Throws:
        IllegalArgumentException - if the given source is null.
    • Method Detail

      • getSource

        public Canvas getSource()
        Returns the canvas on which the event occured.
        Overrides:
        getSource in class EventObject
        Returns:
        the source canvas.
      • getOldState

        public abstract CanvasState getOldState()
        Returns the canvas state prior the change.
        Returns:
        the old canvas state.
      • getNewState

        public abstract CanvasState getNewState()
        Returns the canvas state after the change.
        Returns:
        the new canvas state.
      • getChange

        public abstract MathTransform getChange()
        Returns the change from the old state to the new state in units of objective CRS. This change is typically (but is not restricted to) an affine transform.

        Example: if the objective CRS uses a map projection with axis in metres, and if the user pan the map, then the change is an affine transform containing translation terms in metres.

        Returns:
        the change from the old state to the new state, typically as an affine transform.
      • getChange

        @Deprecated
        public abstract MathTransform getChange​(CanvasState other)
        Deprecated.
        This method does not said is the change is computed from the old or the new state. If we need this functionality, then the method should move to CanvasState.
        Calculates to the given canvas state.
      • getOldRenderingstate

        public abstract RenderingState getOldRenderingstate()
      • getNewRenderingstate

        public abstract RenderingState getNewRenderingstate()