Class HostPopupWindow


  • public class HostPopupWindow
    extends java.lang.Object
    This class identifies pop-up windows on a host screen. It also contains a set of methods to retrieve these pop-up windows.
    Author:
    Christopher Mindus
    • Field Summary

      Fields 
      Modifier and TypeFieldDescription
      static intMINIMUM_HEIGHT
      Minimum height of a pop-up window (=3).
      static intMINIMUM_WIDTH
      Minimum width of a pop-up window (=4).
    • Constructor Summary

      Constructors 
      ConstructorDescription
      HostPopupWindow​(HostScreen screen)
      Creates the host pop-up window analyzer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      voidanalyze()
      This method analyzes the current host screen for pop-up windows.
      voidanalyze​(int minCX, int minCY)
      This method analyzes the current host screen for pop-up windows.
      voiddeleteAllPopupWindows()
      Deletes all current pop-up windows.
      intgetCount()
      Gets the count of pop-up windows.
      RectgetCurrent()
      Gets the current pop-up window rectangle or null if no current rectangle exist.
      intgetCurrentIndex()
      Gets the current index of the pop-up window.
      intgetCurrentXOffset()
      Gets the current offset of the pop-up window in X.
      intgetCurrentYOffset()
      Gets the current offset of the pop-up window in X.
      RectgetPopupWindow​(int index)
      Gets the pop-up window at an index.
      Rect[]getPopupWindows()
      Gets the pop-up windows.
      booleanhasCurrentPopupWindow()
      Checks if there is a current pop-up window defined.
      booleanhasPopupWindows()
      Checks if there are any pop-up windows defined.
      voidsetCurrent​(int index)
      Sets a pop-up window as the current one.
      • Methods inherited from class java.lang.Object

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

      • MINIMUM_WIDTH

        public static final int MINIMUM_WIDTH
        Minimum width of a pop-up window (=4).
        See Also:
        Constant Field Values
      • MINIMUM_HEIGHT

        public static final int MINIMUM_HEIGHT
        Minimum height of a pop-up window (=3).
        See Also:
        Constant Field Values
    • Constructor Detail

      • HostPopupWindow

        public HostPopupWindow​(HostScreen screen)
        Creates the host pop-up window analyzer.
    • Method Detail

      • getCount

        public int getCount()
        Gets the count of pop-up windows.
      • getCurrentXOffset

        public int getCurrentXOffset()
        Gets the current offset of the pop-up window in X.
      • getCurrentYOffset

        public int getCurrentYOffset()
        Gets the current offset of the pop-up window in X.
      • getCurrent

        public Rect getCurrent()
        Gets the current pop-up window rectangle or null if no current rectangle exist.
      • getCurrentIndex

        public int getCurrentIndex()
        Gets the current index of the pop-up window.
        Returns:
        The index, or -1 for none.
      • setCurrent

        public void setCurrent​(int index)
        Sets a pop-up window as the current one. -1 indicates no current pop-up window.
      • getPopupWindows

        public Rect[] getPopupWindows()
        Gets the pop-up windows.
        Returns:
        An array of rectangles.
      • getPopupWindow

        public Rect getPopupWindow​(int index)
        Gets the pop-up window at an index.
        Returns:
        null if index is out of range.
      • hasPopupWindows

        public boolean hasPopupWindows()
        Checks if there are any pop-up windows defined.
      • hasCurrentPopupWindow

        public boolean hasCurrentPopupWindow()
        Checks if there is a current pop-up window defined.
      • analyze

        public void analyze()
        This method analyzes the current host screen for pop-up windows. This will use a default minimum width of 4 and a height of 4.
      • analyze

        public void analyze​(int minCX,
                            int minCY)
        This method analyzes the current host screen for pop-up windows.
      • deleteAllPopupWindows

        public void deleteAllPopupWindows()
        Deletes all current pop-up windows.