Class WindowMoveEventArgs

java.lang.Object
codedraw.events.WindowMoveEventArgs

public class WindowMoveEventArgs extends Object
This argument is given every time the CodeDraw window is moved.
  • Constructor Summary

    Constructors
    Constructor
    Description
    WindowMoveEventArgs(Point canvasPosition, Point windowPosition)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the distance in pixel from the top left corner of the screen to the top left corner of CodeDraw canvas.
    int
    Gets the distance in pixel from the top left corner of the screen to the top left corner of CodeDraw canvas.
    int
    Gets the distance in pixel from the top left corner of the screen to the top left corner of CodeDraw window.
    int
    Gets the distance in pixel from the top left corner of the screen to the top left corner of CodeDraw window.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WindowMoveEventArgs

      public WindowMoveEventArgs(Point canvasPosition, Point windowPosition)
  • Method Details

    • getCanvasPositionX

      public int getCanvasPositionX()
      Gets the distance in pixel from the top left corner of the screen to the top left corner of CodeDraw canvas. The top left corner of the canvas is the origin point for all drawn objects. Changing the canvas position also changes the window position.
      Returns:
      The distance in pixel from the left side of the main screen to the left of the CodeDraw canvas.
    • getCanvasPositionY

      public int getCanvasPositionY()
      Gets the distance in pixel from the top left corner of the screen to the top left corner of CodeDraw canvas. The top left corner of the canvas is the origin point for all drawn objects. Changing the canvas position also changes the window position.
      Returns:
      The distance in pixel from the top side of the main screen to the top of the CodeDraw canvas.
    • getWindowPositionX

      public int getWindowPositionX()
      Gets the distance in pixel from the top left corner of the screen to the top left corner of CodeDraw window. Changing the window position also changes the canvas position.
      Returns:
      The distance in pixel from the left side of the main screen to the left of the CodeDraw window.
    • getWindowPositionY

      public int getWindowPositionY()
      Gets the distance in pixel from the top left corner of the screen to the top left corner of CodeDraw window. Changing the window position also changes the canvas position.
      Returns:
      The distance in pixel from the top side of the main screen to the top of the CodeDraw window.