diff --git a/uk/ac/sanger/artemis/components/ArtemisMain.java b/uk/ac/sanger/artemis/components/ArtemisMain.java index edbb2e7020d492d007f59df69f8e151e1005ba27..f939027f2317981b11c4ed2d24db2b71ebba79a9 100644 --- a/uk/ac/sanger/artemis/components/ArtemisMain.java +++ b/uk/ac/sanger/artemis/components/ArtemisMain.java @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/components/ArtemisMain.java,v 1.22 2006-10-23 13:34:12 tjc Exp $ + * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/components/ArtemisMain.java,v 1.23 2006-10-23 15:14:13 tjc Exp $ */ package uk.ac.sanger.artemis.components; @@ -51,7 +51,7 @@ import javax.swing.JFrame; * The main window for the Artemis sequence editor. * * @author Kim Rutherford <kmr@sanger.ac.uk> - * @version $Id: ArtemisMain.java,v 1.22 2006-10-23 13:34:12 tjc Exp $ + * @version $Id: ArtemisMain.java,v 1.23 2006-10-23 15:14:13 tjc Exp $ **/ public class ArtemisMain extends Splash @@ -137,15 +137,12 @@ public class ArtemisMain extends Splash } }; - final boolean sanger_options = - Options.getOptions().getPropertyTruthValue("sanger_options"); + //final boolean sanger_options = + // Options.getOptions().getPropertyTruthValue("sanger_options"); -/* if(sanger_options) - { - makeMenuItem(file_menu, "Database Entry ...", menu_listener); - if(System.getProperty("chado") != null) - fm = new LocalAndRemoteFileManager(ArtemisMain.this); - }*/ + //makeMenuItem(file_menu, "Database Entry ...", menu_listener); + if(System.getProperty("chado") != null) + fm = new LocalAndRemoteFileManager(ArtemisMain.this); menu_listener = new ActionListener() { diff --git a/uk/ac/sanger/artemis/components/filetree/LocalAndRemoteFileManager.java b/uk/ac/sanger/artemis/components/filetree/LocalAndRemoteFileManager.java index 731b8e41a35cfae1e7482d9768c59d0239e12260..f6a97bd92553e382c656b0b7260fb5c47dafeece 100644 --- a/uk/ac/sanger/artemis/components/filetree/LocalAndRemoteFileManager.java +++ b/uk/ac/sanger/artemis/components/filetree/LocalAndRemoteFileManager.java @@ -144,16 +144,18 @@ public class LocalAndRemoteFileManager extends JFrame if(!entry_source.setLocation(true)) return; - JLabel label = new JLabel(" Database Loading..."); - JScrollPane dbScroll = new JScrollPane(label); + JLabel label = new JLabel(" Database Loading..."); + JPanel dbPane = new JPanel(); + dbPane.add(label); + dbPane.setPreferredSize(panelSize); + + JSplitPane mainSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT, + dbPane, treePane); DbConnectionThread dbthread = - new DbConnectionThread(dbScroll, panelSize, entry_source); + new DbConnectionThread(mainSplit, panelSize, entry_source); dbthread.start(); - dbScroll.setPreferredSize(panelSize); - - JSplitPane mainSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT, - dbScroll, treePane); + treePane.setDividerLocation((int)(screen.getHeight()/4)); mainSplit.setOneTouchExpandable(true); mainSplit.setDividerLocation((int)(screen.getHeight()/4)); @@ -569,17 +571,17 @@ public class LocalAndRemoteFileManager extends JFrame } - public class DbConnectionThread extends Thread + private class DbConnectionThread extends Thread { - private JScrollPane dbScroll; + private JSplitPane dbSplitPane; private Dimension panelSize; private DatabaseEntrySource entry_source; - public DbConnectionThread(final JScrollPane dbScroll, + public DbConnectionThread(final JSplitPane dbSplitPane, final Dimension panelSize, final DatabaseEntrySource entry_source) { - this.dbScroll = dbScroll; + this.dbSplitPane = dbSplitPane; this.panelSize = panelSize; this.entry_source = entry_source; } @@ -589,7 +591,7 @@ public class LocalAndRemoteFileManager extends JFrame final DatabaseJPanel dbPane = new DatabaseJPanel(entry_source, null); dbPane.setPreferredSize(panelSize); - dbScroll.setViewportView(dbPane); + dbSplitPane.setTopComponent(dbPane); } }