Layouts are now rearranged correctly.

git-svn-id: svn://10.0.0.236/trunk@20127 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
grail%cafebabe.org
1999-02-09 08:28:06 +00:00
parent 85a4bf1d8e
commit c193c19371

View File

@@ -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() {