Class Screen5250


  • public class Screen5250
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Screen5250()  
    • Method Summary

      Modifier and Type Method 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
      java.lang.String copyText​(Rect area)
      Copy and Paste support
      java.lang.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)  
      java.lang.String getDumpScreen()  
      protected int getErrorLine()
      Returns the current error line number
      java.lang.StringBuffer getHSBottom()
      Hotspot Bottom string
      java.lang.StringBuffer getHSMore()
      Hotspot More... string
      java.lang.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​(java.lang.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​(java.lang.String text)
      The sendKeys method sends a string of keys to the virtual screen.
      void sendKeys​(KeyMnemonic keyMnemonic)  
      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​(java.lang.String text, int location)  
      protected void setStatus​(byte attr, byte value, java.lang.String s)  
      void setUseGUIInterface​(boolean gui)  
      void setVT​(tnvt v)  
      protected boolean simulateKeyStroke​(char c)  
      protected boolean simulateMnemonic​(int mnem)  
      java.util.Vector<java.lang.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, java.lang.StringBuffer title)  
      • Methods inherited from class java.lang.Object

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

      • cursorActive

        public boolean cursorActive
      • cursorShown

        public boolean cursorShown
      • homePos

        public int homePos
    • Constructor Detail

      • Screen5250

        public Screen5250()
    • Method Detail

      • setRowsCols

        protected final void setRowsCols​(int rows,
                                         int cols)
      • isCursorActive

        public boolean isCursorActive()
      • isCursorShown

        public boolean isCursorShown()
      • setUseGUIInterface

        public void setUseGUIInterface​(boolean gui)
      • toggleGUIInterface

        public void toggleGUIInterface()
      • setResetRequired

        public void setResetRequired​(boolean reset)
      • setBackspaceError

        public void setBackspaceError​(boolean onError)
      • copyText

        public final java.lang.String copyText​(Rect area)
        Copy and Paste support
        Parameters:
        area - a rectangle area
        Returns:
        a string, holding the text
      • pasteText

        public final void pasteText​(java.lang.String content,
                                    boolean special)
        Copy and Paste support
        Parameters:
        content - the content
        special - a flag
      • copyTextField

        public final java.lang.String copyTextField​(int position)
        Copy and Paste support
        Parameters:
        position - start number
        Returns:
        a copied text
      • sumThem

        public final java.util.Vector<java.lang.Double> sumThem​(boolean formatOption,
                                                                Rect area)
        Parameters:
        formatOption - formatting option to use
        area - a rect angle
        Returns:
        vector string of numberic values
      • moveCursor

        public boolean moveCursor​(int pos)
        This will move the screen cursor based on the mouse event. I do not think the checks here for the gui characters should be here but will leave them here for now until we work out the interaction. This should be up to the gui frontend in my opinion.
        Parameters:
        pos - a position to move to
        Returns:
        flag
      • setVT

        public void setVT​(tnvt v)
      • setPrehelpState

        protected void setPrehelpState​(boolean setErrorCode,
                                       boolean lockKeyboard,
                                       boolean unlockIfLocked)
      • setCursorActive

        public void setCursorActive​(boolean activate)
        Activate the cursor on screen
        Parameters:
        activate - a flag
      • setCursorOn

        public void setCursorOn()
      • setCursorOff

        public void setCursorOff()
      • getKeys

        public java.lang.String getKeys()
      • sendKeys

        public void sendKeys​(KeyMnemonic keyMnemonic)
      • sendKeys

        public void sendKeys​(java.lang.String text)
        The sendKeys method sends a string of keys to the virtual screen. This method acts as if keystrokes were being typed from the keyboard. The keystrokes will be sent to the location given. The string being passed can also contain mnemonic values such as [enter] enter key,[tab] tab key, [pf1] pf1 etc... These will be processed as if you had pressed these keys from the keyboard. All the valid special key values are contained in the MNEMONIC enumeration. See also KeyMnemonic
        Parameters:
        text - The string of characters to be sent
        See Also:
        sendAid(int)
      • sendAid

        public void sendAid​(int aidKey)
        The sendAid method sends an "aid" keystroke to the virtual screen. These aid keys can be thought of as special keystrokes, like the Enter key, PF1-24 keys or the Page Up key. All the valid special key values are contained in the AID_ enumeration:
        Parameters:
        aidKey - The aid key to be sent to the host
      • resetError

        protected void resetError()
        Restores the error line and sets the error mode off.
      • simulateMnemonic

        protected boolean simulateMnemonic​(int mnem)
      • simulateKeyStroke

        protected boolean simulateKeyStroke​(char c)
      • getRow

        public int getRow​(int pos)
      • getCol

        public int getCol​(int pos)
      • getPos

        public int getPos​(int row,
                          int col)
        This routine is 0 based offset. So to get row 20,1 then pass row 19,0
        Parameters:
        row - number of the row
        col - number of the column
        Returns:
        number of the position
      • getCurrentPos

        public int getCurrentPos()
        Current position is based on offsets of 1,1 not 0,0 of the current position of the screen
        Returns:
        int the current position
      • isUsingGuiInterface

        public boolean isUsingGuiInterface()
      • isInField

        protected boolean isInField()
        Convinience class to return if the cursor is in a field or not.
        Returns:
        true or false
      • isInField

        public boolean isInField​(int pos,
                                 boolean chgToField)
        Convinience class to return if the position that is passed is in a field or not. If it is then the chgToField parameter will change the current field to this field where the position indicates
        Parameters:
        pos - number
        chgToField - flag
        Returns:
        true or false
      • isInField

        public boolean isInField​(int pos)
        Convinience class to return if the position that is passed is in a field or not. If it is then the field at this position becomes the current working field
        Parameters:
        pos - number of position
        Returns:
        true or false
      • isInField

        public 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. If it is then the field at this position becomes the current working field.
        Parameters:
        row - number of the row
        col - number of the column
        Returns:
        true or false
      • isInField

        public 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. If it is then the chgToField parameter will change the current field to this field where the row and column indicates.
        Parameters:
        row - number of the row
        col - number of the column
        chgToField - flag
        Returns:
        true or false
      • getScreenLength

        public int getScreenLength()
        Gets the length of the screen - number of rows times number of columns
        Returns:
        int value of screen length
      • getRows

        public int getRows()
        Get the number or rows available.
        Returns:
        number of rows
      • getColumns

        public int getColumns()
        Get the number of columns available.
        Returns:
        number of columns
      • getCurrentRow

        public int getCurrentRow()
        Get the current row where the cursor is
        Returns:
        the cursor current row position 1,1 based
      • getCurrentCol

        public int getCurrentCol()
        Get the current column where the cursor is
        Returns:
        the cursor current column position 1,1 based
      • getLastPos

        protected int getLastPos()
        The last position of the cursor on the screen - Note - position is based 0,0
        Returns:
        last position
      • getHSMore

        public java.lang.StringBuffer getHSMore()
        Hotspot More... string
        Returns:
        string literal of More...
      • getHSBottom

        public java.lang.StringBuffer getHSBottom()
        Hotspot Bottom string
        Returns:
        string literal of Bottom
      • getScreenAsAllChars

        public char[] getScreenAsAllChars()
        Return the whole screen represented as a character array
        Returns:
        character array containing the text Added by Luc - LDC Note to KJP - Have to ask what the difference is between this method and the other
      • getScreenAsChars

        public char[] getScreenAsChars()
        Return the screen represented as a character array
        Returns:
        character array containing the text
      • getData

        public char[] getData​(int startRow,
                              int startCol,
                              int endRow,
                              int endCol,
                              int plane)
      • 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 - character 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 begin
        length - length
        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 - number of row
        col - number of column
        length - length
        plane - plane
        Returns:
        The number of characters copied to the buffer.
      • GetScreenRect

        public 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 - nuffer
        bufferLength - length
        startPos - where to start
        endPos - where to end
        plane - plane
        Returns:
        The number of characters copied to the buffer
      • GetScreenRect

        public 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
      • getActiveAidKeys

        public boolean[] getActiveAidKeys()
      • setScreenData

        protected void setScreenData​(java.lang.String text,
                                     int location)
      • setCursor

        public 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
        Parameters:
        row - number of row
        col - number of column
      • goto_XY

        protected void goto_XY​(int pos)
      • gotoField

        public boolean gotoField​(int f)
        Set the current working field to the field number specified.
        Parameters:
        f - - numeric field number on the screen
        Returns:
        true or false whether it was sucessful
      • gotoField

        protected boolean gotoField​(ScreenField screenField)
        Convenience method to set the field object passed as the currect working screen field
        Parameters:
        screenField - a screen field object
        Returns:
        true or false whether it was sucessful
      • createWindow

        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)
      • createScrollBar

        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.
        Parameters:
        flag - - type to draw - vertical or horizontal
        totalRowScrollable - number
        totalColScrollable - number
        sliderRowPos - number
        sliderColPos - number
        sbSize - number
      • writeWindowTitle

        protected void writeWindowTitle​(int pos,
                                        int depth,
                                        int width,
                                        byte orientation,
                                        int monoAttr,
                                        int colorAttr,
                                        java.lang.StringBuffer title)
      • rollScreen

        protected void rollScreen​(int direction,
                                  int topLine,
                                  int bottomLine)
        Roll the screen up or down. Byte 1: Bit 0 0 = Roll up 1 = Roll down Bits 1-2 Reserved Bits 3-7 Number of lines that the designated area is to be rolled Byte 2: Bits 0-7 Line number defining the top line of the area that will participate in the roll. Byte 3: Bits 0-7 Line number defining the bottom line of the area that will participate in the roll.
        Parameters:
        direction - direction
        topLine - number of top line
        bottomLine - number of bottom line
      • dumpScreen

        public void dumpScreen()
      • getDumpScreen

        public java.lang.String getDumpScreen()
      • addField

        protected void addField​(int attr,
                                int len,
                                int ffw1,
                                int ffw2,
                                int fcw1,
                                int fcw2)
        Add a field to the field format table.
        Parameters:
        attr - - Field attribute
        len - - length of field
        ffw1 - - Field format word 1
        ffw2 - - Field format word 2
        fcw1 - - Field control word 1
        fcw2 - - Field control word 2
      • getScreenFields

        public ScreenFields getScreenFields()
        Return the fields that are contained in the Field Format Table
        Returns:
        ScreenFields object
      • drawFields

        protected void drawFields()
        Redraw the fields on the screen. Used for gui enhancement to redraw the fields when toggling
      • drawField

        protected void drawField​(ScreenField screenField)
        Draws the field on the screen. Used to redraw or change the attributes of the field.
        Parameters:
        screenField - Field to be redrawn
      • setFieldHighlighted

        protected void setFieldHighlighted​(ScreenField sf)
        Set the field to be displayed as highlighted.
        Parameters:
        sf - - Field to be highlighted
      • unsetFieldHighlighted

        protected void unsetFieldHighlighted​(ScreenField sf)
        Draw the field as un higlighted. This is used to reset the field presentation on the screen after the field is exited.
        Parameters:
        sf - - Field to be unhighlighted
      • checkHotSpots

        public boolean checkHotSpots()
      • setChar

        protected void setChar​(int cByte)
      • setEndingAttr

        protected void setEndingAttr​(int cByte)
      • setAttr

        protected void setAttr​(int cByte)
      • setScreenCharAndAttr

        protected void setScreenCharAndAttr​(char right,
                                            int colorAttr,
                                            boolean isAttr)
      • setScreenCharAndAttr

        protected void setScreenCharAndAttr​(char right,
                                            int colorAttr,
                                            int whichGui,
                                            boolean isAttr)
      • updateDirty

        protected void updateDirty()
        Draw or redraw the dirty parts of the screen and display them. Rectangle dirty holds the dirty area of the screen to be updated. If you want to change the screen in anyway you need to set the screen attributes before calling this routine.
      • setDirty

        protected void setDirty​(int pos)
      • advancePos

        protected void advancePos()
        Change the screen position by one column
      • changePos

        protected void changePos​(int i)
        Change position of the screen by the increment of parameter passed. If the position change is under the minimum of the first screen position then the position is moved to the last row and column of the screen. If the position change is over the last row and column of the screen then cursor is moved to first position of the screen.
        Parameters:
        i - position
      • goHome

        protected void goHome()
      • setPendingInsert

        protected void setPendingInsert​(boolean flag,
                                        int icX,
                                        int icY)
      • setPendingInsert

        protected void setPendingInsert​(boolean flag)
      • setErrorLine

        protected void setErrorLine​(int line)
        Set the error line number to that of number passed.
        Parameters:
        line - number of the line
      • getErrorLine

        protected int getErrorLine()
        Returns the current error line number
        Returns:
        current error line number
      • saveErrorLine

        protected void saveErrorLine()
        Saves off the current error line characters to be used later.
      • restoreErrorLine

        protected void restoreErrorLine()
        Restores the error line characters from the save buffer.
      • setStatus

        protected void setStatus​(byte attr,
                                 byte value,
                                 java.lang.String s)
      • isStatusErrorCode

        protected boolean isStatusErrorCode()
      • clearAll

        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.
      • clearTable

        protected void clearTable()
        Clear the fields table
      • clearGuiStuff

        protected void clearGuiStuff()
        Clear the gui constructs
      • clearScreen

        protected void clearScreen()
        Clear the screen by setting the initial character and initial attribute to all the positions on the screen
      • restoreScreen

        protected void restoreScreen()
      • updateScreen

        public final void updateScreen()
        This method does a complete refresh of the screen.
      • addScreenListener

        public void addScreenListener​(ScreenListener listener)
        Add a ScreenListener to the listener list.
        Parameters:
        listener - The ScreenListener to be added
      • removeScreenListener

        public void removeScreenListener​(ScreenListener listener)
        Remove a ScreenListener from the listener list.
        Parameters:
        listener - The ScreenListener to be removed
      • repaintScreen

        public void repaintScreen()
        Utility method to share the repaint behaviour between setBounds() and updateScreen.
      • getCharacters

        public char[] getCharacters()