From 3b9b2eb5017b3267ff23be0f019e9104d4962c0f Mon Sep 17 00:00:00 2001 From: "grail%cafebabe.org" Date: Tue, 9 Feb 1999 08:28:06 +0000 Subject: [PATCH] Layouts are now rearranged correctly. --- grendel/ui/UnifiedMessageDisplayManager.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/grendel/ui/UnifiedMessageDisplayManager.java b/grendel/ui/UnifiedMessageDisplayManager.java index b4b9d08ac96..1c7be7908e6 100644 --- a/grendel/ui/UnifiedMessageDisplayManager.java +++ b/grendel/ui/UnifiedMessageDisplayManager.java @@ -244,15 +244,17 @@ class UnifiedMessageFrame extends GeneralFrame { } void layoutPanels(String layout) { + boolean touch = true; + if (fLayout != null) { if (fLayout.equals(layout)) { return; // nothing to do } if (fLayout.equals(UnifiedMessageDisplayManager.STACKED)) { - splitter1.removeAll(); + remove(splitter1); } else { - splitter1.removeAll(); - splitter2.removeAll(); + remove(splitter1); + remove(splitter2); } fPanel.remove(splitter1); } @@ -298,6 +300,7 @@ class UnifiedMessageFrame extends GeneralFrame { // fStackedLayoutAction.setSelected(IUICmd.kSelected); } else if (layout.equals(UnifiedMessageDisplayManager.SPLIT_LEFT)) { + System.out.println("Foo"); splitter1.setOrientation(JSplitPane.HORIZONTAL_SPLIT); splitter2.setOrientation(JSplitPane.VERTICAL_SPLIT); @@ -476,16 +479,17 @@ class UnifiedMessageFrame extends GeneralFrame { class LayoutAction extends UIAction { ImageIcon fIcon; + String action; public LayoutAction(String aAction) { super(aAction); setEnabled(true); - + action = aAction; fIcon = new ImageIcon(getClass().getResource("images/" + aAction + ".gif")); } public void actionPerformed(ActionEvent aEvent) { - layoutPanels(aEvent.getActionCommand()); + layoutPanels(action); } public ImageIcon getEnabledIcon() {