ironed out several problems with text editor

This commit is contained in:
benfry
2002-11-18 21:48:14 +00:00
parent 49566de9fc
commit 8a1f6e53bb
6 changed files with 234 additions and 79 deletions

View File

@@ -72,6 +72,15 @@ public class PdeEditorConsole extends Component {
lineCount = PdeBase.getInteger("editor.console.lines", 6);
maxLineCount = 1000;
lines = new String[maxLineCount];
isError = new boolean[maxLineCount];
for (int i = 0; i < maxLineCount; i++) {
lines[i] = "";
isError[i] = false;
}
firstLine = 0;
if (systemOut == null) {
systemOut = System.out;
systemErr = System.err;
@@ -105,19 +114,12 @@ public class PdeEditorConsole extends Component {
consoleErr =
new PrintStream(new PdeEditorConsoleStream(this, true, stderrFile));
/*
System.setOut(consoleOut);
System.setErr(consoleErr);
*/
}
maxLineCount = 1000;
lines = new String[maxLineCount];
isError = new boolean[maxLineCount];
for (int i = 0; i < maxLineCount; i++) {
lines[i] = "";
isError[i] = false;
}
firstLine = 0;
addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
int x = e.getX();
@@ -140,7 +142,7 @@ public class PdeEditorConsole extends Component {
public void update() {
System.out.println("PdeEditorConsole.update");
//System.out.println("PdeEditorConsole.update");
Graphics g = this.getGraphics();
if (g != null) paint(g);
}
@@ -150,6 +152,8 @@ public class PdeEditorConsole extends Component {
}
public void paint(Graphics screen) {
if (screen == null) return;
//systemOut.println("paint()");
if (bgColor == null) {