Constructor and Description |
---|
MultiScreen(Screen screen)
Public constructor requires one screen.
|
Modifier and Type | Method and Description |
---|---|
void |
addScreen(Screen screen)
Add a screen to the list.
|
void |
clear()
Clear the logical screen.
|
void |
clearPhysical()
Clear the physical screen.
|
void |
drawBox(int left,
int top,
int right,
int bottom,
CellAttributes border,
CellAttributes background)
Draw a box with a border and empty background.
|
void |
drawBox(int left,
int top,
int right,
int bottom,
CellAttributes border,
CellAttributes background,
int borderType,
boolean shadow)
Draw a box with a border and empty background.
|
void |
drawBoxShadow(int left,
int top,
int right,
int bottom)
Draw a box shadow.
|
void |
flushPhysical()
Classes must provide an implementation to push the logical screen to
the physical device.
|
CellAttributes |
getAttrXY(int x,
int y)
Get the attributes at one location.
|
Cell |
getCharXY(int x,
int y)
Get the cell at one location.
|
int |
getClipBottom()
Get bottom drawing clipping boundary.
|
int |
getClipLeft()
Get left drawing clipping boundary.
|
int |
getClipRight()
Get right drawing clipping boundary.
|
int |
getClipTop()
Get top drawing clipping boundary.
|
int |
getCursorX()
Get the cursor X position.
|
int |
getCursorY()
Get the cursor Y position.
|
int |
getHeight()
Get the height.
|
int |
getTextHeight()
Get the height of a character cell in pixels.
|
int |
getTextWidth()
Get the width of a character cell in pixels.
|
int |
getWidth()
Get the width.
|
void |
hideCursor()
Hide the cursor.
|
void |
hLineXY(int x,
int y,
int n,
int ch,
CellAttributes attr)
Draw a horizontal line from (x, y) to (x + n, y).
|
boolean |
isCursorVisible()
Get the cursor visibility.
|
boolean |
isDirty()
Get dirty flag.
|
void |
putAll(int ch,
CellAttributes attr)
Fill the entire screen with one character with attributes.
|
void |
putAttrXY(int x,
int y,
CellAttributes attr)
Set the attributes at one location.
|
void |
putAttrXY(int x,
int y,
CellAttributes attr,
boolean clip)
Set the attributes at one location.
|
void |
putCharXY(int x,
int y,
Cell ch)
Render one character with attributes.
|
void |
putCharXY(int x,
int y,
int ch)
Render one character without changing the underlying attributes.
|
void |
putCharXY(int x,
int y,
int ch,
CellAttributes attr)
Render one character with attributes.
|
void |
putCursor(boolean visible,
int x,
int y)
Put the cursor at (x,y).
|
void |
putStringXY(int x,
int y,
java.lang.String str)
Render a string without changing the underlying attribute.
|
void |
putStringXY(int x,
int y,
java.lang.String str,
CellAttributes attr)
Render a string.
|
void |
removeScreen(Screen screen)
Remove a screen from the list.
|
void |
reset()
Reset screen to not-bold, white-on-black.
|
void |
resetClipping()
Flush the offset and clip variables.
|
void |
setClipBottom(int clipBottom)
Set bottom drawing clipping boundary.
|
void |
setClipLeft(int clipLeft)
Set left drawing clipping boundary.
|
void |
setClipRight(int clipRight)
Set right drawing clipping boundary.
|
void |
setClipTop(int clipTop)
Set top drawing clipping boundary.
|
void |
setDimensions(int width,
int height)
Change the width and height.
|
void |
setHeight(int height)
Change the height.
|
void |
setOffsetX(int offsetX)
Set drawing offset for x.
|
void |
setOffsetY(int offsetY)
Set drawing offset for y.
|
void |
setTitle(java.lang.String title)
Set the window title.
|
void |
setWidth(int width)
Change the width.
|
void |
unsetImageRow(int y)
Unset every image cell on one row of the physical screen, forcing
images on that row to be redrawn.
|
void |
vLineXY(int x,
int y,
int n,
int ch,
CellAttributes attr)
Draw a vertical line from (x, y) to (x, y + n).
|
public MultiScreen(Screen screen)
screen
- the screen to addpublic void setOffsetX(int offsetX)
setOffsetX
in interface Screen
offsetX
- new drawing offsetpublic void setOffsetY(int offsetY)
setOffsetY
in interface Screen
offsetY
- new drawing offsetpublic int getClipRight()
getClipRight
in interface Screen
public void setClipRight(int clipRight)
setClipRight
in interface Screen
clipRight
- new boundarypublic int getClipBottom()
getClipBottom
in interface Screen
public void setClipBottom(int clipBottom)
setClipBottom
in interface Screen
clipBottom
- new boundarypublic int getClipLeft()
getClipLeft
in interface Screen
public void setClipLeft(int clipLeft)
setClipLeft
in interface Screen
clipLeft
- new boundarypublic int getClipTop()
getClipTop
in interface Screen
public void setClipTop(int clipTop)
setClipTop
in interface Screen
clipTop
- new boundarypublic boolean isDirty()
public CellAttributes getAttrXY(int x, int y)
public Cell getCharXY(int x, int y)
public void putAttrXY(int x, int y, CellAttributes attr)
public void putAttrXY(int x, int y, CellAttributes attr, boolean clip)
public void putAll(int ch, CellAttributes attr)
public void putCharXY(int x, int y, Cell ch)
public void putCharXY(int x, int y, int ch, CellAttributes attr)
public void putCharXY(int x, int y, int ch)
public void putStringXY(int x, int y, java.lang.String str, CellAttributes attr)
putStringXY
in interface Screen
x
- column coordinate. 0 is the left-most column.y
- row coordinate. 0 is the top-most row.str
- string to drawattr
- attributes to use (bold, foreColor, backColor)public void putStringXY(int x, int y, java.lang.String str)
putStringXY
in interface Screen
x
- column coordinate. 0 is the left-most column.y
- row coordinate. 0 is the top-most row.str
- string to drawpublic void vLineXY(int x, int y, int n, int ch, CellAttributes attr)
public void hLineXY(int x, int y, int n, int ch, CellAttributes attr)
public void setWidth(int width)
public void setHeight(int height)
public void setDimensions(int width, int height)
setDimensions
in interface Screen
width
- new screen widthheight
- new screen heightpublic int getHeight()
public int getWidth()
public void reset()
public void resetClipping()
resetClipping
in interface Screen
public void drawBox(int left, int top, int right, int bottom, CellAttributes border, CellAttributes background)
drawBox
in interface Screen
left
- left column of box. 0 is the left-most row.top
- top row of the box. 0 is the top-most row.right
- right column of boxbottom
- bottom row of the boxborder
- attributes to use for the borderbackground
- attributes to use for the backgroundpublic void drawBox(int left, int top, int right, int bottom, CellAttributes border, CellAttributes background, int borderType, boolean shadow)
drawBox
in interface Screen
left
- left column of box. 0 is the left-most row.top
- top row of the box. 0 is the top-most row.right
- right column of boxbottom
- bottom row of the boxborder
- attributes to use for the borderbackground
- attributes to use for the backgroundborderType
- if 1, draw a single-line border; if 2, draw a
double-line border; if 3, draw double-line top/bottom edges and
single-line left/right edges (like Qmodem)shadow
- if true, draw a "shadow" on the boxpublic void drawBoxShadow(int left, int top, int right, int bottom)
drawBoxShadow
in interface Screen
left
- left column of box. 0 is the left-most row.top
- top row of the box. 0 is the top-most row.right
- right column of boxbottom
- bottom row of the boxpublic void clearPhysical()
clearPhysical
in interface Screen
public final void unsetImageRow(int y)
unsetImageRow
in interface Screen
y
- row coordinate. 0 is the top-most row.public void flushPhysical()
flushPhysical
in interface Screen
public void putCursor(boolean visible, int x, int y)
public void hideCursor()
hideCursor
in interface Screen
public boolean isCursorVisible()
isCursorVisible
in interface Screen
public int getCursorX()
getCursorX
in interface Screen
public int getCursorY()
getCursorY
in interface Screen
public void setTitle(java.lang.String title)
public void addScreen(Screen screen)
screen
- the screen to addpublic void removeScreen(Screen screen)
screen
- the screen to removepublic int getTextWidth()
getTextWidth
in interface Screen
public int getTextHeight()
getTextHeight
in interface Screen
Copyright © 2019 Kevin Lamonte. Licensed MIT.