public class Label extends AbstractComponent
Component.Alignment
Constructor and Description |
---|
Label() |
Label(String text) |
Label(String text,
Boolean textBold) |
Label(String text,
int fixedWidth) |
Label(String text,
int fixedWidth,
Terminal.Color color,
Boolean textBold) |
Label(String text,
Terminal.Color textColor) |
Label(String text,
Terminal.Color textColor,
Boolean textBold) |
Modifier and Type | Method and Description |
---|---|
protected TerminalSize |
calculatePreferredSize() |
String[] |
getLines() |
Theme.Category |
getStyle() |
String |
getText() |
Terminal.Color |
getTextColor() |
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 |
setStyle(Theme.Category style) |
void |
setText(String text) |
void |
setTextColor(Terminal.Color textColor) |
addBorder, addComponentListener, getAlignment, getComponentListeners, getGUIScreen, getMinimumSize, getParent, getPreferredSize, getWindow, invalidate, isScrollable, isVisible, removeComponentListener, setAlignment, setParent, setPreferredSize, setVisible, transformAccordingToAlignment
public Label()
public Label(String text)
public Label(String text, Terminal.Color textColor)
public Label(String text, Terminal.Color textColor, Boolean textBold)
public Label(String text, int fixedWidth)
public Label(String text, int fixedWidth, Terminal.Color color, Boolean textBold)
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 void setText(String text)
public String getText()
public String[] getLines()
public void setStyle(Theme.Category style)
public Theme.Category getStyle()
public Terminal.Color getTextColor()
public void setTextColor(Terminal.Color textColor)
Copyright © 2015. All Rights Reserved.