Add more warnings source to 1.6) and fix warnings
[jvcard.git] / src / be / nikiroo / jvcard / tui / panes / MainContent.java
index c33bbd3fdb93a868b84177382add38f49d6712bb..c63afd9b47ef2da4dd919f1fac5ab6791d917e61 100644 (file)
@@ -1,5 +1,6 @@
 package be.nikiroo.jvcard.tui.panes;
 
+import java.io.IOException;
 import java.util.List;
 
 import be.nikiroo.jvcard.tui.KeyAction;
@@ -29,13 +30,6 @@ abstract public class MainContent extends Panel {
                setLayoutManager(layout);
        }
 
-       /**
-        * The {@link KeyAction#Mode} that links to this {@link MainContent}.
-        * 
-        * @return the linked mode
-        */
-       abstract public KeyAction.Mode getMode();
-
        /**
         * The kind of data displayed by this {@link MainContent}.
         * 
@@ -81,6 +75,7 @@ abstract public class MainContent extends Panel {
         * 
         * @return the error message to display if any
         */
+       @SuppressWarnings("unused")
        public String move(int x, int y) {
                return null;
        }
@@ -102,4 +97,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.
+        * 
+        * <p>
+        * By default, it will just refresh the data.
+        * </p>
+        * 
+        * @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;
+       }
 }