Package PamView

Class ScreenSize

java.lang.Object
PamView.ScreenSize

public class ScreenSize extends Object
Class to launch a thread which will get the screen size (including the bounds of multiple monitors)

The process of getting the dimensions is launched in a different thread and can be going on while other PAMGAURD startup processes are initialising.

Author:
Doug
  • Constructor Details

    • ScreenSize

      public ScreenSize()
  • Method Details

    • getScreenBounds

      public static Rectangle getScreenBounds()
      Gets the screen bounds, sum / union of all screens.
      Returns:
      Virtual screen size, or null.
    • getNumScreens

      public static int getNumScreens()
      Get the number of screens
      Returns:
      the number of screens
    • getScreenBounds

      public Rectangle getScreenBounds(int iScreen)
      Get the dimensions for a specified screen.
      Parameters:
      iScreen - Screen number
      Returns:
      Rectangle dimensions
    • forceBoundToScreen

      public static boolean forceBoundToScreen(Rectangle bounds)
      Pushes a rectangle so that it's visible on the screen.
      Parameters:
      bounds - - will get modified in place.
      Returns:
      true if the position was changed.
    • isPointOnScreen

      public static boolean isPointOnScreen(Point point) throws Exception
      Test to see if the point is within the bounds of any available monitor
      Parameters:
      point - point
      Returns:
      true if it's within the bounds of any montor
      Throws:
      Exception - Thrown if there are no monitors.