*/
@Override
public String toString() {
- return String.format("fore: %d back: %d bold: %s blink: %s ch %c",
+ return String.format("fore: %s back: %s bold: %s blink: %s ch %c",
getForeColor(), getBackColor(), isBold(), isBlink(), ch);
}
}
/**
* Emit debugging to stderr.
*/
- private boolean debugToStderr;
+ private boolean debugToStderr = false;
/**
* We call terminal.cursor() so need the instance.
* @param terminal ECMA48Terminal to use
*/
public ECMA48Screen(final ECMA48Terminal terminal) {
- debugToStderr = false;
-
this.terminal = terminal;
// Query the screen size
sb.append("\033[0;");
}
sb.append(String.format("%d;%dm", ecmaForeColor, ecmaBackColor));
- return sb.toString() + rgbColor(bold, foreColor, backColor);
+ sb.append(rgbColor(bold, foreColor, backColor));
+ return sb.toString();
}
/**
* e.g. "\033[0m"
*/
String normal() {
- return normal(true);
+ return normal(true) + rgbColor(false, Color.WHITE, Color.BLACK);
}
/**