X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTField.java;h=992f274fb388792c1ed76c5e33bcc6a4472cb6a8;hb=2b4274048c2f409b5eba8373ab3018aa75911c73;hp=e8fd3defc8baeb8229f99f831760f9866d618730;hpb=589c6ce94839d9b4c6144a24cabad8031596c83b;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; + } }