public class Screen5250 extends Object
| Modifier and Type | Field and Description |
|---|---|
boolean |
cursorActive |
boolean |
cursorShown |
int |
homePos |
protected ScreenPlanes |
planes |
| Constructor and Description |
|---|
Screen5250() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addField(int attr,
int len,
int ffw1,
int ffw2,
int fcw1,
int fcw2)
Add a field to the field format table.
|
void |
addScreenListener(ScreenListener listener)
Add a ScreenListener to the listener list.
|
protected void |
advancePos()
Change the screen position by one column
|
protected void |
changePos(int i)
Change position of the screen by the increment of parameter passed.
|
boolean |
checkHotSpots() |
protected void |
clearAll()
This routine clears the screen, resets row and column to 0, resets the
last attribute to 32, clears the fields, turns insert mode off,
clears/initializes the screen character array.
|
protected void |
clearGuiStuff()
Clear the gui constructs
|
protected void |
clearScreen()
Clear the screen by setting the initial character and initial attribute
to all the positions on the screen
|
protected void |
clearTable()
Clear the fields table
|
String |
copyText(Rect area)
Copy and Paste support
|
String |
copyTextField(int position)
Copy and Paste support
|
protected void |
createScrollBar(int flag,
int totalRowScrollable,
int totalColScrollable,
int sliderRowPos,
int sliderColPos,
int sbSize)
Creates a scroll bar on the screen using the parameters provided.
** we only support vertical scroll bars at the time.
|
protected void |
createWindow(int depth,
int width,
int type,
boolean gui,
int monoAttr,
int colorAttr,
int ul,
int upper,
int ur,
int left,
int right,
int ll,
int bottom,
int lr) |
protected void |
drawField(ScreenField screenField)
Draws the field on the screen.
|
protected void |
drawFields()
Redraw the fields on the screen.
|
void |
dumpScreen() |
boolean[] |
getActiveAidKeys() |
char[] |
getCharacters() |
int |
getCol(int pos) |
int |
getColumns()
Get the number of columns available.
|
int |
getCurrentCol()
Get the current column where the cursor is
|
int |
getCurrentPos()
Current position is based on offsets of 1,1 not 0,0 of the current
position of the screen
|
int |
getCurrentRow()
Get the current row where the cursor is
|
char[] |
getData(int startRow,
int startCol,
int endRow,
int endCol,
int plane) |
String |
getDumpScreen() |
protected int |
getErrorLine()
Returns the current error line number
|
StringBuffer |
getHSBottom()
Hotspot Bottom string
|
StringBuffer |
getHSMore()
Hotspot More... string
|
String |
getKeys() |
protected int |
getLastPos()
The last position of the cursor on the screen - Note - position is based
0,0
|
ScreenOIA |
getOIA() |
protected ScreenPlanes |
getPlanes() |
int |
getPos(int row,
int col)
This routine is 0 based offset.
|
int |
getRow(int pos) |
int |
getRows()
Get the number or rows available.
|
int |
GetScreen(char[] buffer,
int bufferLength,
int plane)
GetScreen retrieves the various planes associated with the presentation
space.
|
int |
GetScreen(char[] buffer,
int bufferLength,
int from,
int length,
int plane)
GetScreen retrieves the various planes associated with the presentation
space.
|
int |
GetScreen(char[] buffer,
int bufferLength,
int row,
int col,
int length,
int plane)
GetScreen retrieves the various planes associated with the presentation
space.
|
char[] |
getScreenAsAllChars()
Return the whole screen represented as a character array
|
char[] |
getScreenAsChars()
Return the screen represented as a character array
|
ScreenFields |
getScreenFields()
Return the fields that are contained in the Field Format Table
|
int |
getScreenLength()
Gets the length of the screen - number of rows times number of columns
|
int |
GetScreenRect(char[] buffer,
int bufferLength,
int startPos,
int endPos,
int plane)
GetScreenRect retrieves data from the various planes associated with the
presentation space.
|
int |
GetScreenRect(char[] buffer,
int bufferLength,
int startRow,
int startCol,
int endRow,
int endCol,
int plane)
GetScreenRect retrieves data from the various planes associated with the
presentation space.
|
protected void |
goHome() |
protected void |
goto_XY(int pos) |
boolean |
gotoField(int f)
Set the current working field to the field number specified.
|
protected boolean |
gotoField(ScreenField screenField)
Convenience method to set the field object passed as the currect working
screen field
|
boolean |
isCursorActive() |
boolean |
isCursorShown() |
protected boolean |
isInField()
Convinience class to return if the cursor is in a field or not.
|
boolean |
isInField(int pos)
Convinience class to return if the position that is passed is in a field
or not.
|
boolean |
isInField(int pos,
boolean chgToField)
Convinience class to return if the position that is passed is in a field
or not.
|
boolean |
isInField(int row,
int col)
Convinience class to return if the position at row and column that is
passed is in a field or not.
|
boolean |
isInField(int row,
int col,
boolean chgToField)
Convinience class to return if the position at row and column that is
passed is in a field or not.
|
protected boolean |
isStatusErrorCode() |
boolean |
isUsingGuiInterface() |
boolean |
moveCursor(int pos)
This will move the screen cursor based on the mouse event.
|
void |
pasteText(String content,
boolean special)
Copy and Paste support
|
void |
removeScreenListener(ScreenListener listener)
Remove a ScreenListener from the listener list.
|
void |
repaintScreen()
Utility method to share the repaint behaviour between setBounds() and
updateScreen.
|
protected void |
resetError()
Restores the error line and sets the error mode off.
|
protected void |
restoreErrorLine()
Restores the error line characters from the save buffer.
|
protected void |
restoreScreen() |
protected void |
rollScreen(int direction,
int topLine,
int bottomLine)
Roll the screen up or down.
|
protected void |
saveErrorLine()
Saves off the current error line characters to be used later.
|
void |
sendAid(int aidKey)
The sendAid method sends an "aid" keystroke to the virtual screen.
|
void |
sendKeys(KeyMnemonic keyMnemonic) |
void |
sendKeys(String text)
The sendKeys method sends a string of keys to the virtual screen.
|
protected void |
setAttr(int cByte) |
void |
setBackspaceError(boolean onError) |
protected void |
setChar(int cByte) |
void |
setCursor(int row,
int col)
This routine is based on offset 1,1 not 0,0 it will translate to offset
0,0 and call the goto_XY(int pos) it is mostly used from external classes
that use the 1,1 offset
|
void |
setCursorActive(boolean activate)
Activate the cursor on screen
|
void |
setCursorOff() |
void |
setCursorOn() |
protected void |
setDirty(int pos) |
protected void |
setEndingAttr(int cByte) |
protected void |
setErrorLine(int line)
Set the error line number to that of number passed.
|
protected void |
setFieldHighlighted(ScreenField sf)
Set the field to be displayed as highlighted.
|
protected void |
setPendingInsert(boolean flag) |
protected void |
setPendingInsert(boolean flag,
int icX,
int icY) |
protected void |
setPrehelpState(boolean setErrorCode,
boolean lockKeyboard,
boolean unlockIfLocked) |
void |
setResetRequired(boolean reset) |
protected void |
setRowsCols(int rows,
int cols) |
protected void |
setScreenCharAndAttr(char right,
int colorAttr,
boolean isAttr) |
protected void |
setScreenCharAndAttr(char right,
int colorAttr,
int whichGui,
boolean isAttr) |
protected void |
setScreenData(String text,
int location) |
protected void |
setStatus(byte attr,
byte value,
String s) |
void |
setUseGUIInterface(boolean gui) |
void |
setVT(tnvt v) |
protected boolean |
simulateKeyStroke(char c) |
protected boolean |
simulateMnemonic(int mnem) |
Vector<Double> |
sumThem(boolean formatOption,
Rect area) |
void |
toggleGUIInterface() |
protected void |
unsetFieldHighlighted(ScreenField sf)
Draw the field as un higlighted.
|
protected void |
updateDirty()
Draw or redraw the dirty parts of the screen and display them.
|
void |
updateScreen()
This method does a complete refresh of the screen.
|
protected void |
writeWindowTitle(int pos,
int depth,
int width,
byte orientation,
int monoAttr,
int colorAttr,
StringBuffer title) |
public boolean cursorActive
public boolean cursorShown
public int homePos
protected ScreenPlanes planes
protected ScreenPlanes getPlanes()
public final ScreenOIA getOIA()
protected final void setRowsCols(int rows,
int cols)
public boolean isCursorActive()
public boolean isCursorShown()
public void setUseGUIInterface(boolean gui)
public void toggleGUIInterface()
public void setResetRequired(boolean reset)
public void setBackspaceError(boolean onError)
public final String copyText(Rect area)
area - a rectangle areapublic final void pasteText(String content, boolean special)
content - the contentspecial - a flagpublic final String copyTextField(int position)
position - start numberpublic final Vector<Double> sumThem(boolean formatOption, Rect area)
formatOption - formatting option to usearea - a rect anglepublic boolean moveCursor(int pos)
pos - a position to move topublic void setVT(tnvt v)
protected void setPrehelpState(boolean setErrorCode,
boolean lockKeyboard,
boolean unlockIfLocked)
public void setCursorActive(boolean activate)
activate - a flagpublic void setCursorOn()
public void setCursorOff()
public String getKeys()
public void sendKeys(KeyMnemonic keyMnemonic)
public void sendKeys(String text)
KeyMnemonictext - The string of characters to be sentsendAid(int)public void sendAid(int aidKey)
aidKey - The aid key to be sent to the hostprotected void resetError()
protected boolean simulateMnemonic(int mnem)
protected boolean simulateKeyStroke(char c)
public int getRow(int pos)
public int getCol(int pos)
public int getPos(int row,
int col)
row - number of the rowcol - number of the columnpublic int getCurrentPos()
public boolean isUsingGuiInterface()
protected boolean isInField()
public boolean isInField(int pos,
boolean chgToField)
pos - numberchgToField - flagpublic boolean isInField(int pos)
pos - number of positionpublic boolean isInField(int row,
int col)
row - number of the rowcol - number of the columnpublic boolean isInField(int row,
int col,
boolean chgToField)
row - number of the rowcol - number of the columnchgToField - flagpublic int getScreenLength()
public int getRows()
public int getColumns()
public int getCurrentRow()
public int getCurrentCol()
protected int getLastPos()
public StringBuffer getHSMore()
public StringBuffer getHSBottom()
public char[] getScreenAsAllChars()
public char[] getScreenAsChars()
public char[] getData(int startRow,
int startCol,
int endRow,
int endCol,
int plane)
public int GetScreen(char[] buffer,
int bufferLength,
int plane)
GetScreen retrieves the various planes associated with the presentation space. The data is returned as a linear array of character values in the array provided. The array is not terminated by a null character except when data is retrieved from the text plane, in which case a single null character is appended.
The application must supply a buffer for the returned data and the length of the buffer. Data is returned starting from the beginning of the presentation space and continuing until the buffer is full or the entire plane has been copied. For text plane data, the buffer must include one extra position for the terminating null character.
buffer - character bufferbufferLength - lengthplane - planepublic int GetScreen(char[] buffer,
int bufferLength,
int from,
int length,
int plane)
GetScreen retrieves the various planes associated with the presentation space. The data is returned as a linear array of character values in the array provided. The array is not terminated by a null character except when data is retrieved from the text plane, in which case a single null character is appended.
The application must supply a buffer for the returned data and the length of the buffer. Data is returned starting from the given position and continuing until the specified number of characters have been copied, the buffer is full or the entire plane has been copied. For text plane data, the buffer must include one extra position for the terminating null character.
buffer - bufferbufferLength - lengthfrom - where to beginlength - lengthplane - planepublic int GetScreen(char[] buffer,
int bufferLength,
int row,
int col,
int length,
int plane)
GetScreen retrieves the various planes associated with the presentation space. The data is returned as a linear array of character values in the array provided. The array is not terminated by a null character except when data is retrieved from the text plane, in which case a single null character is appended.
The application must supply a buffer for the returned data and the length of the buffer. Data is returned starting from the given coordinates and continuing until the specified number of characters have been copied, the buffer is full, or the entire plane has been copied. For text plane data, the buffer must include one extra position for the terminating null character.
buffer - bufferbufferLength - lengthrow - number of rowcol - number of columnlength - lengthplane - planepublic int GetScreenRect(char[] buffer,
int bufferLength,
int startPos,
int endPos,
int plane)
GetScreenRect retrieves data from the various planes associated with the presentation space. The data is returned as a linear array of character values in the buffer provided.
The application supplies two positions that represent opposing corners of a rectangle within the presentation space. The starting and ending positions can have any spatial relationship to each other. The data returned starts from the row containing the upper-most point to the row containing the lower-most point, and from the left-most column to the right-most column.
The specified buffer must be at least large enough to contain the number of characters in the rectangle. If the buffer is too small, no data is copied and zero is returned by the method. Otherwise, the method returns the number of characters copied.
buffer - nufferbufferLength - lengthstartPos - where to startendPos - where to endplane - planepublic int GetScreenRect(char[] buffer,
int bufferLength,
int startRow,
int startCol,
int endRow,
int endCol,
int plane)
GetScreenRect retrieves data from the various planes associated with the presentation space. The data is returned as a linear array of character values in the buffer provided. The buffer is not terminated by a null character.
The application supplies two coordinates that represent opposing corners of a rectangle within the presentation space. The starting and ending coordinates can have any spatial relationship to each other. The data returned starts from the row containing the upper-most point to the row containing the lower-most point, and from the left-most column to the right-most column.
The specified buffer must be at least large enough to contain the number of characters in the rectangle. If the buffer is too small, no data is copied and zero is returned by the method. Otherwise, the method returns the number of characters copied.
buffer - bufferbufferLength - lengthstartRow - row to startstartCol - column to startendRow - row to endendCol - column to endplane - planepublic boolean[] getActiveAidKeys()
protected void setScreenData(String text, int location)
public void setCursor(int row,
int col)
row - number of rowcol - number of columnprotected void goto_XY(int pos)
public boolean gotoField(int f)
f - -
numeric field number on the screenprotected boolean gotoField(ScreenField screenField)
screenField - a screen field objectprotected void createWindow(int depth,
int width,
int type,
boolean gui,
int monoAttr,
int colorAttr,
int ul,
int upper,
int ur,
int left,
int right,
int ll,
int bottom,
int lr)
protected void createScrollBar(int flag,
int totalRowScrollable,
int totalColScrollable,
int sliderRowPos,
int sliderColPos,
int sbSize)
flag - -
type to draw - vertical or horizontaltotalRowScrollable - numbertotalColScrollable - numbersliderRowPos - numbersliderColPos - numbersbSize - numberprotected void writeWindowTitle(int pos,
int depth,
int width,
byte orientation,
int monoAttr,
int colorAttr,
StringBuffer title)
protected void rollScreen(int direction,
int topLine,
int bottomLine)
direction - directiontopLine - number of top linebottomLine - number of bottom linepublic void dumpScreen()
public String getDumpScreen()
protected void addField(int attr,
int len,
int ffw1,
int ffw2,
int fcw1,
int fcw2)
attr - - Field attributelen - - length of fieldffw1 - - Field format word 1ffw2 - - Field format word 2fcw1 - - Field control word 1fcw2 - - Field control word 2public ScreenFields getScreenFields()
protected void drawFields()
protected void drawField(ScreenField screenField)
screenField - Field to be redrawnprotected void setFieldHighlighted(ScreenField sf)
sf - -
Field to be highlightedprotected void unsetFieldHighlighted(ScreenField sf)
sf - -
Field to be unhighlightedpublic boolean checkHotSpots()
protected void setChar(int cByte)
protected void setEndingAttr(int cByte)
protected void setAttr(int cByte)
protected void setScreenCharAndAttr(char right,
int colorAttr,
boolean isAttr)
protected void setScreenCharAndAttr(char right,
int colorAttr,
int whichGui,
boolean isAttr)
protected void updateDirty()
protected void setDirty(int pos)
protected void advancePos()
protected void changePos(int i)
i - positionprotected void goHome()
protected void setPendingInsert(boolean flag,
int icX,
int icY)
protected void setPendingInsert(boolean flag)
protected void setErrorLine(int line)
line - number of the lineprotected int getErrorLine()
protected void saveErrorLine()
protected void restoreErrorLine()
protected void setStatus(byte attr,
byte value,
String s)
protected boolean isStatusErrorCode()
protected void clearAll()
protected void clearTable()
protected void clearGuiStuff()
protected void clearScreen()
protected void restoreScreen()
public final void updateScreen()
public void addScreenListener(ScreenListener listener)
listener - The ScreenListener to be addedpublic void removeScreenListener(ScreenListener listener)
listener - The ScreenListener to be removedpublic void repaintScreen()
public char[] getCharacters()
Copyright © 2018. All rights reserved.