X-Git-Url: http://git.nikiroo.be/?p=jvcard.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Fjvcard%2Ftui%2Fpanes%2FMainContent.java;h=0bc9b29fce7bc091d0f3696534776b640b340b34;hp=df8731366b37d788e2ab5ff86258e018221fb4da;hb=0b0b2b0ff1f5e21f7b0feb955b4b54855fb3d508;hpb=9c8baf0c360173b864683176c567757429c4fb12 diff --git a/src/be/nikiroo/jvcard/tui/panes/MainContent.java b/src/be/nikiroo/jvcard/tui/panes/MainContent.java index df87313..0bc9b29 100644 --- a/src/be/nikiroo/jvcard/tui/panes/MainContent.java +++ b/src/be/nikiroo/jvcard/tui/panes/MainContent.java @@ -29,22 +29,6 @@ abstract public class MainContent extends Panel { setLayoutManager(layout); } - /** - * The title to display instead of the application name, or NULL for the - * default application name. - * - * @return the title or NULL - */ - abstract public String getTitle(); - - /** - * Returns an error message ready to be displayed if we should ask something - * to the user before exiting. - * - * @return an error message or NULL - */ - abstract public String getExitWarning(); - /** * The {@link KeyAction#Mode} that links to this {@link MainContent}. * @@ -66,6 +50,24 @@ abstract public class MainContent extends Panel { */ abstract public List getKeyBindings(); + /** + * The title to display instead of the application name, or NULL for the + * default application name. + * + * @return the title or NULL + */ + abstract public String getTitle(); + + /** + * Returns an error message ready to be displayed if we should ask something + * to the user before exiting. + * + * @return an error message or NULL + */ + public String getExitWarning() { + return null; + } + /** * Move the active cursor (not the text cursor, but the currently active * item). @@ -77,5 +79,17 @@ abstract public class MainContent extends Panel { * * @return the error message to display if any */ - abstract public String move(int x, int y); + public String move(int x, int y) { + return null; + } + + /** + * Return the number of items in this {@link MainContent}, or -1 if this + * {@link MainContent} is not countable. + * + * @return -1 or the number of present items + */ + public int getCount() { + return -1; + } }