public class GuiGraphicBuffer extends Object implements ScreenOIAListener, ScreenListener, PropertyChangeListener, SessionConfigListener, ActionListener
| Modifier and Type | Class and Description |
|---|---|
protected class |
GuiGraphicBuffer.Data |
| Modifier and Type | Field and Description |
|---|---|
protected Rectangle |
clipper |
protected int |
columnWidth |
protected int |
crossHair |
protected boolean |
hotSpots |
protected int |
rowHeight |
OIA_CHANGED_BELL, OIA_CHANGED_CLEAR_SCREEN, OIA_CHANGED_CURSOR, OIA_CHANGED_INPUTINHIBITED, OIA_CHANGED_INSERT_MODE, OIA_CHANGED_KEYBOARD_LOCKED, OIA_CHANGED_KEYS_BUFFERED, OIA_CHANGED_MESSAGELIGHT, OIA_CHANGED_SCRIPT| Constructor and Description |
|---|
GuiGraphicBuffer(Screen5250 screen,
SessionPanel gui,
SessionConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent actionevent)
This is for blinking cursor but should be moved out
|
void |
drawChar(Graphics2D g,
int pos,
int row,
int col) |
void |
drawCursor(int row,
int col) |
void |
drawImageBuffer(Graphics2D gg2d) |
void |
drawImageBuffer(Graphics2D gg2d,
int x,
int y,
int width,
int height) |
Graphics2D |
drawOIA()
Draw the operator information area
|
protected GuiGraphicBuffer.Data |
fillData(int startRow,
int startCol,
int endRow,
int endCol) |
void |
getBoundingArea(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.
|
protected Color |
getColor(char color,
boolean background) |
protected Color |
getColorProperty(String prop) |
Rectangle2D |
getCommandLineArea() |
Graphics2D |
getDrawingArea()
Returns a pointer to the graphics area that we can draw on
|
protected float |
getFloatProperty(String prop) |
int |
getHeight() |
int |
getHeight(ImageObserver io) |
BufferedImage |
getImageBuffer(int width,
int height) |
Rectangle2D |
getInsertIndicatorArea() |
protected int |
getIntProperty(String prop) |
Rectangle2D |
getKBIndicatorArea() |
Rectangle2D |
getMessageArea() |
void |
getPointFromRowCol(int r,
int c,
Point point)
This will return the screen coordinates of a row and column.
|
int |
getPosFromView(int x,
int y) |
Rectangle2D |
getPositionArea() |
Dimension |
getPreferredSize() |
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.
|
Rectangle2D |
getScreenArea() |
Rectangle2D |
getScriptIndicatorArea() |
Rectangle2D |
getStatusArea() |
protected String |
getStringProperty(String prop) |
Rectangle2D |
getTextArea() |
int |
getWidth() |
int |
getWidth(ImageObserver io) |
Graphics2D |
getWritingArea(Font font)
Returns a pointer to the graphics area that we can write on
|
boolean |
isBlinkCursor() |
boolean |
isWithinScreenArea(int x,
int y) |
protected void |
loadColors() |
void |
loadProps() |
Rectangle |
modelToView(int row,
int col) |
Rectangle |
modelToView(int row,
int col,
Rectangle r) |
void |
onConfigChanged(SessionConfigEvent pce)
Update the configuration settings
|
void |
onOIAChanged(ScreenOIA changedOIA,
int change) |
void |
onScreenChanged(int which,
int sr,
int sc,
int er,
int ec) |
void |
onScreenSizeChanged(int rows,
int cols) |
void |
propertyChange(PropertyChangeEvent pce) |
void |
resize(int width,
int height) |
protected void |
resizeScreenArea(int width,
int height)
Convinience method to resize the screen area such as when the parent
frame is resized.
|
protected void |
setProperty(String key,
String val) |
void |
setUseAntialias(boolean antialiased) |
Point |
translateEnd(Point end)
Translate the ending point of mouse movement to encompass a full
character
|
Point |
translateStart(Point start)
Translate the starting point of mouse movement to encompass a full
character
|
protected void |
updateImage(int x,
int y,
int width,
int height) |
protected void |
updateImage(Rectangle r) |
protected int columnWidth
protected int rowHeight
protected int crossHair
protected boolean hotSpots
protected Rectangle clipper
public GuiGraphicBuffer(Screen5250 screen, SessionPanel gui, SessionConfig config)
public void actionPerformed(ActionEvent actionevent)
actionPerformed in interface ActionListenerpublic boolean isBlinkCursor()
public void resize(int width,
int height)
protected final void loadColors()
public void loadProps()
protected final float getFloatProperty(String prop)
protected final int getIntProperty(String prop)
public void onConfigChanged(SessionConfigEvent pce)
onConfigChanged in interface SessionConfigListenerpce - session configuration eventpublic void propertyChange(PropertyChangeEvent pce)
propertyChange in interface PropertyChangeListenerpublic int getPosFromView(int x,
int y)
public int getRowColFromPoint(int x,
int y)
x - screen x positiony - screen y positionpublic void getPointFromRowCol(int r,
int c,
Point point)
r - rowc - columnpoint - just a pointpublic boolean isWithinScreenArea(int x,
int y)
public Point translateStart(Point start)
start - a point to startpublic Point translateEnd(Point end)
end - end pointpublic void getBoundingArea(Rectangle bounds)
bounds - a rectangleprotected final void resizeScreenArea(int width,
int height)
width - width of the screenheight - height of the screenpublic final Dimension getPreferredSize()
public BufferedImage getImageBuffer(int width, int height)
public Graphics2D drawOIA()
public void drawCursor(int row,
int col)
public Graphics2D getDrawingArea()
public void drawImageBuffer(Graphics2D gg2d, int x, int y, int width, int height)
protected void updateImage(int x,
int y,
int width,
int height)
protected void updateImage(Rectangle r)
public void drawImageBuffer(Graphics2D gg2d)
public Graphics2D getWritingArea(Font font)
font - a font to usepublic void setUseAntialias(boolean antialiased)
public final void drawChar(Graphics2D g, int pos, int row, int col)
public void onScreenSizeChanged(int rows,
int cols)
onScreenSizeChanged in interface ScreenListenerpublic void onScreenChanged(int which,
int sr,
int sc,
int er,
int ec)
onScreenChanged in interface ScreenListenerpublic void onOIAChanged(ScreenOIA changedOIA, int change)
onOIAChanged in interface ScreenOIAListenerpublic Rectangle2D getTextArea()
public Rectangle2D getScreenArea()
public Rectangle2D getCommandLineArea()
public Rectangle2D getStatusArea()
public Rectangle2D getPositionArea()
public Rectangle2D getMessageArea()
public Rectangle2D getInsertIndicatorArea()
public Rectangle2D getKBIndicatorArea()
public Rectangle2D getScriptIndicatorArea()
public int getWidth()
public int getHeight()
public int getWidth(ImageObserver io)
public int getHeight(ImageObserver io)
protected GuiGraphicBuffer.Data fillData(int startRow, int startCol, int endRow, int endCol)
public final Rectangle modelToView(int row, int col)
protected Color getColor(char color, boolean background)
Copyright © 2018. All rights reserved.