X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTList.java;h=644c5647afafa5cb7ce81d3f3a75b3faa3908dd1;hb=6f8ff91a29056209f9fd5f40e2dcf1ae285e0210;hp=71600485fe2b9cb1646a8df8a3c0fa5c7af5755d;hpb=56661844475522242093c8858ceb20fb15589da5;p=fanfix.git diff --git a/src/jexer/TList.java b/src/jexer/TList.java index 7160048..644c564 100644 --- a/src/jexer/TList.java +++ b/src/jexer/TList.java @@ -81,6 +81,15 @@ public class TList extends TScrollableWidget { return null; } + /** + * Get the maximum selection index value. + * + * @return -1 if the list is empty + */ + public final int getMaxSelectedIndex() { + return strings.size() - 1; + } + /** * Set the new list of strings to display. *