From 5def17f4fa5a649831c2c420f4b98e9c1c78a59c Mon Sep 17 00:00:00 2001 From: fros4943 Date: Wed, 19 Mar 2008 15:26:18 +0000 Subject: [PATCH] one touch expandable split panes --- .../sics/cooja/mspmote/plugins/MspCodeWatcher.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/plugins/MspCodeWatcher.java b/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/plugins/MspCodeWatcher.java index ed12c972d..528dbcd55 100644 --- a/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/plugins/MspCodeWatcher.java +++ b/tools/cooja/apps/mspsim/src/se/sics/cooja/mspmote/plugins/MspCodeWatcher.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: MspCodeWatcher.java,v 1.3 2008/03/19 15:17:22 fros4943 Exp $ + * $Id: MspCodeWatcher.java,v 1.4 2008/03/19 15:26:18 fros4943 Exp $ */ package se.sics.cooja.mspmote.plugins; @@ -105,6 +105,8 @@ public class MspCodeWatcher extends VisPlugin { new JScrollPane(instructionsUI, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED), new JScrollPane(breakpointsUI, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED) ); + leftPanel.setOneTouchExpandable(true); + leftPanel.setResizeWeight(0.5); JPanel controlPanel = new JPanel(); @@ -173,11 +175,15 @@ public class MspCodeWatcher extends VisPlugin { }); controlPanel.add(stepButton); - add(BorderLayout.CENTER, new JSplitPane( + JSplitPane splitPane = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT, leftPanel, - new JScrollPane(codeUI) - )); + new JScrollPane(codeUI)); + splitPane.setOneTouchExpandable(true); + splitPane.setResizeWeight(0.1); + + add(BorderLayout.CENTER, splitPane); + add(BorderLayout.SOUTH, controlPanel); add(BorderLayout.NORTH, topPanel);