git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
#16 Refactor Swing backend, demo of multiple TApplications in one Swing frame
[fanfix.git]
/
src
/
jexer
/
backend
/
LogicalScreen.java
diff --git
a/src/jexer/io/Screen.java
b/src/jexer/backend/LogicalScreen.java
similarity index 98%
rename from
src/jexer/io/Screen.java
rename to
src/jexer/backend/LogicalScreen.java
index 85e121f29be7a5a1d111bc44da9778bc85691dbb..8432e4eae526f8a74f395303ebb8fbd3d5f3c09e 100644
(file)
--- a/
src/jexer/io/Screen.java
+++ b/
src/jexer/backend/LogicalScreen.java
@@
-26,17
+26,16
@@
* @author Kevin Lamonte [kevin.lamonte@gmail.com]
* @version 1
*/
* @author Kevin Lamonte [kevin.lamonte@gmail.com]
* @version 1
*/
-package jexer.
io
;
+package jexer.
backend
;
import jexer.bits.Cell;
import jexer.bits.CellAttributes;
import jexer.bits.GraphicsChars;
/**
import jexer.bits.Cell;
import jexer.bits.CellAttributes;
import jexer.bits.GraphicsChars;
/**
- * This class represents a text-based screen. Drawing operations write to a
- * logical screen.
+ * A logical screen composed of a 2D array of Cells.
*/
*/
-public
abstract clas
s Screen {
+public
class LogicalScreen implement
s Screen {
/**
* Width of the visible window.
/**
* Width of the visible window.
@@
-551,7
+550,7
@@
public abstract class Screen {
/**
* Public constructor. Sets everything to not-bold, white-on-black.
*/
/**
* Public constructor. Sets everything to not-bold, white-on-black.
*/
- protected Screen() {
+ protected
Logical
Screen() {
offsetX = 0;
offsetY = 0;
width = 80;
offsetX = 0;
offsetY = 0;
width = 80;
@@
-747,10
+746,9
@@
public abstract class Screen {
}
/**
}
/**
- * Subclasses must provide an implementation to push the logical screen
- * to the physical device.
+ * Default implementation does nothing.
*/
*/
- public
abstract void flushPhysical();
+ public
void flushPhysical() {}
/**
* Put the cursor at (x,y).
/**
* Put the cursor at (x,y).
@@
-772,4
+770,12
@@
public abstract class Screen {
public final void hideCursor() {
cursorVisible = false;
}
public final void hideCursor() {
cursorVisible = false;
}
+
+ /**
+ * Set the window title. Default implementation does nothing.
+ *
+ * @param title the new title
+ */
+ public void setTitle(final String title) {}
+
}
}