Class ScreenPlanes


  • public class ScreenPlanes
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected char[] screen  
      protected char[] screenExtended  
    • Method Summary

      Modifier and Type Method Description
      protected boolean checkHotSpots()  
      protected char getChar​(int pos)  
      protected int getCharAttr​(int pos)  
      protected int getErrorLine()
      Returns the current error line number
      protected char[] getPlaneData​(int from, int to, int plane)
      Return the data associated with the plane that is passed.
      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.
      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.
      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.
      protected int getWhichGUI​(int pos)  
      protected void initalizeFieldPlanes()  
      protected void initalizePlanes()  
      protected boolean isAttributePlace​(int pos)  
      protected boolean isChanged​(int pos)  
      protected boolean isErrorLineSaved()  
      protected boolean isUseGui​(int pos)  
      protected void restoreErrorLine()
      Restores the error line characters from the save buffer.
      protected void saveErrorLine()  
      protected void setChar​(int pos, char c)  
      protected void setErrorLine​(int line)  
      protected void setScreenAttr​(int pos, int attr)  
      protected void setScreenAttr​(int pos, int attr, boolean isAttr)  
      protected void setScreenCharAndAttr​(int pos, char c, int attr, boolean isAttr)  
      protected void setScreenFieldAttr​(int pos, int attr)  
      protected void setSize​(int newSize)  
      void setUseGUI​(int pos, int which)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • screen

        protected char[] screen
      • screenExtended

        protected char[] screenExtended
    • 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 start
        to - Position to end
        plane - 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 - buffer
        bufferLength - length
        plane - 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 - buffer
        bufferLength - length
        from - where to start
        length - where to end
        plane - 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 - buffer
        bufferLength - length
        row - row to start
        col - column to start
        length - length
        plane - 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 - buffer
        bufferLength - length
        startPos - start position
        endPos - end position
        plane - 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 - buffer
        bufferLength - length
        startRow - row to start
        startCol - column to start
        endRow - row to end
        endCol - column to end
        plane - plane
        Returns:
        The number characters copied to the buffer
      • checkHotSpots

        protected boolean checkHotSpots()