public class RadioCheckBoxList extends AbstractListBox
Interactable.FocusChangeDirection, Interactable.Result
Component.Alignment
Constructor and Description |
---|
RadioCheckBoxList()
Creates a new RadioCheckBoxList with no items
|
RadioCheckBoxList(TerminalSize preferredSize)
Creates a new RadioCheckBoxList with a specified size override
|
Modifier and Type | Method and Description |
---|---|
void |
addItem(Object item) |
void |
clearItems() |
protected String |
createItemString(int index) |
Object |
getCheckedItem() |
int |
getCheckedItemIndex() |
protected int |
getHotSpotPositionOnLine(int selectedIndex) |
protected Theme.Definition |
getListItemThemeDefinition(Theme theme) |
protected Theme.Definition |
getSelectedListItemThemeDefinition(Theme theme) |
Boolean |
isChecked(int index)
This method will see if an item, adressed by index, is the currently selected item in this
RadioCheckBoxList
|
Boolean |
isChecked(Object object)
This method will see if an object is the currently selected item in this RadioCheckBoxList
|
void |
setCheckedItemIndex(int index)
Sets the currently selected item by index
|
protected Interactable.Result |
unhandledKeyboardEvent(Key key) |
afterEnteredFocus, calculatePreferredSize, getItemAt, getNrOfItems, getSelectedIndex, getSelectedItem, getSize, indexOf, isScrollable, keyboardInteraction, printItem, repaint, setSelectedItem
afterLeftFocus, getHotspot, hasFocus, onEnterFocus, onLeaveFocus, setHotspot
addBorder, addComponentListener, getAlignment, getComponentListeners, getGUIScreen, getMinimumSize, getParent, getPreferredSize, getWindow, invalidate, isVisible, removeComponentListener, setAlignment, setParent, setPreferredSize, setVisible, transformAccordingToAlignment
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addBorder, addComponentListener, getAlignment, getMinimumSize, getParent, getPreferredSize, getWindow, isVisible, removeComponentListener, setAlignment, setPreferredSize, setVisible
public RadioCheckBoxList()
public RadioCheckBoxList(TerminalSize preferredSize)
preferredSize
- Size of the RadioCheckBoxList or null
to use the default
calculation algorithmpublic void clearItems()
clearItems
in class AbstractListBox
public void addItem(Object item)
addItem
in class AbstractListBox
public Boolean isChecked(Object object)
object
- Object to test if it's the selected onetrue
if the supplied object is what's currently selected in the list box,
false
otherwise. Returns null if the supplied object is not an item in the list box.public Boolean isChecked(int index)
index
- Index of the item to check if it's currently selectedtrue
if the currently selected object is at the supplied index,
false
otherwise. Returns null if the index is out of range.public void setCheckedItemIndex(int index)
index
- Index of the item to be selectedpublic int getCheckedItemIndex()
public Object getCheckedItem()
protected Interactable.Result unhandledKeyboardEvent(Key key)
unhandledKeyboardEvent
in class AbstractListBox
protected int getHotSpotPositionOnLine(int selectedIndex)
getHotSpotPositionOnLine
in class AbstractListBox
protected String createItemString(int index)
createItemString
in class AbstractListBox
protected Theme.Definition getListItemThemeDefinition(Theme theme)
getListItemThemeDefinition
in class AbstractListBox
protected Theme.Definition getSelectedListItemThemeDefinition(Theme theme)
getSelectedListItemThemeDefinition
in class AbstractListBox
Copyright © 2015. All Rights Reserved.