public class terminal
extends java.lang.Object
Constructor and Description |
---|
terminal()
Creates a tn3270 terminal without associating it
with any pw3270 window.
|
terminal(java.lang.String id)
Creates a tn3270 terminal associated with a
pw3270 window.
|
Modifier and Type | Method and Description |
---|---|
int |
action(java.lang.String name)
Launch a lib3270 action by name.
|
int |
cmp_string_at(int row,
int col,
java.lang.String text)
Compare terminal contents.
|
int |
connect(java.lang.String host,
int seconds)
Connect to 3270 host.
|
int |
disconnect()
Disconnect from host.
|
int |
enter()
Send an "ENTER" action.
|
int |
erase_eof()
Erase from cursor position until the end of the field.
|
int |
erase_eol() |
int |
erase_input() |
int |
erase() |
java.lang.String |
file_chooser_dialog(int action,
java.lang.String title,
java.lang.String extension,
java.lang.String filename)
File selection dialog.
|
protected void |
finalize() |
java.lang.String |
get_clipboard() |
java.lang.String |
get_copy() |
int |
get_cursor_addr()
Get cursor offset
|
java.lang.String |
get_encoding()
Get the current lib3270 encoding.
|
int |
get_field_len()
Get the current field length.
|
int |
get_field_len(int baddr)
Get the field length.
|
int |
get_field_start()
Get the current field start address.
|
int |
get_field_start(int baddr)
Get the field start address.
|
int |
get_is_protected_at(int row,
int col)
Check if the address is protected.
|
int |
get_is_protected(int baddr)
Check if the address is protected.
|
int |
get_next_unprotected()
Get next field address.
|
int |
get_next_unprotected(int baddr)
Get next field address.
|
java.lang.String |
get_revision()
Get the current lib3270 revision.
|
int |
get_secure()
Get connection SSL state
|
java.lang.String |
get_string_at(int row,
int col,
int sz)
Get terminal contents starting at row, col.
|
java.lang.String |
get_string(int baddr,
int len)
Get terminal contents starting at desired address.
|
java.lang.String |
get_version()
Get the current lib3270 version.
|
int |
input_string(java.lang.String str) |
boolean |
is_connected() |
boolean |
is_ready() |
void |
log(java.lang.String msg) |
int |
pakey(int key)
Send a pakey to host.
|
int |
pfkey(int key)
Send a pfkey to host.
|
int |
popup_dialog(int id,
java.lang.String title,
java.lang.String message,
java.lang.String secondary)
Open popup dialog.
|
int |
print()
Open print dialog.
|
int |
quit()
quit remote pw3270 window.
|
int |
set_clipboard(java.lang.String text) |
int |
set_copy(java.lang.String text) |
int |
set_cursor_addr(int addr)
Set cursor offset in the terminal buffer.
|
int |
set_cursor_position(int row,
int col)
Move cursor to selected position.
|
int |
set_string_at(int row,
int col,
java.lang.String str)
Set terminal contents at position.
|
java.lang.String |
toString()
Get Screen contents.
|
int |
wait_for_ready(int seconds)
Wait for terminal negociation.
|
int |
wait_for_string_at(int row,
int col,
java.lang.String text,
int seconds)
Wait for text at defined position
|
int |
wait(int seconds)
Wait for an specified amount of time.
|
public terminal()
public terminal(java.lang.String id)
id
- String identifying the target window ("pw3270:a") or "" to run without window.public int wait(int seconds)
Wait for the specified time keeping the main loop active.
seconds
- Number of seconds to wait.public int wait_for_ready(int seconds)
Wait on a loop until the terminal contents are ready for reading.
seconds
- Maximum time (in seconds) to wait for.public int wait_for_string_at(int row, int col, java.lang.String text, int seconds)
row
- Row for text to compare.col
- Column for text to compare.text
- String to compare.seconds
- Maximum time (in seconds) to wait for.public java.lang.String get_version()
public java.lang.String get_revision()
public java.lang.String get_encoding()
public java.lang.String get_string(int baddr, int len)
baddr
- Address of the beginning of the string.len
- Length of the string.public java.lang.String get_string_at(int row, int col, int sz)
row
- Row of the text.col
- Column of the text.sz
- Size to read.public int set_string_at(int row, int col, java.lang.String str)
row
- Row for starting of change.col
- Column for starting of change.str
- Text to set.public int cmp_string_at(int row, int col, java.lang.String text)
row
- Row for text to compare.col
- Column for text to compare.text
- String to compare.public int input_string(java.lang.String str)
public int set_cursor_position(int row, int col)
row
- Row of the new cursor position.col
- Column of the new cursor position.public int set_cursor_addr(int addr)
addr
- New cursor offset.public int get_cursor_addr()
public int enter()
public int pfkey(int key)
key
- PFkey number.public int pakey(int key)
key
- PFkey number.public int quit()
Only valid if connected to a remote window
public int erase()
public int erase_eol()
public int erase_input()
public int erase_eof()
public int print()
Only valid if connected to a remote window
public int connect(java.lang.String host, int seconds)
Connect to the 3270 host
URI formats:
host
- Host URI.seconds
- How many seconds to wait for a connection.public int disconnect()
public int get_field_start(int baddr)
baddr
- address of the field.public int get_field_start()
public int get_field_len(int baddr)
baddr
- Address of the field.public int get_field_len()
public int get_next_unprotected(int baddr)
baddr
- Field address.public int get_is_protected(int baddr)
baddr
- Field address.public int get_is_protected_at(int row, int col)
row
- Screen row.col
- Screen col.public int get_next_unprotected()
public int popup_dialog(int id, java.lang.String title, java.lang.String message, java.lang.String secondary)
id
- Dialog type.title
- Window title.message
- Dialog message.secondary
- Dialog secondary text.public int action(java.lang.String name)
name
- Name of the action to fire.public java.lang.String file_chooser_dialog(int action, java.lang.String title, java.lang.String extension, java.lang.String filename)
action
- Dialog action.title
- Window title.extension
- File extension.filename
- Default file name;public int set_copy(java.lang.String text)
public java.lang.String get_copy()
public java.lang.String get_clipboard()
public int set_clipboard(java.lang.String text)
public boolean is_connected()
public boolean is_ready()
public void log(java.lang.String msg)
public java.lang.String toString()
toString
in class java.lang.Object
public int get_secure()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable