Package codedraw.events
Class WindowMoveEventArgs
java.lang.Object
codedraw.events.WindowMoveEventArgs
This argument is given every time the CodeDraw window is moved.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
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.
-
Constructor Details
-
WindowMoveEventArgs
-
-
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.
-