Package jexer
Class TLabel
- java.lang.Object
-
- jexer.TWidget
-
- jexer.TLabel
-
-
Constructor Summary
Constructors Constructor Description TLabel(TWidget parent, java.lang.String text, int x, int y)Public constructor, using the default "tlabel" for colorKey.TLabel(TWidget parent, java.lang.String text, int x, int y, java.lang.String colorKey)Public constructor.TLabel(TWidget parent, java.lang.String text, int x, int y, java.lang.String colorKey, boolean useWindowBackground)Public constructor.TLabel(TWidget parent, java.lang.String text, int x, int y, java.lang.String colorKey, boolean useWindowBackground, TAction action)Public constructor.TLabel(TWidget parent, java.lang.String text, int x, int y, java.lang.String colorKey, TAction action)Public constructor.TLabel(TWidget parent, java.lang.String text, int x, int y, TAction action)Public constructor, using the default "tlabel" for colorKey.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispatch()Act as though the mnemonic shortcut was pressed.voiddraw()Draw a static label.java.lang.StringgetColorKey()Get the label color.java.lang.StringgetLabel()Get label raw text.MnemonicStringgetMnemonic()Get the mnemonic string for this label.voidsetColorKey(java.lang.String colorKey)Set the label color.voidsetHeight(int height)Override TWidget's height: we can only set height at construction time.voidsetLabel(java.lang.String label)Set label text.voidsetWidth(int width)Override TWidget's width: we can only set width at construction time.-
Methods inherited from class jexer.TWidget
activate, activate, activate, activateAll, addButton, addCalendar, addCheckBox, addCheckBox, addComboBox, addDirectoryList, addDirectoryList, addDirectoryList, addDirectoryList, addEditor, addField, addField, addField, addField, addImage, addImage, addImage, addImage, addLabel, addLabel, addLabel, addLabel, addLabel, addLabel, addList, addList, addList, addList, addPanel, addPasswordField, addPasswordField, addPasswordField, addProgressBar, addRadioGroup, addRadioGroup, addSpinner, addSplitPane, addTable, addTable, addText, addText, addTreeViewWidget, addTreeViewWidget, close, compareTo, doRepaint, drawBox, drawBox, drawBoxShadow, drawChildren, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getApplication, getAttrXY, getChildren, getClipboard, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getCustomMousePointer, getHeight, getLayoutManager, getLocale, getMouseStyle, getParent, getScreen, getTheme, getWidgetUnderMouse, getWidth, getWindow, getX, getY, handleEvent, hasChild, hLineXY, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEchoKeystrokes, isEnabled, isPixelMouse, isVisible, messageBox, messageBox, mouseWouldHit, onCommand, onIdle, onKeypress, onMenu, onMouseDoubleClick, onMouseDown, onMouseMotion, onMouseUp, onResize, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setCustomMousePointer, setDimensions, setEchoKeystrokes, setEchoKeystrokes, setEnabled, setLayoutManager, setLocale, setMouseStyle, setParent, setupForTWindow, setVisible, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXY, vLineXY
-
-
-
-
Constructor Detail
-
TLabel
public TLabel(TWidget parent, java.lang.String text, int x, int y)
Public constructor, using the default "tlabel" for colorKey.- Parameters:
parent- parent widgettext- label on the screenx- column relative to parenty- row relative to parent
-
TLabel
public TLabel(TWidget parent, java.lang.String text, int x, int y, TAction action)
Public constructor, using the default "tlabel" for colorKey.- Parameters:
parent- parent widgettext- label on the screenx- column relative to parenty- row relative to parentaction- to call when shortcut is pressed
-
TLabel
public TLabel(TWidget parent, java.lang.String text, int x, int y, java.lang.String colorKey)
Public constructor.- Parameters:
parent- parent widgettext- label on the screenx- column relative to parenty- row relative to parentcolorKey- ColorTheme key color to use for foreground text
-
TLabel
public TLabel(TWidget parent, java.lang.String text, int x, int y, java.lang.String colorKey, TAction action)
Public constructor.- Parameters:
parent- parent widgettext- label on the screenx- column relative to parenty- row relative to parentcolorKey- ColorTheme key color to use for foreground textaction- to call when shortcut is pressed
-
TLabel
public TLabel(TWidget parent, java.lang.String text, int x, int y, java.lang.String colorKey, boolean useWindowBackground)
Public constructor.- Parameters:
parent- parent widgettext- label on the screenx- column relative to parenty- row relative to parentcolorKey- ColorTheme key color to use for foreground textuseWindowBackground- if true, use the window's background color
-
TLabel
public TLabel(TWidget parent, java.lang.String text, int x, int y, java.lang.String colorKey, boolean useWindowBackground, TAction action)
Public constructor.- Parameters:
parent- parent widgettext- label on the screenx- column relative to parenty- row relative to parentcolorKey- ColorTheme key color to use for foreground textuseWindowBackground- if true, use the window's background coloraction- to call when shortcut is pressed
-
-
Method Detail
-
setWidth
public void setWidth(int width)
Override TWidget's width: we can only set width at construction time.
-
setHeight
public void setHeight(int height)
Override TWidget's height: we can only set height at construction time.
-
getLabel
public java.lang.String getLabel()
Get label raw text.- Returns:
- label text
-
getMnemonic
public MnemonicString getMnemonic()
Get the mnemonic string for this label.- Returns:
- mnemonic string
-
setLabel
public void setLabel(java.lang.String label)
Set label text.- Parameters:
label- new label text
-
getColorKey
public java.lang.String getColorKey()
Get the label color.- Returns:
- the ColorTheme key color to use for foreground text
-
setColorKey
public void setColorKey(java.lang.String colorKey)
Set the label color.- Parameters:
colorKey- ColorTheme key color to use for foreground text
-
dispatch
public void dispatch()
Act as though the mnemonic shortcut was pressed.
-
-