X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FCalculationChooser.java;h=097a5a0f3e7fef8a64bc082bcf77a353543e9b4e;hb=3da878124135ff033f42d19d8733891b09e953cd;hp=f0d9521a9cdc1dca6b8198105c5dd2d087f0f2c1;hpb=82de3ff949ae61b771136fbdb49baacc20e652fd;p=jalview.git diff --git a/src/jalview/gui/CalculationChooser.java b/src/jalview/gui/CalculationChooser.java index f0d9521..097a5a0 100644 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@ -156,12 +156,15 @@ public class CalculationChooser extends JPanel pca = new JRadioButton( MessageManager.getString("label.principal_component_analysis")); pca.setOpaque(false); + neighbourJoining = new JRadioButton( MessageManager.getString("label.tree_calc_nj")); neighbourJoining.setSelected(true); + neighbourJoining.setOpaque(false); + averageDistance = new JRadioButton( MessageManager.getString("label.tree_calc_av")); - neighbourJoining.setOpaque(false); + averageDistance.setOpaque(false); JPanel calcChoicePanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); calcChoicePanel.setOpaque(false); @@ -271,9 +274,9 @@ public class CalculationChooser extends JPanel setMinimumSize(new Dimension(325, height - 10)); String title = MessageManager.getString("label.choose_calculation"); - if (af.getViewport().viewName != null) + if (af.getViewport().getViewName() != null) { - title = title + " (" + af.getViewport().viewName + ")"; + title = title + " (" + af.getViewport().getViewName() + ")"; } Desktop.addInternalFrame(frame, title, width, height, false); @@ -291,6 +294,7 @@ public class CalculationChooser extends JPanel }; }); + validateCalcTypes(); frame.setLayer(JLayeredPane.PALETTE_LAYER); } @@ -584,7 +588,13 @@ public class CalculationChooser extends JPanel JvOptionPane.WARNING_MESSAGE); return; } + + /* + * construct the panel and kick off its calculation thread + */ pcaPanel = new PCAPanel(af.alignPanel, modelName, params); + new Thread(pcaPanel).start(); + } /**