public class TTerminalWidget extends TScrollableWidget implements DisplayListener
hScroller, vScroller
Constructor and Description |
---|
TTerminalWidget(TWidget parent,
int x,
int y)
Public constructor spawns a shell.
|
TTerminalWidget(TWidget parent,
int x,
int y,
int width,
int height,
java.lang.String[] command,
TAction closeAction)
Public constructor spawns a custom command line.
|
TTerminalWidget(TWidget parent,
int x,
int y,
int width,
int height,
TAction closeAction)
Public constructor spawns a shell.
|
TTerminalWidget(TWidget parent,
int x,
int y,
java.lang.String commandLine)
Public constructor spawns a custom command line.
|
TTerminalWidget(TWidget parent,
int x,
int y,
java.lang.String[] command)
Public constructor spawns a custom command line.
|
TTerminalWidget(TWidget parent,
int x,
int y,
java.lang.String[] command,
TAction closeAction)
Public constructor spawns a custom command line.
|
TTerminalWidget(TWidget parent,
int x,
int y,
TAction closeAction)
Public constructor spawns a shell.
|
Modifier and Type | Method and Description |
---|---|
void |
bigVerticalDecrement()
Perform a big step change up.
|
void |
bigVerticalIncrement()
Perform a big step change down.
|
void |
close()
Handle widget close.
|
void |
displayChanged()
Called by emulator when fresh data has come in.
|
void |
draw()
Draw the display buffer.
|
int |
getDisplayHeight()
Function to call to obtain the display height.
|
int |
getDisplayWidth()
Function to call to obtain the display width.
|
java.lang.String |
getTitle()
Get the desired window title.
|
boolean |
hasHiddenMouse()
Returns true if this widget does not want the application-wide mouse
cursor drawn over it.
|
boolean |
isReading()
See if the terminal is still running.
|
void |
onKeypress(TKeypressEvent keypress)
Handle keystrokes.
|
void |
onMouseDown(TMouseEvent mouse)
Handle mouse press events.
|
void |
onMouseMotion(TMouseEvent mouse)
Handle mouse motion events.
|
void |
onMouseUp(TMouseEvent mouse)
Handle mouse release events.
|
void |
onResize(TResizeEvent resize)
Handle window/screen resize events.
|
void |
onShellExit()
Hook for subclasses to be notified of the shell termination.
|
void |
reflowData()
Resize scrollbars for a new width/height.
|
void |
setVerticalValue(int value)
Set current value of the vertical scroll.
|
void |
toBottom()
Go to the bottom edge of the vertical scroller.
|
void |
toTop()
Go to the top edge of the vertical scroller.
|
void |
verticalDecrement()
Perform a small step change up.
|
void |
verticalIncrement()
Perform a small step change down.
|
bigHorizontalDecrement, bigHorizontalIncrement, getBottomValue, getHorizontalBigChange, getHorizontalScroller, getHorizontalSmallChange, getHorizontalValue, getLeftValue, getRightValue, getTopValue, getVerticalBigChange, getVerticalScroller, getVerticalSmallChange, getVerticalValue, horizontalDecrement, horizontalIncrement, placeScrollbars, setBottomValue, setHorizontalBigChange, setHorizontalSmallChange, setHorizontalValue, setLeftValue, setRightValue, setTopValue, setVerticalBigChange, setVerticalSmallChange, toEnd, toHome, toLeft, toRight
activate, 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, 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, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setDimensions, setEnabled, setHeight, setLayoutManager, setParent, setupForTWindow, setVisible, setWidth, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXY
public TTerminalWidget(TWidget parent, int x, int y, java.lang.String commandLine)
parent
- parent widgetx
- column relative to parenty
- row relative to parentcommandLine
- the command line to executepublic TTerminalWidget(TWidget parent, int x, int y, java.lang.String[] command)
parent
- parent widgetx
- column relative to parenty
- row relative to parentcommand
- the command line to executepublic TTerminalWidget(TWidget parent, int x, int y, java.lang.String[] command, TAction closeAction)
parent
- parent widgetx
- column relative to parenty
- row relative to parentcommand
- the command line to executecloseAction
- action to perform when the shell sxitspublic TTerminalWidget(TWidget parent, int x, int y, int width, int height, java.lang.String[] command, TAction closeAction)
parent
- parent widgetx
- column relative to parenty
- row relative to parentwidth
- width of widgetheight
- height of widgetcommand
- the command line to executecloseAction
- action to perform when the shell sxitspublic TTerminalWidget(TWidget parent, int x, int y)
parent
- parent widgetx
- column relative to parenty
- row relative to parentpublic TTerminalWidget(TWidget parent, int x, int y, TAction closeAction)
parent
- parent widgetx
- column relative to parenty
- row relative to parentcloseAction
- action to perform when the shell sxitspublic TTerminalWidget(TWidget parent, int x, int y, int width, int height, TAction closeAction)
parent
- parent widgetx
- column relative to parenty
- row relative to parentwidth
- width of widgetheight
- height of widgetcloseAction
- action to perform when the shell sxitspublic void onResize(TResizeEvent resize)
onResize
in class TScrollableWidget
resize
- resize eventpublic void onKeypress(TKeypressEvent keypress)
onKeypress
in class TWidget
keypress
- keystroke eventpublic void onMouseDown(TMouseEvent mouse)
onMouseDown
in class TWidget
mouse
- mouse button press eventpublic void onMouseUp(TMouseEvent mouse)
public void onMouseMotion(TMouseEvent mouse)
onMouseMotion
in class TWidget
mouse
- mouse motion eventpublic void setVerticalValue(int value)
setVerticalValue
in interface Scrollable
setVerticalValue
in class TScrollableWidget
value
- the new scroll valuepublic void verticalDecrement()
verticalDecrement
in interface Scrollable
verticalDecrement
in class TScrollableWidget
public void verticalIncrement()
verticalIncrement
in interface Scrollable
verticalIncrement
in class TScrollableWidget
public void bigVerticalDecrement()
bigVerticalDecrement
in interface Scrollable
bigVerticalDecrement
in class TScrollableWidget
public void bigVerticalIncrement()
bigVerticalIncrement
in interface Scrollable
bigVerticalIncrement
in class TScrollableWidget
public void toTop()
toTop
in interface Scrollable
toTop
in class TScrollableWidget
public void toBottom()
toBottom
in interface Scrollable
toBottom
in class TScrollableWidget
public void reflowData()
reflowData
in class TScrollableWidget
public java.lang.String getTitle()
public boolean hasHiddenMouse()
public boolean isReading()
public void onShellExit()
public void displayChanged()
displayChanged
in interface DisplayListener
public int getDisplayWidth()
getDisplayWidth
in interface DisplayListener
public int getDisplayHeight()
getDisplayHeight
in interface DisplayListener
Copyright © 2019 Kevin Lamonte. Licensed MIT.