X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTField.java;h=992f274fb388792c1ed76c5e33bcc6a4472cb6a8;hb=9588c7134280341ab6e92e37d1c1d00b3756cee5;hp=e8fd3defc8baeb8229f99f831760f9866d618730;hpb=1dac6b8d395e2bf3c1b58915f8f4f481d9e46793;p=fanfix.git diff --git a/src/jexer/TField.java b/src/jexer/TField.java index e8fd3de..992f274 100644 --- a/src/jexer/TField.java +++ b/src/jexer/TField.java @@ -573,5 +573,22 @@ public class TField extends TWidget { this.inactiveColorKey = inactiveColorKey; } + /** + * Set the action to perform when the user presses enter. + * + * @param action the action to perform when the user presses enter + */ + public void setEnterAction(final TAction action) { + enterAction = action; + } + + /** + * Set the action to perform when the field is updated. + * + * @param action the action to perform when the field is updated + */ + public void setUpdateAction(final TAction action) { + updateAction = action; + } }