public class Terminal extends Object implements TerminalWindowListener
Constructor and Description |
---|
Terminal(EditorActiveTerminalSession session,
HostSessionProps props)
Constructor for a remote session to a server.
|
Terminal(HostSession hostSession,
EditorTerminalProps terminalProps)
Creates a new terminal session for a local connection inside the Designer.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(ITerminalListener listener)
Adds a terminal listener.
|
void |
clear()
Clears the entire screen.
|
void |
createTerminal(Canvas canvas,
TerminalStatusBar statusBar,
IScreenDesigner designer)
Creates an instance of the terminal window.
|
void |
dispose()
Disposes of the instance.
|
int[] |
getAttributes()
Gets the attributes for direct manipulation of underlines.
|
int |
getCursorX()
Gets the cursor X.
|
int |
getCursorY()
Gets the cursor X.
|
HostSession |
getHostSession()
Gets the HostSession.
|
boolean |
getInsertMode()
Gets the insert mode.
|
Rectangle[] |
getMarks()
Gets the rectangle presently marked.
|
TerminalSettings |
getSettings()
Gets the Settings container.
|
TerminalWindow |
getTerminalWindow()
Gets the AWT TerminalWindow container.
|
boolean |
hasMark()
Checks if a rectangle is presently marked.
|
boolean |
inInsertMode()
The insert mode can be read using this method.
|
boolean |
isDisconnected()
Checks if disconnected, used e.g.
|
boolean |
isLocked()
Checks if the terminal session is locked.
|
boolean |
isMarkAllowed()
Checks if marking is allowed, i.e.
|
boolean |
onActivateMenu(boolean isPopup)
Handles display of the pop-up window or activation of the menu bar.
|
void |
onMarkChange()
Called when the mark changes.
|
boolean |
onPopup(int x,
int y)
Handles display of the pop-up window.
|
void |
removeListener(ITerminalListener listener)
Removes a terminal listener.
|
void |
removeMarks()
Removes the rectangle mark.
|
void |
selectAll()
Selects all in terminal window.
|
void |
sendCharacter(char ch)
Sends a character string to the terminal.
|
void |
sendHostKey(int key)
Sends a host key to the host.
|
void |
sendKey(HostKeyEvent e)
Sends a key to the terminal.
|
boolean |
setCursor(int x,
int y)
Sets the cursor position to X/Y.
|
void |
soundAlarm(boolean isHostAlarm)
Sounds the Alarm.
|
void |
switchProperties(HostSession hostSession,
EditorTerminalProps terminalProps)
Switches properties.
|
void |
updateCursor(int x,
int y)
The cursor position has changed from Local terminal.
|
void |
updateScreenData(int begin,
int end)
The screen has changed between two points in a wrapping fashion.
|
void |
updateScreenSize()
Sets the screen size from Local terminal.
|
public Terminal(EditorActiveTerminalSession session, HostSessionProps props)
public Terminal(HostSession hostSession, EditorTerminalProps terminalProps)
public void addListener(ITerminalListener listener)
public void removeListener(ITerminalListener listener)
public void switchProperties(HostSession hostSession, EditorTerminalProps terminalProps)
public HostSession getHostSession()
public TerminalSettings getSettings()
public void createTerminal(Canvas canvas, TerminalStatusBar statusBar, IScreenDesigner designer)
public boolean onActivateMenu(boolean isPopup)
onActivateMenu
in interface TerminalWindowListener
isPopup
- Flag indicating it's a pop-up that should be activated, as opposed
to the menu bar.public boolean onPopup(int x, int y)
onPopup
in interface TerminalWindowListener
x
- The mouse position in X relative the terminal container.y
- The mouse position in Y relative the terminal container.public void clear()
public void sendKey(HostKeyEvent e)
sendKey
in interface TerminalWindowListener
e
- The Host Key Event.public void sendHostKey(int key)
sendHostKey
in interface TerminalWindowListener
key
- The key to send.public void sendCharacter(char ch)
sendCharacter
in interface TerminalWindowListener
ch
- The character to send.public boolean setCursor(int x, int y)
setCursor
in interface TerminalWindowListener
x
- The X position.y
- The Y position.public boolean isLocked()
isLocked
in interface TerminalWindowListener
public boolean inInsertMode()
inInsertMode
in interface TerminalWindowListener
public void soundAlarm(boolean isHostAlarm)
public void updateScreenData(int begin, int end)
begin
- The beginning position.end
- The end position (inclusive).public void updateScreenSize()
public void updateCursor(int x, int y)
public void dispose()
public boolean hasMark()
public Rectangle[] getMarks()
public void removeMarks()
public boolean isDisconnected()
isDisconnected
in interface TerminalWindowListener
public void selectAll()
public void onMarkChange()
onMarkChange
in interface TerminalWindowListener
public TerminalWindow getTerminalWindow()
public boolean isMarkAllowed()
isMarkAllowed
in interface TerminalWindowListener
public int getCursorX()
public int getCursorY()
public boolean getInsertMode()
public int[] getAttributes()
iizi® is a registered trademark of Mindus SARL. © Copyright 2019 Mindus SARL. All rights reserved.