Package javaforce.webui.panel
Class TerminalPanel
java.lang.Object
javaforce.webui.Component
javaforce.webui.Container
javaforce.webui.Panel
javaforce.webui.panel.TerminalPanel
-
Nested Class Summary
Nested classes/interfaces inherited from class javaforce.webui.Component
Component.Event -
Field Summary
FieldsFields inherited from class javaforce.webui.Component
ArrayType, attrs, AUTO, backclr, borderclr, BOTTOM, CENTER, classes, client, clr, COLUMN, DRAG_EW, DRAG_MOVE, DRAG_NESW, DRAG_NS, DRAG_NWSE, events, height, HIDDEN, HORIZONTAL, id, LEFT, name, NONE, parent, RIGHT, ROW, SCROLL, styles, TOP, VERTICAL, VISIBLE, width, x, y -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclrscr()booleanconnect()Connect to terminal.voiddelete()voidvoidintintintgetsx()intgetsy()intgetx()intgety()intgety1()intgety2()voidgotoPos(int x, int y) voidinit()Perform any initialization with the client.voidinput(char[] buf, int buflen) voidvoidinsert()static voidvoidvoidonMouseDown(MouseEvent me, Component comp) voidvoidoutput(char[] buf) voidprint(char[] buf) voidprint(char[] buf, int buflen) voidscrollDown(int cnt) voidscrollUp(int cnt) voidsetAutoWrap(boolean state) voidsetBackColor(int newClr) voidsetBlinker(boolean state) voidsetChar(int x, int y, char ch) voidSet Default Size.voidsetForeColor(int newClr) voidsetReverse(boolean state) voidSetup Terminal to execute local command.voidSetup Terminal for connection over SSH.voidSetup Terminal with existing pty.voidsety1(int v) voidsety2(int v) voidvoidwriteArray(byte[] tmp) voidwriteArray(String txt, char[] buf, int off, int buflen) Methods inherited from class javaforce.webui.Panel
addInitedListener, getOverflow, onInited, onLoaded, setOverflowMethods inherited from class javaforce.webui.Container
add, add, count, events, get, get, getAll, getComponent, html, remove, remove, removeAll, set, setClient, setFlexDirectionMethods inherited from class javaforce.webui.Component
action, addActionListener, addAttr, addChangedListener, addClass, addClickListener, addEvent, addKeyDownListener, addKeyDownListenerPreventDefault, addKeyUpListener, addKeyUpListenerPreventDefault, addLoadedListener, addMouseDownListener, addMouseEnterListener, addMouseMoveListener, addMouseUpListener, addMovedListener, addResizedListener, addValidateListener, addVisibleListener, click, decode, dispatchEvent, enableDragging, encode, getAttrs, getBorderColor, getClient, getColor, getEvents, getHeight, getID, getName, getParent, getProperty, getStyle, getTopParent, gettransform, gettransformorigin, getWidth, getX, getY, hasAttr, hasClass, hasSize, hasStyle, initInvisible, isLoaded, isPopup, isVisible, onChanged, onClick, onDrawRect, onDrawRect, onEvent, onKeyDown, onKeyUp, onMouseDown, onMouseEnter, onMouseMove, onMouseUp, onPos, onPosSize, onSize, removeAttr, removeClass, removeStyle, requestPos, requestPosSize, requestSize, sendData, sendEvent, sendOnResize, setAlign, setAutoHeight, setAutoWidth, setBorder, setBorderColor, setBorderGray, setClass, setColor, setDisabled, setFlex, setFocus, setFocusable, setFontSize, setHeight, setMaxHeight, setMaxWidth, setName, setPadding, setPosition, setProperty, setReadonly, setrotate, setscale, setSize, setStyle, settransform, settransformorigin, settransformorigin, settranslate, setVerticalAlign, setVisible, setWidth, toString, validate
-
Field Details
-
debug
public static boolean debug
-
-
Constructor Details
-
TerminalPanel
public TerminalPanel()
-
-
Method Details
-
setup
Setup Terminal to execute local command.- Parameters:
cmd- = command with arguments to execute
-
setup
Setup Terminal with existing pty.- Parameters:
pty- = existing pty interface.
-
setup
Setup Terminal for connection over SSH.- Parameters:
host- = SSH serverport- = SSH port (22)
-
connect
public boolean connect()Connect to terminal. -
init
public void init()Description copied from class:ComponentPerform any initialization with the client. Containers should call init() on all sub-components. -
disconnect
public void disconnect() -
setDefaultSize
public void setDefaultSize()Set Default Size. -
onResized
-
onKeyDown
-
onMouseDown
- Specified by:
onMouseDownin interfaceMouseDown
-
flashCursor
public void flashCursor() -
updateCursor
public void updateCursor() -
input
-
input
public void input(char[] buf, int buflen) -
print
public void print(char[] buf) -
print
public void print(char[] buf, int buflen) -
writeArray
public void writeArray(byte[] tmp) -
writeArray
-
output
public void output(char[] buf) -
getForeColor
public int getForeColor()- Specified by:
getForeColorin interfaceScreen
-
getBackColor
public int getBackColor()- Specified by:
getBackColorin interfaceScreen- Overrides:
getBackColorin classComponent
-
getsx
public int getsx() -
getsy
public int getsy() -
getx
public int getx() -
gety
public int gety() -
gety1
public int gety1() -
gety2
public int gety2() -
sety1
public void sety1(int v) -
sety2
public void sety2(int v) -
scrollUp
public void scrollUp(int cnt) -
scrollDown
public void scrollDown(int cnt) - Specified by:
scrollDownin interfaceScreen
-
delete
public void delete() -
insert
public void insert() -
gotoPos
public void gotoPos(int x, int y) -
setChar
public void setChar(int x, int y, char ch) -
setAutoWrap
public void setAutoWrap(boolean state) - Specified by:
setAutoWrapin interfaceScreen
-
clrscr
public void clrscr() -
setBlinker
public void setBlinker(boolean state) - Specified by:
setBlinkerin interfaceScreen
-
setReverse
public void setReverse(boolean state) - Specified by:
setReversein interfaceScreen
-
setForeColor
public void setForeColor(int newClr) - Specified by:
setForeColorin interfaceScreen
-
setBackColor
public void setBackColor(int newClr) - Specified by:
setBackColorin interfaceScreen- Overrides:
setBackColorin classComponent
-
getTermType
- Specified by:
getTermTypein interfaceScreen
-
main
-