1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.xmlhammer.gui.output;
23
24 import java.awt.BorderLayout;
25
26 import javax.swing.JScrollPane;
27
28 import org.xmlhammer.gui.util.ConsolePane;
29
30 /***
31 * Log Panel.
32 *
33 * @version $Revision$, $Date$
34 * @author Edwin Dankert <edankert@gmail.com>
35 */
36
37 public class ConsolePanel extends SearchablePanel {
38
39 private static final long serialVersionUID = -8240982226071212475L;
40
41 private ConsolePane consolePane = null;
42
43 /***
44 * Constructs a new Input Panel.
45 */
46 public ConsolePanel() {
47 super( new BorderLayout());
48
49 consolePane = new ConsolePane();
50 JScrollPane scrollPane = new JScrollPane(consolePane,
51 JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
52 JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
53 add( scrollPane, BorderLayout.CENTER);
54 }
55
56 public boolean search(String search, boolean matchCase, boolean forward) {
57 return search(consolePane, search, matchCase, forward);
58 }
59
60 public void start(Thread thread) {
61 consolePane.start(thread);
62 }
63
64 public void stop(Thread thread) {
65 consolePane.stop(thread);
66 }
67 }