X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fjvcard%2Ftui%2FKeyAction.java;h=b60664b8cb479c1b89ffaa4a9d0537dbf33b589e;hb=ae22c2473f7203b8713dec1c1de532c312000d1e;hp=5686e2edaa7fea1d079c22776f37a1eab2b0deb9;hpb=296a0b75515b3a7424b98292c87cbbf2272b73f9;p=jvcard.git diff --git a/src/be/nikiroo/jvcard/tui/KeyAction.java b/src/be/nikiroo/jvcard/tui/KeyAction.java index 5686e2e..b60664b 100644 --- a/src/be/nikiroo/jvcard/tui/KeyAction.java +++ b/src/be/nikiroo/jvcard/tui/KeyAction.java @@ -27,7 +27,7 @@ public class KeyAction { * */ public enum Mode { - NONE, MOVE, BACK, HELP, FILE_LIST, CONTACT_LIST, CONTACT_DETAILS, EDIT_DETAIL, DELETE_CONTACT, SAVE_CARD, + NONE, MOVE, BACK, HELP, FILE_LIST, CONTACT_LIST, CONTACT_DETAILS_RAW, CONTACT_DETAILS, ASK_USER, ASK_USER_KEY, } public enum DataType { @@ -161,4 +161,36 @@ public class KeyAction { public boolean onAction() { return true; } + + /** + * Used to callback a function from the menu when the user has to introduce + * some text. + * + * @param answer + * the user answer + * + * @return an error message if any + */ + public String callback(String answer) { + return null; + } + + /** + * When asking a question to the user, return the question. + * + * @return the question + */ + public String getQuestion() { + return null; + } + + /** + * When asking a question to the user (not for one-key mode), return the + * default answer. + * + * @return the default answer + */ + public String getDefaultAnswer() { + return null; + } }