X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTApplication.java;h=7f491a5ba712dad54431dcea705128cc1eab0169;hb=72b6bd90316d58e87afbed110164cc2f203ec919;hp=9fa64d0703ae5d973453db0abb998661eb76fe20;hpb=0525b2ed026e0d510fdf23f6d8f4cb4562a17e0b;p=nikiroo-utils.git diff --git a/src/jexer/TApplication.java b/src/jexer/TApplication.java index 9fa64d0..7f491a5 100644 --- a/src/jexer/TApplication.java +++ b/src/jexer/TApplication.java @@ -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. *