X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTField.java;h=083fc90e7d18239892624bc634f60f4b97cebfad;hb=3649b9210ea425f398ba8c24f9509669cf72aa96;hp=8055a3893563c7c248e10294de546820c6b4b9a3;hpb=0d47c5460c8e9d1198928308767a63ad35f46eb8;p=fanfix.git diff --git a/src/jexer/TField.java b/src/jexer/TField.java index 8055a38..083fc90 100644 --- a/src/jexer/TField.java +++ b/src/jexer/TField.java @@ -1,4 +1,4 @@ -/** +/* * Jexer - Java Text User Interface * * License: LGPLv3 or later @@ -55,6 +55,17 @@ public class TField extends TWidget { return text; } + /** + * Set field text. + * + * @param text the new field text + */ + public final void setText(String text) { + this.text = text; + position = 0; + windowStart = 0; + } + /** * If true, only allow enough characters that will fit in the width. If * false, allow the field to scroll to the right.