Class Viewport

    • Method Detail

      • getModelEnv

        public Envelope getModelEnv()
      • getViewEnv

        public Envelope getViewEnv()
      • getScale

        public double getScale()
      • intersectsInModel

        public boolean intersectsInModel​(Envelope env)
      • toModel

        public double toModel​(double viewDist)
        Converts a distance in the view to a distance in the model.
        Parameters:
        viewDist -
        Returns:
        the model distance
      • toView

        public double toView​(double modelDist)
        Converts a distance in the model to a distance in the view.
        Parameters:
        modelDist -
        Returns:
        the view distance
      • update

        public void update​(Dimension viewSize)
      • getModelToViewTransform

        public AffineTransform getModelToViewTransform()
      • zoomToInitialExtent

        public void zoomToInitialExtent()
      • zoom

        public void zoom​(Envelope zoomEnv)
      • zoomPan

        public void zoomPan​(double dx,
                            double dy)
      • zoom

        public void zoom​(Point2D zoomPt,
                         double zoomScale)
        Zoom to a point, ensuring that the zoom point remains in the same screen location.
        Parameters:
        zoomPt -
        zoomFactor -
      • getLowerLeftCornerInModel

        public Point2D getLowerLeftCornerInModel()
      • getHeightInView

        public double getHeightInView()
      • getWidthInView

        public double getWidthInView()
      • containsInModel

        public boolean containsInModel​(Coordinate p)
      • contains

        public boolean contains​(Point2D p)
      • gridMagnitudeModel

        public int gridMagnitudeModel()
        Gets the magnitude (power of 10) for the basic grid size.
        Returns:
        the magnitude
      • getGridPrecisionModel

        public PrecisionModel getGridPrecisionModel()
        Gets a PrecisionModel corresponding to the grid size.
        Returns:
        the precision model
      • getGridSizeModel

        public double getGridSizeModel()