Package jexer.backend
Class HeadlessBackend
- java.lang.Object
-
- jexer.backend.LogicalScreen
-
- jexer.backend.HeadlessBackend
-
public class HeadlessBackend extends LogicalScreen implements Backend
HeadlessBackend
-
-
Field Summary
-
Fields inherited from class jexer.backend.LogicalScreen
cursorVisible, cursorX, cursorY, height, logical, physical, reallyCleared, width
-
-
Constructor Summary
Constructors Constructor Description HeadlessBackend()
Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flushScreen()
Subclasses must provide an implementation that syncs the logical screen to the physical device.void
getEvents(java.util.List<TInputEvent> queue)
Subclasses must provide an implementation to get keyboard, mouse, and screen resize events.Screen
getScreen()
Get a Screen, which displays the text cells to the user.SessionInfo
getSessionInfo()
Getter for sessionInfo.boolean
hasEvents()
Check if there are events in the queue.boolean
isReadOnly()
Check if backend is read-only.void
reloadOptions()
Reload backend options from System properties.void
setListener(java.lang.Object listener)
Set listener to a different Object.void
setReadOnly(boolean readOnly)
Set read-only flag.void
shutdown()
Subclasses must provide an implementation that closes sockets, restores console, etc.-
Methods inherited from class jexer.backend.LogicalScreen
clear, clearPhysical, copySelection, drawBox, drawBox, drawBoxShadow, flushPhysical, getAttrXY, getCharXY, getClipBottom, getClipLeft, getClipRight, getClipTop, getCursorX, getCursorY, getHeight, getTextHeight, getTextWidth, getWidth, hideCursor, hLineXY, invertCell, invertCell, isCursorVisible, isDirty, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, putCursor, putFullwidthCharXY, putFullwidthCharXY, putFullwidthCharXY, putStringXY, putStringXY, reset, resetClipping, resizeToScreen, setClipBottom, setClipLeft, setClipRight, setClipTop, setDimensions, setHeight, setOffsetX, setOffsetY, setSelection, setTitle, setWidth, snapshot, unsetImageRow, vLineXY
-
-
-
-
Method Detail
-
getSessionInfo
public final SessionInfo getSessionInfo()
Getter for sessionInfo.- Specified by:
getSessionInfo
in interfaceBackend
- Returns:
- the SessionInfo
-
getScreen
public Screen getScreen()
Get a Screen, which displays the text cells to the user.
-
flushScreen
public void flushScreen()
Subclasses must provide an implementation that syncs the logical screen to the physical device.- Specified by:
flushScreen
in interfaceBackend
-
hasEvents
public boolean hasEvents()
Check if there are events in the queue.
-
getEvents
public void getEvents(java.util.List<TInputEvent> queue)
Subclasses must provide an implementation to get keyboard, mouse, and screen resize events.
-
shutdown
public void shutdown()
Subclasses must provide an implementation that closes sockets, restores console, etc.
-
setListener
public void setListener(java.lang.Object listener)
Set listener to a different Object.- Specified by:
setListener
in interfaceBackend
- Parameters:
listener
- the new listening object that run() wakes up on new input
-
reloadOptions
public void reloadOptions()
Reload backend options from System properties.- Specified by:
reloadOptions
in interfaceBackend
-
isReadOnly
public boolean isReadOnly()
Check if backend is read-only. For a HeadlessBackend, this is always false.- Specified by:
isReadOnly
in interfaceBackend
- Returns:
- true
-
setReadOnly
public void setReadOnly(boolean readOnly)
Set read-only flag. This does nothing for HeadlessBackend.- Specified by:
setReadOnly
in interfaceBackend
- Parameters:
readOnly
- ignored
-
-