public class EditArea extends AbstractInteractableComponent
Interactable.FocusChangeDirection, Interactable.Result
Component.Alignment
Constructor and Description |
---|
EditArea() |
EditArea(TerminalSize preferredSize) |
EditArea(TerminalSize preferredSize,
String text) |
EditArea(TerminalSize preferredSize,
String text,
boolean lockPreferredSize) |
Modifier and Type | Method and Description |
---|---|
void |
backspace()
Action for "Backspace" key
|
protected TerminalSize |
calculatePreferredSize() |
void |
delete()
Action for "Del" key.
|
protected void |
drawDisplay(TextGraphics g) |
void |
fix_issue() |
String |
getData() |
TerminalSize |
getDataSize() |
Interactable.Result |
keyboardInteraction(Key key)
This method is called when this component has focus and the user has
pressed a key on the keyboard.
|
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 |
scrollLeft()
Scroll left all text in the area.
|
void |
scrollRight()
Scroll right all text in the area.
|
void |
setCharacterLimit(int limit)
Set the line limit.
|
void |
setData(String data)
Change all the text in the area.
|
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 EditArea()
public EditArea(TerminalSize preferredSize)
public EditArea(TerminalSize preferredSize, String text)
public EditArea(TerminalSize preferredSize, String text, boolean lockPreferredSize)
public void backspace()
protected TerminalSize calculatePreferredSize()
calculatePreferredSize
in class AbstractComponent
public void delete()
protected void drawDisplay(TextGraphics g)
public void fix_issue()
public String getData()
public TerminalSize getDataSize()
public Interactable.Result keyboardInteraction(Key key)
Interactable
key
- Key pressed on the keyboardpublic void repaint(TextGraphics graphics)
Component
graphics
- TextGraphics object to use for drawing the component and
getting information about the drawing contextpublic void scrollLeft()
public void scrollRight()
public void setCharacterLimit(int limit)
public void setData(String data)
Copyright © 2015. All Rights Reserved.