public class EditArea extends AbstractInteractableComponent
Interactable.FocusChangeDirection, Interactable.ResultComponent.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, setHotspotaddBorder, addComponentListener, getAlignment, getComponentListeners, getGUIScreen, getMinimumSize, getParent, getPreferredSize, getWindow, invalidate, isScrollable, isVisible, removeComponentListener, setAlignment, setParent, setPreferredSize, setVisible, transformAccordingToAlignmentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBorder, addComponentListener, getAlignment, getMinimumSize, getParent, getPreferredSize, getWindow, isScrollable, isVisible, removeComponentListener, setAlignment, setPreferredSize, setVisiblepublic 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 AbstractComponentpublic void delete()
protected void drawDisplay(TextGraphics g)
public void fix_issue()
public String getData()
public TerminalSize getDataSize()
public Interactable.Result keyboardInteraction(Key key)
Interactablekey - Key pressed on the keyboardpublic void repaint(TextGraphics graphics)
Componentgraphics - 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.