Package org.tn5250j

Class GuiGraphicBuffer

    • Field Detail

      • columnWidth

        protected int columnWidth
      • rowHeight

        protected int rowHeight
      • crossHair

        protected int crossHair
      • hotSpots

        protected boolean hotSpots
      • clipper

        protected java.awt.Rectangle clipper
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent actionevent)
        This is for blinking cursor but should be moved out
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • isBlinkCursor

        public boolean isBlinkCursor()
      • resize

        public void resize​(int width,
                           int height)
      • loadColors

        protected final void loadColors()
      • loadProps

        public void loadProps()
      • getStringProperty

        protected final java.lang.String getStringProperty​(java.lang.String prop)
      • getColorProperty

        protected final java.awt.Color getColorProperty​(java.lang.String prop)
      • getFloatProperty

        protected final float getFloatProperty​(java.lang.String prop)
      • getIntProperty

        protected final int getIntProperty​(java.lang.String prop)
      • setProperty

        protected final void setProperty​(java.lang.String key,
                                         java.lang.String val)
      • propertyChange

        public void propertyChange​(java.beans.PropertyChangeEvent pce)
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • getPosFromView

        public int getPosFromView​(int x,
                                  int y)
      • getRowColFromPoint

        public int getRowColFromPoint​(int x,
                                      int y)
        Return the row column based on the screen x,y position coordinates It will calculate a 0,0 based row and column based on the screen point coordinate.
        Parameters:
        x - screen x position
        y - screen y position
        Returns:
        screen array position based 0,0 so position row 1 col 3 would be 2
      • getPointFromRowCol

        public void getPointFromRowCol​(int r,
                                       int c,
                                       java.awt.Point point)
        This will return the screen coordinates of a row and column.
        Parameters:
        r - row
        c - column
        point - just a point
      • isWithinScreenArea

        public boolean isWithinScreenArea​(int x,
                                          int y)
      • translateStart

        public java.awt.Point translateStart​(java.awt.Point start)
        Translate the starting point of mouse movement to encompass a full character
        Parameters:
        start - a point to start
        Returns:
        Point translated point
      • translateEnd

        public java.awt.Point translateEnd​(java.awt.Point end)
        Translate the ending point of mouse movement to encompass a full character
        Parameters:
        end - end point
        Returns:
        Point translated point
      • getBoundingArea

        public void getBoundingArea​(java.awt.Rectangle bounds)
        Fills the passed Rectangle with the starting row and column and width and height of the selected area. 1 BASED so column 1 row one is returned 1,1 If there is no area bounded then the full screen area is returned.
        Parameters:
        bounds - a rectangle
      • resizeScreenArea

        protected final void resizeScreenArea​(int width,
                                              int height)
        Convinience method to resize the screen area such as when the parent frame is resized.
        Parameters:
        width - width of the screen
        height - height of the screen
      • getPreferredSize

        public final java.awt.Dimension getPreferredSize()
      • getImageBuffer

        public java.awt.image.BufferedImage getImageBuffer​(int width,
                                                           int height)
      • drawOIA

        public java.awt.Graphics2D drawOIA()
        Draw the operator information area
        Returns:
        graphics object
      • drawCursor

        public void drawCursor​(int row,
                               int col)
      • getDrawingArea

        public java.awt.Graphics2D getDrawingArea()
        Returns a pointer to the graphics area that we can draw on
        Returns:
        a pointer
      • drawImageBuffer

        public void drawImageBuffer​(java.awt.Graphics2D gg2d,
                                    int x,
                                    int y,
                                    int width,
                                    int height)
      • updateImage

        protected void updateImage​(int x,
                                   int y,
                                   int width,
                                   int height)
      • updateImage

        protected void updateImage​(java.awt.Rectangle r)
      • drawImageBuffer

        public void drawImageBuffer​(java.awt.Graphics2D gg2d)
      • getWritingArea

        public java.awt.Graphics2D getWritingArea​(java.awt.Font font)
        Returns a pointer to the graphics area that we can write on
        Parameters:
        font - a font to use
        Returns:
        a pointer
      • setUseAntialias

        public void setUseAntialias​(boolean antialiased)
      • drawChar

        public final void drawChar​(java.awt.Graphics2D g,
                                   int pos,
                                   int row,
                                   int col)
      • onScreenChanged

        public void onScreenChanged​(int which,
                                    int sr,
                                    int sc,
                                    int er,
                                    int ec)
        Specified by:
        onScreenChanged in interface ScreenListener
      • getTextArea

        public java.awt.geom.Rectangle2D getTextArea()
      • getScreenArea

        public java.awt.geom.Rectangle2D getScreenArea()
      • getCommandLineArea

        public java.awt.geom.Rectangle2D getCommandLineArea()
      • getStatusArea

        public java.awt.geom.Rectangle2D getStatusArea()
      • getPositionArea

        public java.awt.geom.Rectangle2D getPositionArea()
      • getMessageArea

        public java.awt.geom.Rectangle2D getMessageArea()
      • getInsertIndicatorArea

        public java.awt.geom.Rectangle2D getInsertIndicatorArea()
      • getKBIndicatorArea

        public java.awt.geom.Rectangle2D getKBIndicatorArea()
      • getScriptIndicatorArea

        public java.awt.geom.Rectangle2D getScriptIndicatorArea()
      • getWidth

        public int getWidth()
      • getHeight

        public int getHeight()
      • getWidth

        public int getWidth​(java.awt.image.ImageObserver io)
      • getHeight

        public int getHeight​(java.awt.image.ImageObserver io)
      • fillData

        protected GuiGraphicBuffer.Data fillData​(int startRow,
                                                 int startCol,
                                                 int endRow,
                                                 int endCol)
      • modelToView

        public final java.awt.Rectangle modelToView​(int row,
                                                    int col)
      • modelToView

        public final java.awt.Rectangle modelToView​(int row,
                                                    int col,
                                                    java.awt.Rectangle r)
      • getColor

        protected java.awt.Color getColor​(char color,
                                          boolean background)