Package jexer.backend
Class MultiScreen
- java.lang.Object
-
- jexer.backend.LogicalScreen
-
- jexer.backend.MultiScreen
-
- All Implemented Interfaces:
Screen
public class MultiScreen extends LogicalScreen implements Screen
MultiScreen mirrors its I/O to several screens.
-
-
Field Summary
-
Fields inherited from class jexer.backend.LogicalScreen
cursorVisible, cursorX, cursorY, height, logical, physical, reallyCleared, width
-
-
Constructor Summary
Constructors Constructor Description MultiScreen()
Public constructor provides a virtual screen at 80x25.MultiScreen(Screen screen)
Public constructor takes the dimensions of the first screen.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addScreen(Screen screen)
Add a screen to the list.void
clearPhysical()
Clear the physical screen.void
flushPhysical()
Classes must provide an implementation to push the logical screen to the physical device.int
getTextHeight()
Get the height of a character cell in pixels.int
getTextWidth()
Get the width of a character cell in pixels.void
removeScreen(Screen screenToRemove)
Remove a screen from the list.void
setDimensions(int width, int height)
Change the width and height.void
setHeight(int height)
Change the height.void
setTitle(java.lang.String title)
Set the window title.void
setWidth(int width)
Change the width.-
Methods inherited from class jexer.backend.LogicalScreen
blendRectangle, blendScreen, clear, copyScreen, copyScreen, copySelection, drawBox, drawBox, drawBoxShadow, getAttrXY, getBackend, getCharXY, getCharXY, getClipBottom, getClipLeft, getClipRight, getClipTop, getCursorX, getCursorY, getHeight, getOffsetX, getOffsetY, getWidth, hideCursor, hLineXY, hLineXY, invertCell, invertCell, isCursorVisible, isDirty, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putCursor, putFullwidthCharXY, putFullwidthCharXY, putFullwidthCharXY, putStringXY, putStringXY, reset, resetClipping, resizeToScreen, setBackend, setClipBottom, setClipLeft, setClipRight, setClipTop, setOffsetX, setOffsetY, setSelection, snapshot, snapshot, snapshotPhysical, unsetImageRow, vLineXY, vLineXY
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jexer.backend.Screen
blendRectangle, blendScreen, clear, copyScreen, copyScreen, copySelection, drawBox, drawBox, drawBoxShadow, getAttrXY, getBackend, getCharXY, getCharXY, getClipBottom, getClipLeft, getClipRight, getClipTop, getCursorX, getCursorY, getHeight, getOffsetX, getOffsetY, getWidth, hideCursor, hLineXY, hLineXY, invertCell, invertCell, isCursorVisible, isDirty, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putCursor, putStringXY, putStringXY, reset, resetClipping, setClipBottom, setClipLeft, setClipRight, setClipTop, setOffsetX, setOffsetY, setSelection, snapshot, snapshot, snapshotPhysical, unsetImageRow, vLineXY, vLineXY
-
-
-
-
Constructor Detail
-
MultiScreen
public MultiScreen()
Public constructor provides a virtual screen at 80x25.
-
MultiScreen
public MultiScreen(Screen screen)
Public constructor takes the dimensions of the first screen.- Parameters:
screen
- the screen to add
-
-
Method Detail
-
getTextWidth
public int getTextWidth()
Get the width of a character cell in pixels.- Specified by:
getTextWidth
in interfaceScreen
- Overrides:
getTextWidth
in classLogicalScreen
- Returns:
- the width in pixels of a character cell
-
getTextHeight
public int getTextHeight()
Get the height of a character cell in pixels.- Specified by:
getTextHeight
in interfaceScreen
- Overrides:
getTextHeight
in classLogicalScreen
- Returns:
- the height in pixels of a character cell
-
setWidth
public void setWidth(int width)
Change the width. Everything on-screen will be destroyed and must be redrawn.- Specified by:
setWidth
in interfaceScreen
- Overrides:
setWidth
in classLogicalScreen
- Parameters:
width
- new screen width
-
setHeight
public void setHeight(int height)
Change the height. Everything on-screen will be destroyed and must be redrawn.- Specified by:
setHeight
in interfaceScreen
- Overrides:
setHeight
in classLogicalScreen
- Parameters:
height
- new screen height
-
setDimensions
public void setDimensions(int width, int height)
Change the width and height. Everything on-screen will be destroyed and must be redrawn.- Specified by:
setDimensions
in interfaceScreen
- Overrides:
setDimensions
in classLogicalScreen
- Parameters:
width
- new screen widthheight
- new screen height
-
clearPhysical
public void clearPhysical()
Clear the physical screen.- Specified by:
clearPhysical
in interfaceScreen
- Overrides:
clearPhysical
in classLogicalScreen
-
flushPhysical
public void flushPhysical()
Classes must provide an implementation to push the logical screen to the physical device.- Specified by:
flushPhysical
in interfaceScreen
- Overrides:
flushPhysical
in classLogicalScreen
-
setTitle
public void setTitle(java.lang.String title)
Set the window title.- Specified by:
setTitle
in interfaceScreen
- Overrides:
setTitle
in classLogicalScreen
- Parameters:
title
- the new title
-
addScreen
public void addScreen(Screen screen)
Add a screen to the list.- Parameters:
screen
- the screen to add
-
removeScreen
public void removeScreen(Screen screenToRemove)
Remove a screen from the list.- Parameters:
screenToRemove
- the screen to remove
-
-