public abstract class CommonCheckBox extends AbstractInteractableComponent
Interactable.FocusChangeDirection, Interactable.Result
Component.Alignment
Constructor and Description |
---|
CommonCheckBox(String label) |
Modifier and Type | Method and Description |
---|---|
protected TerminalSize |
calculatePreferredSize() |
protected abstract char |
getSelectionCharacter() |
abstract boolean |
isSelected() |
Interactable.Result |
keyboardInteraction(Key key)
This method is called when this component has focus and the user has
pressed a key on the keyboard.
|
protected abstract void |
onActivated() |
void |
repaint(TextGraphics graphics)
This is the main 'paint' method for a component, it's called when
lanterna wants the component to re-draw itself.
|
void |
select() |
protected abstract String |
surroundCharacter(char character) |
afterEnteredFocus, afterLeftFocus, getHotspot, hasFocus, onEnterFocus, onLeaveFocus, setHotspot
addBorder, addComponentListener, getAlignment, getComponentListeners, getGUIScreen, getMinimumSize, getParent, getPreferredSize, getWindow, invalidate, isScrollable, 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, isScrollable, isVisible, removeComponentListener, setAlignment, setPreferredSize, setVisible
public CommonCheckBox(String label)
protected TerminalSize calculatePreferredSize()
calculatePreferredSize
in class AbstractComponent
public void repaint(TextGraphics graphics)
Component
graphics
- TextGraphics object to use for drawing the component and
getting information about the drawing contextpublic Interactable.Result keyboardInteraction(Key key)
Interactable
key
- Key pressed on the keyboardpublic abstract boolean isSelected()
protected abstract char getSelectionCharacter()
protected abstract String surroundCharacter(char character)
protected abstract void onActivated()
public void select()
Copyright © 2015. All Rights Reserved.