X-Git-Url: https://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2FTList.java;h=644c5647afafa5cb7ce81d3f3a75b3faa3908dd1;hb=fe0770f988e64fc0ccafd3d3b086b4a0eb559d3b;hp=71600485fe2b9cb1646a8df8a3c0fa5c7af5755d;hpb=df602ccf5e32585c26dc618dd3b4a759b6820943;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. *