Package jexer
Class TRadioButton
- java.lang.Object
-
- jexer.TWidget
-
- jexer.TRadioButton
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
draw()
Draw a radio button with label.int
getId()
Get ID for this radio button.MnemonicString
getMnemonic()
Get the mnemonic string for this button.boolean
isSelected()
Get RadioButton state, true means selected.void
onKeypress(TKeypressEvent keypress)
Handle keystrokes.void
onMouseDown(TMouseEvent mouse)
Handle mouse button presses.void
setHeight(int height)
Override TWidget's height: we can only set height at construction time.void
setSelected(boolean selected)
Set RadioButton state, true means selected.void
setWidth(int width)
Override TWidget's width: we can only set width at construction time.-
Methods inherited from class jexer.TWidget
activate, activate, activate, activateAll, addButton, addCalendar, addCheckBox, addCheckBox, addComboBox, addDirectoryList, addDirectoryList, addDirectoryList, addDirectoryList, addEditor, addField, addField, addField, addField, addImage, addImage, addLabel, addLabel, addLabel, addLabel, addLabel, addLabel, addList, addList, addList, addList, addPanel, addPasswordField, addPasswordField, addPasswordField, addProgressBar, addRadioGroup, addRadioGroup, addSpinner, addSplitPane, addTable, addTable, addText, addText, addTreeViewWidget, addTreeViewWidget, close, compareTo, doRepaint, drawBox, drawBox, drawBoxShadow, drawChildren, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getApplication, getAttrXY, getChildren, getClipboard, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getHeight, getLayoutManager, getParent, getScreen, getTheme, getWidth, getWindow, getX, getY, handleEvent, hasChild, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEchoKeystrokes, isEnabled, isVisible, messageBox, messageBox, mouseWouldHit, onCommand, onIdle, onMenu, onMouseDoubleClick, onMouseMotion, onMouseUp, onResize, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setDimensions, setEchoKeystrokes, setEchoKeystrokes, setEnabled, setLayoutManager, setParent, setupForTWindow, setVisible, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXY
-
-
-
-
Method Detail
-
onMouseDown
public void onMouseDown(TMouseEvent mouse)
Handle mouse button presses.- Overrides:
onMouseDown
in classTWidget
- Parameters:
mouse
- mouse button press event
-
onKeypress
public void onKeypress(TKeypressEvent keypress)
Handle keystrokes.- Overrides:
onKeypress
in classTWidget
- Parameters:
keypress
- keystroke event
-
setWidth
public void setWidth(int width)
Override TWidget's width: we can only set width at construction time.
-
setHeight
public void setHeight(int height)
Override TWidget's height: we can only set height at construction time.
-
isSelected
public boolean isSelected()
Get RadioButton state, true means selected.- Returns:
- if true then this is the one button in the group that is selected
-
setSelected
public void setSelected(boolean selected)
Set RadioButton state, true means selected.- Parameters:
selected
- if true then this is the one button in the group that is selected
-
getId
public int getId()
Get ID for this radio button. Buttons start counting at 1 in the RadioGroup.- Returns:
- the ID
-
getMnemonic
public MnemonicString getMnemonic()
Get the mnemonic string for this button.- Returns:
- mnemonic string
-
-