#27 expose messagebox type for inputbox
[fanfix.git] / src / jexer / TApplication.java
index 9fa64d0703ae5d973453db0abb998661eb76fe20..7f491a5ba712dad54431dcea705128cc1eab0169 100644 (file)
@@ -2861,6 +2861,22 @@ public class TApplication implements Runnable {
         return new TInputBox(this, title, caption, text);
     }
 
+    /**
+     * Convenience function to spawn an input box.
+     *
+     * @param title window title, will be centered along the top border
+     * @param caption message to display.  Use embedded newlines to get a
+     * multi-line box.
+     * @param text initial text to seed the field with
+     * @param type one of the Type constants.  Default is Type.OK.
+     * @return the new input box
+     */
+    public final TInputBox inputBox(final String title, final String caption,
+        final String text, final TInputBox.Type type) {
+
+        return new TInputBox(this, title, caption, text, type);
+    }
+
     /**
      * Convenience function to open a terminal window.
      *