Package codedraw

Class WindowMoveEvent

java.lang.Object
codedraw.Event
codedraw.WindowMoveEvent

public class WindowMoveEvent extends Event
This argument is given every time the CodeDraw window is moved.
  • 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, wait, wait, wait
  • 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.
    • toString

      public String toString()
      Overrides:
      toString in class Object