Documentation of 'japlot.jaxodraw.JaxoZoom' Java class
JaxoZoom
japlot.jaxodraw

Class JaxoZoom



  • public class JaxoZoom
    extends java.lang.Object
    A zoom on the canvas.
    • Constructor Summary

      Constructors 
      Constructor and Description
      JaxoZoom()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void adjustZoomWindow(int oldX, int oldY, int newX, int newY)
      Adjusts the zoom when the zoom window gets dragged.
      void dragZoomWindow(int eX, int eY)
      Drags the zoom when the zoom window gets dragged.
      void drawZoomWindow()
      Draws the zoom by clipping to the zoom window and scaling the background image.
      void eraseZoomWindow()
      Erases the zoom window.
      java.awt.Image getBackground()
      Returns the background image of the zoom.
      int getCanvasHeight()
      Returns the height of the canvas (the portion of the image that is visible).
      int getCanvasWidth()
      Returns the width of the canvas (the portion of the image that is visible).
      java.awt.Graphics getGraphics()
      Returns the graphics context of the zoom.
      int getImageHeight()
      Returns the height of the image.
      int getImageWidth()
      Returns the width of the image.
      int getZoomFactor()
      Returns the zoom factor.
      int getZoomWindowHeight()
      Returns the height of the zoom window.
      int getZoomWindowWidth()
      Returns the width of the zoom window.
      int getZoomWindowX()
      Returns the x-coordinate of the ZoomWindow's origin.
      int getZoomWindowY()
      Returns the y-coordinate of the ZoomWindow's origin.
      void setBackground(java.awt.Image bg)
      Sets the background image for the zoom.
      void setCanvasHeight(int cHeight)
      Sets the height of the canvas (the portion of the image that is visible).
      void setCanvasWidth(int cWidth)
      Sets the width of the canvas (the portion of the image that is visible).
      void setGraphics(java.awt.Graphics gr)
      Sets the graphics context for the zoom.
      void setImageHeight(int iHeight)
      Sets the height of the image.
      void setImageWidth(int iWidth)
      Sets the width of the image.
      void setTmpImage()
      Sets the temporary image that is used for double-buffering the zoom.
      void setZoomFactor(int zf)
      Sets the zoom factor.
      void setZoomWindowHeight(int zwHeight)
      Sets the height of the zoom window.
      void setZoomWindowWidth(int zwWidth)
      Sets the width of the zoom window.
      void setZoomWindowX(int x)
      Sets the x-coordinate of the ZoomWindow's origin.
      void setZoomWindowY(int y)
      Sets the y-coordinate of the ZoomWindow's origin.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JaxoZoom

        public JaxoZoom()
        Constructor.
    • Method Detail

      • setZoomFactor

        public final void setZoomFactor(int zf)
        Sets the zoom factor.
        Parameters:
        zf - The zoom factor.
      • getZoomFactor

        public final int getZoomFactor()
        Returns the zoom factor.
        Returns:
        The zoom factor.
      • setZoomWindowWidth

        public final void setZoomWindowWidth(int zwWidth)
        Sets the width of the zoom window.
        Parameters:
        zwWidth - The width of the zoom window.
      • getZoomWindowWidth

        public final int getZoomWindowWidth()
        Returns the width of the zoom window.
        Returns:
        The width of the zoom window.
      • setZoomWindowHeight

        public final void setZoomWindowHeight(int zwHeight)
        Sets the height of the zoom window.
        Parameters:
        zwHeight - The width of the zoom window.
      • getZoomWindowHeight

        public final int getZoomWindowHeight()
        Returns the height of the zoom window.
        Returns:
        The height of the zoom window.
      • setImageWidth

        public final void setImageWidth(int iWidth)
        Sets the width of the image.
        Parameters:
        iWidth - The width of the image.
      • getImageWidth

        public final int getImageWidth()
        Returns the width of the image.
        Returns:
        The width of the image.
      • setImageHeight

        public final void setImageHeight(int iHeight)
        Sets the height of the image.
        Parameters:
        iHeight - The width of the image.
      • getImageHeight

        public final int getImageHeight()
        Returns the height of the image.
        Returns:
        The height of the image.
      • setCanvasWidth

        public final void setCanvasWidth(int cWidth)
        Sets the width of the canvas (the portion of the image that is visible).
        Parameters:
        cWidth - The width of the canvas.
      • getCanvasWidth

        public final int getCanvasWidth()
        Returns the width of the canvas (the portion of the image that is visible).
        Returns:
        The width of the canvas.
      • setCanvasHeight

        public final void setCanvasHeight(int cHeight)
        Sets the height of the canvas (the portion of the image that is visible).
        Parameters:
        cHeight - The height of the canvas.
      • getCanvasHeight

        public final int getCanvasHeight()
        Returns the height of the canvas (the portion of the image that is visible).
        Returns:
        The height of the canvas.
      • setZoomWindowX

        public final void setZoomWindowX(int x)
        Sets the x-coordinate of the ZoomWindow's origin.
        Parameters:
        x - The x-coordinate of the ZoomWindow's origin.
      • getZoomWindowX

        public final int getZoomWindowX()
        Returns the x-coordinate of the ZoomWindow's origin.
        Returns:
        The x-coordinate of the ZoomWindow's origin.
      • setZoomWindowY

        public final void setZoomWindowY(int y)
        Sets the y-coordinate of the ZoomWindow's origin.
        Parameters:
        y - The y-coordinate of the ZoomWindow's origin.
      • getZoomWindowY

        public final int getZoomWindowY()
        Returns the y-coordinate of the ZoomWindow's origin.
        Returns:
        The y-coordinate of the ZoomWindow's origin.
      • setBackground

        public final void setBackground(java.awt.Image bg)
        Sets the background image for the zoom.
        Parameters:
        bg - The background image.
      • setTmpImage

        public final void setTmpImage()
        Sets the temporary image that is used for double-buffering the zoom.
      • getBackground

        public final java.awt.Image getBackground()
        Returns the background image of the zoom.
        Returns:
        The background image.
      • setGraphics

        public final void setGraphics(java.awt.Graphics gr)
        Sets the graphics context for the zoom.
        Parameters:
        gr - The graphics context.
      • getGraphics

        public final java.awt.Graphics getGraphics()
        Returns the graphics context of the zoom.
        Returns:
        The graphics context.
      • drawZoomWindow

        public final void drawZoomWindow()
        Draws the zoom by clipping to the zoom window and scaling the background image.
      • eraseZoomWindow

        public final void eraseZoomWindow()
        Erases the zoom window.
      • adjustZoomWindow

        public final void adjustZoomWindow(int oldX,
                                           int oldY,
                                           int newX,
                                           int newY)
        Adjusts the zoom when the zoom window gets dragged.
        Parameters:
        oldX - The old x-coordinate of the zoom window.
        oldY - The old y-coordinate of the zoom window.
        newX - The new x-coordinate of the zoom window.
        newY - The new y-coordinate of the zoom window.
      • dragZoomWindow

        public final void dragZoomWindow(int eX,
                                         int eY)
        Drags the zoom when the zoom window gets dragged.
        Parameters:
        eX - The x-coordinate of the center of the zoom window (where the mouse event occurred).
        eY - The y-coordinate of the center of the zoom window.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.