Class ScreenPlanes
- java.lang.Object
-
- org.tn5250j.framework.tn5250.ScreenPlanes
-
public class ScreenPlanes extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected char[]screenprotected char[]screenExtended
-
Constructor Summary
Constructors Constructor Description ScreenPlanes(Screen5250 s5250, int size)
-
Method Summary
Modifier and Type Method Description protected booleancheckHotSpots()protected chargetChar(int pos)protected intgetCharAttr(int pos)protected intgetErrorLine()Returns the current error line numberprotected char[]getPlaneData(int from, int to, int plane)Return the data associated with the plane that is passed.intGetScreen(char[] buffer, int bufferLength, int plane)GetScreen retrieves the various planes associated with the presentation space.intGetScreen(char[] buffer, int bufferLength, int from, int length, int plane)GetScreen retrieves the various planes associated with the presentation space.intGetScreen(char[] buffer, int bufferLength, int row, int col, int length, int plane)GetScreen retrieves the various planes associated with the presentation space.protected intGetScreenRect(char[] buffer, int bufferLength, int startPos, int endPos, int plane)GetScreenRect retrieves data from the various planes associated with the presentation space.protected intGetScreenRect(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 intgetWhichGUI(int pos)protected voidinitalizeFieldPlanes()protected voidinitalizePlanes()protected booleanisAttributePlace(int pos)protected booleanisChanged(int pos)protected booleanisErrorLineSaved()protected booleanisUseGui(int pos)protected voidrestoreErrorLine()Restores the error line characters from the save buffer.protected voidsaveErrorLine()protected voidsetChar(int pos, char c)protected voidsetErrorLine(int line)protected voidsetScreenAttr(int pos, int attr)protected voidsetScreenAttr(int pos, int attr, boolean isAttr)protected voidsetScreenCharAndAttr(int pos, char c, int attr, boolean isAttr)protected voidsetScreenFieldAttr(int pos, int attr)protected voidsetSize(int newSize)voidsetUseGUI(int pos, int which)
-
-
-
Constructor Detail
-
ScreenPlanes
public ScreenPlanes(Screen5250 s5250, int size)
-
-
Method Detail
-
setSize
protected void setSize(int newSize)
-
setErrorLine
protected void setErrorLine(int line)
-
getErrorLine
protected int getErrorLine()
Returns the current error line number- Returns:
- current error line number
-
saveErrorLine
protected void saveErrorLine()
-
restoreErrorLine
protected void restoreErrorLine()
Restores the error line characters from the save buffer.- See Also:
saveErrorLine()
-
isErrorLineSaved
protected boolean isErrorLineSaved()
-
setScreenCharAndAttr
protected void setScreenCharAndAttr(int pos, char c, int attr, boolean isAttr)
-
setScreenAttr
protected void setScreenAttr(int pos, int attr, boolean isAttr)
-
setScreenAttr
protected void setScreenAttr(int pos, int attr)
-
setScreenFieldAttr
protected void setScreenFieldAttr(int pos, int attr)
-
setChar
protected final void setChar(int pos, char c)
-
getChar
protected final char getChar(int pos)
-
getCharAttr
protected final int getCharAttr(int pos)
-
isAttributePlace
protected final boolean isAttributePlace(int pos)
-
setUseGUI
public final void setUseGUI(int pos, int which)
-
initalizePlanes
protected void initalizePlanes()
-
initalizeFieldPlanes
protected void initalizeFieldPlanes()
-
getWhichGUI
protected final int getWhichGUI(int pos)
-
isChanged
protected final boolean isChanged(int pos)
-
isUseGui
protected final boolean isUseGui(int pos)
-
getPlaneData
protected char[] getPlaneData(int from, int to, int plane)Return the data associated with the plane that is passed.- Parameters:
from- Position from which to startto- Position to endplane- From which plane to obtain the data- Returns:
- Character array containing the data requested
-
GetScreen
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.
- Parameters:
buffer- bufferbufferLength- lengthplane- plane- Returns:
- The number of characters copied to the buffer
-
GetScreen
public 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.
- Parameters:
buffer- bufferbufferLength- lengthfrom- where to startlength- where to endplane- plane- Returns:
- The number of characters copied to the buffer
-
GetScreen
public 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.
- Parameters:
buffer- bufferbufferLength- lengthrow- row to startcol- column to startlength- lengthplane- plane- Returns:
- The number of characters copied to the buffer.
-
GetScreenRect
protected 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.
- Parameters:
buffer- bufferbufferLength- lengthstartPos- start positionendPos- end positionplane- plane- Returns:
- The number of characters copied to the buffer
-
GetScreenRect
protected 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.
- Parameters:
buffer- bufferbufferLength- lengthstartRow- row to startstartCol- column to startendRow- row to endendCol- column to endplane- plane- Returns:
- The number characters copied to the buffer
-
checkHotSpots
protected boolean checkHotSpots()
-
-