V
- public static class CheckBoxList.CheckBoxListItemRenderer<V> extends AbstractListBox.ListItemRenderer<V,CheckBoxList<V>>
Constructor and Description |
---|
CheckBoxListItemRenderer() |
Modifier and Type | Method and Description |
---|---|
int |
getHotSpotPositionOnLine(int selectedIndex)
Returns where on the line to place the text terminal cursor for a currently selected item.
|
String |
getLabel(CheckBoxList<V> listBox,
int index,
V item)
Given a list box, an index of an item within that list box and what the item is, this method should return
what to draw for that item.
|
drawItem
public int getHotSpotPositionOnLine(int selectedIndex)
AbstractListBox.ListItemRenderer
ListItemRenderer
you
can change this by returning a different number. Returning -1 will cause lanterna to hide the cursor.getHotSpotPositionOnLine
in class AbstractListBox.ListItemRenderer<V,CheckBoxList<V>>
selectedIndex
- Which item is currently selectedpublic String getLabel(CheckBoxList<V> listBox, int index, V item)
AbstractListBox.ListItemRenderer
toString()
returns when
called on the item.getLabel
in class AbstractListBox.ListItemRenderer<V,CheckBoxList<V>>
listBox
- List box the item belongs toindex
- Index of the itemitem
- The item itselfCopyright © 2016. All rights reserved.