Class MonitorManager

java.lang.Object
io.github.jspinak.brobot.monitor.MonitorManager

@Component public class MonitorManager extends Object
Manages multi-monitor support for Brobot automation framework. Provides methods to detect, select, and work with multiple monitors.
  • Constructor Details

  • 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

      public org.sikuli.script.Screen getScreen(String operationName)
      Get Screen object based on configuration and operation context
      Parameters:
      operationName - Optional operation name for specific monitor assignment
      Returns:
      Appropriate Screen object
    • getAllScreens

      public List<org.sikuli.script.Screen> 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

      public MonitorManager.MonitorInfo getMonitorInfo(int index)
      Get monitor information
    • getAllMonitorInfo

      public List<MonitorManager.MonitorInfo> getAllMonitorInfo()
      Get all monitor information
    • setOperationMonitor

      public void setOperationMonitor(String operationName, int monitorIndex)
      Set monitor for specific operation
    • getMonitorAtPoint

      public int getMonitorAtPoint(Point point)
      Get the monitor containing a specific point
    • toMonitorCoordinates

      public Point toMonitorCoordinates(Point globalPoint, int monitorIndex)
      Convert global coordinates to monitor-relative coordinates
    • toGlobalCoordinates

      public Point toGlobalCoordinates(Point monitorPoint, int monitorIndex)
      Convert monitor-relative coordinates to global coordinates