Package app.ui.widgets
Class WidgetLabel
java.lang.Object
app.ui.widgets.Widget
app.ui.widgets.WidgetLabel
- All Implemented Interfaces:
IDrawable
WidgetLabel is a UI widget that represents a label. It extends the Widget class.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionWidgetLabel(int x, int y, int len, String text) Constructs a WidgetLabel with specified position, length, and text.WidgetLabel(int x, int y, int len, String text, TEXT_ALIGNMENT textAlignment) Constructs a WidgetLabel with specified position, length, text, and text alignment. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(char[][] buffer, com.googlecode.lanterna.TextColor[][] printColor, com.googlecode.lanterna.TextColor[][] backColor) Draws the label on the given buffer with specified colors.Methods inherited from class app.ui.widgets.Widget
drawText, getLen, getSelected, getSkipSelection, getText, getWidgetID, getX, getY, isHide, setHide, setSkipSelection, setText, setWidgetID
-
Constructor Details
-
WidgetLabel
Constructs a WidgetLabel with specified position, length, and text.- Parameters:
x- The x-coordinate of the label.y- The y-coordinate of the label.len- The length of the label.text- The text displayed on the label.
-
WidgetLabel
Constructs a WidgetLabel with specified position, length, text, and text alignment.- Parameters:
x- The x-coordinate of the label.y- The y-coordinate of the label.len- The length of the label.text- The text displayed on the label.textAlignment- The text alignment of the label.
-
-
Method Details
-
draw
public void draw(char[][] buffer, com.googlecode.lanterna.TextColor[][] printColor, com.googlecode.lanterna.TextColor[][] backColor) Draws the label on the given buffer with specified colors.
-