X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTWidget.java;h=72df0a2aea330f3c3e1effc0c9e0393acc5d12f5;hb=ad5849667b51ab27d7e4f31ba62b0447c94f1715;hp=c89e70ec65de92a7240ec9c69e90bcbf7736da4a;hpb=382bc294dd88b71639fdd6c73216d2519635a080;p=fanfix.git diff --git a/src/jexer/TWidget.java b/src/jexer/TWidget.java index c89e70e..72df0a2 100644 --- a/src/jexer/TWidget.java +++ b/src/jexer/TWidget.java @@ -1911,6 +1911,22 @@ public abstract class TWidget implements Comparable { return getApplication().inputBox(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 getApplication().inputBox(title, caption, text, type); + } + /** * Convenience function to add a password text field to this * container/window.