X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FJDatabaseTree.java;h=d92f6c088e11de324707878ff3d3997b74be78f6;hb=136c0793b90b72b928c4d77dc109dd5c644e00d3;hp=2a3d7887d9454c0066b60f09430ed894d37945ed;hpb=8677e6e34e291edc58c1da2fc9c958473754143f;p=jalview.git diff --git a/src/jalview/gui/JDatabaseTree.java b/src/jalview/gui/JDatabaseTree.java index 2a3d788..d92f6c0 100644 --- a/src/jalview/gui/JDatabaseTree.java +++ b/src/jalview/gui/JDatabaseTree.java @@ -88,9 +88,12 @@ public class JDatabaseTree extends JalviewDialog implements KeyListener private JLabel dbstatus, dbstatex; + private JPanel mainPanel = new JPanel(new BorderLayout()); + public JDatabaseTree(jalview.ws.SequenceFetcher sfetch) { - initDialogFrame(this, true, false, + mainPanel.add(this); + initDialogFrame(mainPanel, true, false, MessageManager .getString("label.select_database_retrieval_source"), 650, 490); @@ -148,19 +151,19 @@ public class JDatabaseTree extends JalviewDialog implements KeyListener } // and sort the tree sortTreeNodes(root); - svp = new JScrollPane(); - // svp.setAutoscrolls(true); dbviews = new JTree(new DefaultTreeModel(root, false)); dbviews.setCellRenderer(new DbTreeRenderer(this)); dbviews.getSelectionModel().setSelectionMode( TreeSelectionModel.SINGLE_TREE_SELECTION); - svp.getViewport().setView(dbviews); - // svp.getViewport().setMinimumSize(new Dimension(300,200)); - // svp.setSize(300,250); - // JPanel panel=new JPanel(); - // panel.setSize(new Dimension(350,220)); - // panel.add(svp); + svp = new JScrollPane(dbviews); + svp.setMinimumSize(new Dimension(100, 200)); + svp.setPreferredSize(new Dimension(200, 400)); + svp.setMaximumSize(new Dimension(300, 600)); + + JPanel panel = new JPanel(new BorderLayout()); + panel.setSize(new Dimension(350, 220)); + panel.add(svp); dbviews.addTreeSelectionListener(new TreeSelectionListener() { @@ -200,7 +203,6 @@ public class JDatabaseTree extends JalviewDialog implements KeyListener dbstat.add(dbstatex); jc.add(dbstat, BorderLayout.SOUTH); jc.validate(); - // j.setPreferredSize(new Dimension(300,50)); add(jc, BorderLayout.CENTER); ok.setEnabled(false); j.add(ok);