X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fjexer%2Fio%2FECMA48Screen.java;h=206c6e54392fe77df013c58a39f894e94b23dc75;hb=15ea4d7374314d856f72e83f3bc07fe9ec059741;hp=a00a1806e644b31857d58feddf14fdb0a5deffb7;hpb=5dfd1c11947e9cb32fcac4772f1b16879d9ffe67;p=fanfix.git diff --git a/src/jexer/io/ECMA48Screen.java b/src/jexer/io/ECMA48Screen.java index a00a180..206c6e5 100644 --- a/src/jexer/io/ECMA48Screen.java +++ b/src/jexer/io/ECMA48Screen.java @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (C) 2016 Kevin Lamonte + * Copyright (C) 2017 Kevin Lamonte * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -137,8 +137,8 @@ public final class ECMA48Screen extends Screen { && (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.getForeColor(), lCell.getBackColor())); if (debugToStderr) { System.err.printf("1 Change only fore/back colors\n"); @@ -169,7 +169,8 @@ public final class ECMA48Screen extends Screen { ) { // 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"); @@ -182,7 +183,8 @@ public final class ECMA48Screen extends Screen { && (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"); @@ -282,4 +284,15 @@ public final class ECMA48Screen extends Screen { 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(); + } + }