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
stub maven support
[fanfix.git]
/
src
/
jexer
/
io
/
ECMA48Screen.java
diff --git
a/src/jexer/io/ECMA48Screen.java
b/src/jexer/io/ECMA48Screen.java
index 4c3af185db87b929a26aa2447406d75c0000d921..9daf6de2064428c063aa0da556b7a0664ef6fd30 100644
(file)
--- a/
src/jexer/io/ECMA48Screen.java
+++ b/
src/jexer/io/ECMA48Screen.java
@@
-3,7
+3,7
@@
*
* The MIT License (MIT)
*
*
* The MIT License (MIT)
*
- * Copyright (C) 201
6
Kevin Lamonte
+ * Copyright (C) 201
7
Kevin Lamonte
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@
-40,7
+40,7
@@
public final class ECMA48Screen extends Screen {
/**
* Emit debugging to stderr.
*/
/**
* Emit debugging to stderr.
*/
- private boolean debugToStderr;
+ private boolean debugToStderr
= false
;
/**
* We call terminal.cursor() so need the instance.
/**
* We call terminal.cursor() so need the instance.
@@
-53,8
+53,6
@@
public final class ECMA48Screen extends Screen {
* @param terminal ECMA48Terminal to use
*/
public ECMA48Screen(final ECMA48Terminal terminal) {
* @param terminal ECMA48Terminal to use
*/
public ECMA48Screen(final ECMA48Terminal terminal) {
- debugToStderr = false;
-
this.terminal = terminal;
// Query the screen size
this.terminal = terminal;
// Query the screen size
@@
-118,7
+116,7
@@
public final class ECMA48Screen extends Screen {
for (int i = x; i < width; i++) {
assert (logical[i][y].isBlank());
for (int i = x; i < width; i++) {
assert (logical[i][y].isBlank());
- // Physical is always update
s
d
+ // Physical is always updated
physical[i][y].reset();
}
physical[i][y].reset();
}
@@
-137,8
+135,8
@@
public final class ECMA48Screen extends Screen {
&& (lCell.isBlink() == lastAttr.isBlink())
) {
// Both colors changed, attributes the same
&& (lCell.isBlink() == lastAttr.isBlink())
) {
// Both colors changed, attributes the same
- sb.append(terminal.color(lCell.
getForeColor
(),
- lCell.getBackColor()));
+ sb.append(terminal.color(lCell.
isBold
(),
+ lCell.get
ForeColor(), lCell.get
BackColor()));
if (debugToStderr) {
System.err.printf("1 Change only fore/back colors\n");
if (debugToStderr) {
System.err.printf("1 Change only fore/back colors\n");
@@
-169,7
+167,8
@@
public final class ECMA48Screen extends Screen {
) {
// Attributes same, foreColor different
) {
// Attributes same, foreColor different
- sb.append(terminal.color(lCell.getForeColor(), true));
+ sb.append(terminal.color(lCell.isBold(),
+ lCell.getForeColor(), true));
if (debugToStderr) {
System.err.printf("3 Change foreColor\n");
if (debugToStderr) {
System.err.printf("3 Change foreColor\n");
@@
-182,7
+181,8
@@
public final class ECMA48Screen extends Screen {
&& (lCell.isBlink() == lastAttr.isBlink())
) {
// Attributes same, backColor different
&& (lCell.isBlink() == lastAttr.isBlink())
) {
// Attributes same, backColor different
- sb.append(terminal.color(lCell.getBackColor(), false));
+ sb.append(terminal.color(lCell.isBold(),
+ lCell.getBackColor(), false));
if (debugToStderr) {
System.err.printf("4 Change backColor\n");
if (debugToStderr) {
System.err.printf("4 Change backColor\n");
@@
-282,4
+282,15
@@
public final class ECMA48Screen extends Screen {
terminal.getOutput().write(result);
terminal.flush();
}
terminal.getOutput().write(result);
terminal.flush();
}
+
+ /**
+ * Set the window title.
+ *
+ * @param title the new title
+ */
+ public void setTitle(final String title) {
+ terminal.getOutput().write(terminal.setTitle(title));
+ terminal.flush();
+ }
+
}
}