Skip to content

Commit 2e32c56

Browse files
committed
SwingConsolePane: add a couple of handy methods
It is nice, for testing purposes, to be able to interrogate some of the console pane's UI components.
1 parent 4a56ce9 commit 2e32c56

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/org/scijava/ui/swing/console/SwingConsolePane.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,16 @@ public void setWindow(final Component window) {
9292
this.window = window;
9393
}
9494

95+
public JTextPane getTextPane() {
96+
if (consolePanel == null) initConsolePanel();
97+
return textPane;
98+
}
99+
100+
public JScrollPane getScrollPane() {
101+
if (consolePanel == null) initConsolePanel();
102+
return scrollPane;
103+
}
104+
95105
// -- ConsolePane methods --
96106

97107
@Override

0 commit comments

Comments
 (0)