diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-20 21:44:24 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-20 21:44:24 +0000 |
| commit | 3958e0e3f754a0e4a7760bf86ed5a79999f29ccc (patch) | |
| tree | 6ef9c1b8c507666d8350733fa52a5dc95e49a4ae /sources/simulator/VSLogging.java | |
| parent | e2f8fdc3156040f47264871ded692a3fb90df779 (diff) | |
The logging now wraps the text.
Diffstat (limited to 'sources/simulator/VSLogging.java')
| -rw-r--r-- | sources/simulator/VSLogging.java | 12 |
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) { |
