X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fjvcard%2Ftui%2Fpanes%2FMainContent.java;h=0d873daa26287010a46183d84c001544b3601e93;hb=3634193b7a8927e68a3ae3d38fff4f6bd36c4ee5;hp=68230d490eeb98e3bb612f323fd91533f73caeef;hpb=f04d8b1c4c3ed29d4d23cc076f307ef455b2dcb6;p=jvcard.git diff --git a/src/be/nikiroo/jvcard/tui/panes/MainContent.java b/src/be/nikiroo/jvcard/tui/panes/MainContent.java index 68230d4..0d873da 100644 --- a/src/be/nikiroo/jvcard/tui/panes/MainContent.java +++ b/src/be/nikiroo/jvcard/tui/panes/MainContent.java @@ -1,5 +1,6 @@ package be.nikiroo.jvcard.tui.panes; +import java.io.IOException; import java.util.List; import be.nikiroo.jvcard.tui.KeyAction; @@ -95,4 +96,23 @@ abstract public class MainContent extends Panel { public void refreshData() { invalidate(); } + + /** + * Wake up call when the content is popped-back into view. You should call + * this method when you exit a previous content and come back to this one. + * + *

+ * By default, it will just refresh the data. + *

+ * + * @return a message to display, or NULL + * + * @throws IOException + * in case of error (the message of the {@link IOException} will + * be displayed to the user) + */ + public String wakeup() throws IOException { + refreshData(); + return null; + } }