Whoops - make status bar visible again.

git-svn-id: file:///home/svn/framework3/trunk@13732 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Matt Weeks 2011-09-15 00:29:11 +00:00
parent b72ca9dcc8
commit 0293417c29
3 changed files with 19 additions and 6 deletions

Binary file not shown.

View File

@ -23,6 +23,7 @@ import java.util.Set;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JSplitPane;
import javax.swing.JTabbedPane;
@ -185,8 +186,10 @@ public class DraggableTabbedPane extends JTabbedPane{
//If we got rid of the last tab, close this window, unless it's the main window
if(getTabCount() < 1 && MsfguiApp.mainFrame != null //This can be referenced in constructor
&& paneParent != MsfguiApp.mainFrame.getFrame()){
&& paneParent != MsfguiApp.mainFrame.getFrame().getContentPane()){
panes.remove(this);
if(paneParent instanceof JPanel)
paneParent = ((JPanel)paneParent).getTopLevelAncestor();
//If parent is a frame, just close it
if(paneParent instanceof JFrame){
paneParent.setVisible(false);
@ -428,6 +431,11 @@ public class DraggableTabbedPane extends JTabbedPane{
splitParent.setLeftComponent(split);
}
splitParent.setDividerLocation(0.5);
}else if (paneParent instanceof JPanel){
paneParent.removeAll();
paneParent.setLayout(new java.awt.GridLayout());
paneParent.add(split);
((JPanel)paneParent).validate();
}
split.setDividerLocation(0.5);
paneParent = split;

View File

@ -137,11 +137,13 @@ public class MainFrame extends FrameView {
if(!props.containsKey("tabWindowPreference"))
props.put("tabWindowPreference", "tab");
if(props.containsKey("tabLayout")){
java.awt.Container mainPane = getFrame().getContentPane();
Component realigned = DraggableTabbedPane.restoreSplitLayout(
props.get("tabLayout"), getFrame(), (DraggableTabbedPane)tabbedPane);
mainPane.removeAll();
mainPane.add(realigned);
props.get("tabLayout"), mainPanel, (DraggableTabbedPane)tabbedPane);
if(realigned != null){
mainPanel.removeAll();
mainPanel.setLayout(new java.awt.GridLayout());
mainPanel.add(realigned);
}
}
MsfFrame.updateSizes(getFrame());
}
@ -445,7 +447,10 @@ nameloop: for (int i = 0; i < names.length; i++) {
//First try to connect to the database
DbConnectDialog.tryConnect(getFrame(), rpcConn);
reloadDb(true);
if(MainFrame.this.closeConsoleMenu.getItemCount() == 0 && !tabbedPane.isEnabledAt(3)){
//Find a database pane, and see if it is enabled (db successfuly loaded)
DraggableTabbedPane credsDTP = DraggableTabbedPane.getTabPane(credsPane);
if(MainFrame.this.closeConsoleMenu.getItemCount() == 0 &&
credsDTP.isEnabledAt(credsDTP.indexOfComponent(credsPane))){
registerConsole( (Map)rpcConn.execute("console.create"), false, "");
reloadDb(true);
}