public class TText extends TScrollableWidget
| Modifier and Type | Class and Description |
|---|---|
static class |
TText.Justification
Available text justifications.
|
hScroller, vScroller| Constructor and Description |
|---|
TText(TWidget parent,
java.lang.String text,
int x,
int y,
int width,
int height)
Public constructor.
|
TText(TWidget parent,
java.lang.String text,
int x,
int y,
int width,
int height,
java.lang.String colorKey)
Public constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLine(java.lang.String line)
Convenience method used by TWindowLoggerOutput.
|
void |
centerJustify()
Center-justify the text.
|
void |
draw()
Draw the text box.
|
void |
fullJustify()
Fully-justify the text.
|
java.lang.String |
getText()
Get the text.
|
void |
leftJustify()
Left-justify the text.
|
void |
onKeypress(TKeypressEvent keypress)
Handle keystrokes.
|
void |
onMouseDown(TMouseEvent mouse)
Handle mouse press events.
|
void |
reflowData()
Resize text and scrollbars for a new width/height.
|
void |
rightJustify()
Right-justify the text.
|
void |
setHeight(int height)
Override TWidget's height: we need to set child widget heights.
|
void |
setJustification(TText.Justification justification)
Set justification.
|
void |
setText(java.lang.String text)
Set the text.
|
void |
setWidth(int width)
Override TWidget's width: we need to set child widget widths.
|
bigHorizontalDecrement, bigHorizontalIncrement, bigVerticalDecrement, bigVerticalIncrement, getBottomValue, getHorizontalBigChange, getHorizontalScroller, getHorizontalSmallChange, getHorizontalValue, getLeftValue, getRightValue, getTopValue, getVerticalBigChange, getVerticalScroller, getVerticalSmallChange, getVerticalValue, horizontalDecrement, horizontalIncrement, onResize, placeScrollbars, setBottomValue, setHorizontalBigChange, setHorizontalSmallChange, setHorizontalValue, setLeftValue, setRightValue, setTopValue, setVerticalBigChange, setVerticalSmallChange, setVerticalValue, toBottom, toEnd, toHome, toLeft, toRight, toTop, verticalDecrement, verticalIncrementactivate, activate, activate, activateAll, addButton, addCalendar, addCheckBox, addComboBox, addDirectoryList, addDirectoryList, addDirectoryList, addDirectoryList, addEditor, addField, addField, addField, addImage, addImage, addLabel, addLabel, addLabel, addLabel, addLabel, addLabel, addList, addList, addList, addList, addPanel, addPasswordField, addPasswordField, addPasswordField, addProgressBar, addRadioGroup, addSpinner, addSplitPane, addTable, addTable, addText, addText, addTreeViewWidget, addTreeViewWidget, close, compareTo, doRepaint, drawBox, drawBox, drawBoxShadow, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getApplication, getAttrXY, getChildren, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getHeight, getLayoutManager, getParent, getScreen, getTheme, getWidth, getWindow, getX, getY, handleEvent, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEnabled, isVisible, messageBox, messageBox, mouseWouldHit, onCommand, onIdle, onMenu, onMouseDoubleClick, onMouseMotion, onMouseUp, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setDimensions, setEnabled, setLayoutManager, setParent, setupForTWindow, setVisible, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXYpublic TText(TWidget parent, java.lang.String text, int x, int y, int width, int height)
parent - parent widgettext - text on the screenx - column relative to parenty - row relative to parentwidth - width of text areaheight - height of text areapublic TText(TWidget parent, java.lang.String text, int x, int y, int width, int height, java.lang.String colorKey)
parent - parent widgettext - text on the screenx - column relative to parenty - row relative to parentwidth - width of text areaheight - height of text areacolorKey - ColorTheme key color to use for foreground
text. Default is "ttext".public void setWidth(int width)
public void setHeight(int height)
public void onMouseDown(TMouseEvent mouse)
onMouseDown in class TWidgetmouse - mouse button press eventpublic void onKeypress(TKeypressEvent keypress)
onKeypress in class TWidgetkeypress - keystroke eventpublic void reflowData()
reflowData in class TScrollableWidgetpublic void setText(java.lang.String text)
text - new text to displaypublic java.lang.String getText()
public void addLine(java.lang.String line)
line - new line to addpublic void setJustification(TText.Justification justification)
justification - LEFT, CENTER, RIGHT, or FULLpublic void leftJustify()
public void centerJustify()
public void rightJustify()
public void fullJustify()
Copyright © 2019 Kevin Lamonte. Licensed MIT.