Class ScreenRectangleInfo


  • public class ScreenRectangleInfo
    extends java.lang.Object
    Screen rectangle info about positions, handles, etc on screen in pixels.
    Author:
    Christopher Mindus
    • Field Summary

      Fields 
      Modifier and TypeFieldDescription
      org.eclipse.swt.graphics.Point[]handles
      Handle positions, handles 0 and 5 are unused.
      org.eclipse.swt.graphics.Rectangle[]rectangles
      The rectangles.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      intgetHandle​(int x, int y)
      Gets the handle where the cursor is located for a mouse event.
      voidsaveHandle​(int handle, int x, int y)
      Saves a handle.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • rectangles

        public org.eclipse.swt.graphics.Rectangle[] rectangles
        The rectangles.
      • handles

        public final org.eclipse.swt.graphics.Point[] handles
        Handle positions, handles 0 and 5 are unused. Unallocated handles are null.
    • Constructor Detail

      • ScreenRectangleInfo

        public ScreenRectangleInfo()
    • Method Detail

      • saveHandle

        public void saveHandle​(int handle,
                               int x,
                               int y)
        Saves a handle.
        Parameters:
        handle - The handle index.
        x - X pixel position.
        y - Y pixel position.
      • getHandle

        public int getHandle​(int x,
                             int y)
        Gets the handle where the cursor is located for a mouse event.
        Parameters:
        x - X pixel position.
        y - Y pixel position.
        Returns:
        1 to 9 where 5 is inside but not on a handle, 0 (zero) for not inside.