Package io.github.jspinak.brobot.monitor
Class MonitorManager
java.lang.Object
io.github.jspinak.brobot.monitor.MonitorManager
Manages multi-monitor support for Brobot automation framework. Provides methods to detect,
select, and work with multiple monitors.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Information about a monitor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet all monitor informationList
<org.sikuli.script.Screen> Get all available screens for multi-monitor searchint
getMonitorAtPoint
(Point point) Get the monitor containing a specific pointint
Get total number of monitorsgetMonitorInfo
(int index) Get monitor informationint
Get the index of the primary monitororg.sikuli.script.Screen
getScreen
(int monitorIndex) Get Screen object for specified monitor indexorg.sikuli.script.Screen
Get Screen object based on configuration and operation contextboolean
isValidMonitorIndex
(int index) Check if monitor index is validvoid
setOperationMonitor
(String operationName, int monitorIndex) Set monitor for specific operationtoGlobalCoordinates
(Point monitorPoint, int monitorIndex) Convert monitor-relative coordinates to global coordinatestoMonitorCoordinates
(Point globalPoint, int monitorIndex) Convert global coordinates to monitor-relative coordinates
-
Constructor Details
-
MonitorManager
-
-
Method Details
-
getScreen
public org.sikuli.script.Screen getScreen(int monitorIndex) Get Screen object for specified monitor index- Parameters:
monitorIndex
- The monitor index (0-based)- Returns:
- Screen object for the specified monitor
-
getScreen
Get Screen object based on configuration and operation context- Parameters:
operationName
- Optional operation name for specific monitor assignment- Returns:
- Appropriate Screen object
-
getAllScreens
Get all available screens for multi-monitor search- Returns:
- List of all Screen objects
-
isValidMonitorIndex
public boolean isValidMonitorIndex(int index) Check if monitor index is valid -
getMonitorCount
public int getMonitorCount()Get total number of monitors -
getPrimaryMonitorIndex
public int getPrimaryMonitorIndex()Get the index of the primary monitor -
getMonitorInfo
Get monitor information -
getAllMonitorInfo
Get all monitor information -
setOperationMonitor
Set monitor for specific operation -
getMonitorAtPoint
Get the monitor containing a specific point -
toMonitorCoordinates
Convert global coordinates to monitor-relative coordinates -
toGlobalCoordinates
Convert monitor-relative coordinates to global coordinates
-