Class InputDialog


  • public class InputDialog
    extends java.lang.Object

    Hybrid helper class for the "Enter amount:" dialog seen in banks, deposit boxes and elsewhere

    Searches for EnterTextDialog for titles matching any of the following: "Enter amount", "Enter name", "How many ", "Set a price"

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean enterAmount​(int amount)
      Enters the amount specified into the dialog box and delays until the action was successful
      static boolean enterAmount​(int amount, boolean metric)  
      static boolean enterText​(java.lang.String text)  
      static boolean enterText​(java.lang.String text, boolean pressEnter)
      Enters the string specified into the dialog box and delays until the action was successful
      static boolean isOpen()
      Determines whether or not the "Enter amount:" dialog is open
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isOpen

        public static boolean isOpen()
        Determines whether or not the "Enter amount:" dialog is open
        Returns:
        true if the dialog is open
      • enterAmount

        public static boolean enterAmount​(int amount)
        Enters the amount specified into the dialog box and delays until the action was successful
        Parameters:
        amount - amount to type
        Returns:
        if successfully typed the amount, selected enter and confirmed the dialog has closed
      • enterAmount

        public static boolean enterAmount​(int amount,
                                          boolean metric)
        Parameters:
        amount - amount to type
        metric - true to force truncation of amount, false to type whole number
        Returns:
        if successfully typed the amount, selected enter and confirmed the dialog has closed
      • enterText

        public static boolean enterText​(java.lang.String text,
                                        boolean pressEnter)
        Enters the string specified into the dialog box and delays until the action was successful
        Parameters:
        text - string to type
        pressEnter - press enter after typing the string
        Returns:
        if successfully typed the amount, selected enter and confirmed the dialog has closed
      • enterText

        public static boolean enterText​(java.lang.String text)
        Parameters:
        text - string to type
        Returns:
        if successfully typed the amount, selected enter and confirmed the dialog has closed