summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-20 21:44:24 +0000
committerPaul Buetow <paul@buetow.org>2008-05-20 21:44:24 +0000
commit3958e0e3f754a0e4a7760bf86ed5a79999f29ccc (patch)
tree6ef9c1b8c507666d8350733fa52a5dc95e49a4ae
parente2f8fdc3156040f47264871ded692a3fb90df779 (diff)
The logging now wraps the text.
-rw-r--r--sources/simulator/VSLogging.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/sources/simulator/VSLogging.java b/sources/simulator/VSLogging.java
index 547d598..5b5eb26 100644
--- a/sources/simulator/VSLogging.java
+++ b/sources/simulator/VSLogging.java
@@ -11,7 +11,7 @@ public class VSLogging {
private String filterText;
private ArrayList<StringBuffer> pauseLines;
private ArrayList<StringBuffer> loggingLines;
- private VSSimulationPanel simulationPanel;
+ private VSSimulationCanvas simulationCanvas;
private boolean isFiltered;
private boolean isPaused;
private Pattern filterPattern;
@@ -19,13 +19,15 @@ public class VSLogging {
public VSLogging() {
loggingArea = new JTextArea(0, 0);
loggingArea.setEditable(false);
+ loggingArea.setLineWrap(true);
+ loggingArea.setWrapStyleWord(true);
loggingLines = new ArrayList<StringBuffer>();
pauseLines = new ArrayList<StringBuffer>();
filterText = "";
}
- public void setSimulationPanel(VSSimulationPanel simulationPanel) {
- this.simulationPanel = simulationPanel;
+ public void setSimulationCanvas(VSSimulationCanvas simulationCanvas) {
+ this.simulationCanvas = simulationCanvas;
}
public JTextArea getLoggingArea() {
@@ -33,10 +35,10 @@ public class VSLogging {
}
public void logg(String message) {
- if (simulationPanel == null)
+ if (simulationCanvas == null)
logg(message, 0);
else
- logg(message, simulationPanel.getTime());
+ logg(message, simulationCanvas.getTime());
}
public synchronized void logg(String message, long time) {