Package PamView
Class ScreenSize
java.lang.Object
PamView.ScreenSize
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
forceBoundToScreen
(Rectangle bounds) Pushes a rectangle so that it's visible on the screen.static int
Get the number of screensstatic Rectangle
Gets the screen bounds, sum / union of all screens.getScreenBounds
(int iScreen) Get the dimensions for a specified screen.static boolean
isPointOnScreen
(Point point) Test to see if the point is within the bounds of any available monitor
-
Constructor Details
-
ScreenSize
public ScreenSize()
-
-
Method Details
-
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
Get the dimensions for a specified screen.- Parameters:
iScreen
- Screen number- Returns:
- Rectangle dimensions
-
forceBoundToScreen
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
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.
-