*/
public abstract class GenericBackend implements Backend {
+ // ------------------------------------------------------------------------
+ // Variables --------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* The session information.
*/
protected SessionInfo sessionInfo;
+ /**
+ * The screen to draw on.
+ */
+ protected Screen screen;
+
+ /**
+ * Input events are processed by this Terminal.
+ */
+ protected TerminalReader terminal;
+
+ // ------------------------------------------------------------------------
+ // Constructors -----------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Backend ----------------------------------------------------------------
+ // ------------------------------------------------------------------------
+
/**
* Getter for sessionInfo.
*
return sessionInfo;
}
- /**
- * The screen to draw on.
- */
- protected Screen screen;
-
/**
* Getter for screen.
*
}
/**
- * Input events are processed by this Terminal.
+ * Check if there are events in the queue.
+ *
+ * @return if true, getEvents() has something to return to the application
*/
- protected TerminalReader terminal;
+ public boolean hasEvents() {
+ return terminal.hasEvents();
+ }
/**
* Get keyboard, mouse, and screen resize events.