Share

JvTelnet

Tracker: Bugs

5 color display not properly handled - ID: 1025202
Last Update: Comment added ( nobody )

in VTerminal
line 1133:
case 'm':
if (cnt <= 0)
{ term.setStyle(ATerminal.Style.PLAIN
term.setForeColor(0);
term.setBackColor(0);
is wrong because it should in fact restore terminal default.

you should create a new method in ATerminal
abstract public void setDefaultFormat() ;

and implement it as follow in JTerminal
public void setDefaultFormat() {
setStyle(Style.PLAIN);
setBackColor(DEFAULT.BACK) ;
setForeColor(DEFAULT.TEXT);
}

and then replace previous code in VTerminal by
case 'm':
if (cnt <= 0)
{ term.setDefaultFormat();


then, in JTerminal.java if you uncomment the code included in
setForeColor and setBackColor, color are displayed athough not
correctly (wrong order?).

hope this helps.


Nobody/Anonymous ( nobody ) - 2004-09-09 15:34

5

Open

None

Nobody/Anonymous

None

None

Public


Comment ( 1 )




Date: 2005-01-16 18:13
Sender: nobody

Logged In: NO

Yay...thanks, that worked for me :)

Changing the colour array in JTerminal into this one gave me
the correct display.

final static Color COLORS[] = {
COLOR.BLACK,
COLOR.GRAY,
COLOR.RED,
COLOR.GREEN,
COLOR.YELLOW,
COLOR.BLUE,
COLOR.VIOLET,
COLOR.TURQUOISE,
COLOR.WHITE,
COLOR.DARK_GRAY,
COLOR.DARK_YELLOW,
COLOR.DARK_VIOLET,
COLOR.DARK_RED,
COLOR.DARK_BLUE,
COLOR.DARK_GREEN,
COLOR.DARK_TURQUOISE };

--


Log in to comment.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.