X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGPCAPanel.java;h=a6498d2557b3e32b7597f8beecefb786d34d4ec4;hb=57738a1f3c19b1c3a00bd3ac5108f8cd0af32f99;hp=a1837940b31e8a5388df55cae431f47472f01473;hpb=3d0101179759ef157b088ea135423cd909512d9f;p=jalview.git diff --git a/src/jalview/jbgui/GPCAPanel.java b/src/jalview/jbgui/GPCAPanel.java index a183794..a6498d2 100755 --- a/src/jalview/jbgui/GPCAPanel.java +++ b/src/jalview/jbgui/GPCAPanel.java @@ -20,6 +20,7 @@ */ package jalview.jbgui; +import jalview.util.ImageMaker.TYPE; import jalview.util.MessageManager; import java.awt.BorderLayout; @@ -46,13 +47,11 @@ public class GPCAPanel extends JInternalFrame { private static final Font VERDANA_12 = new Font("Verdana", 0, 12); - protected JComboBox xCombobox = new JComboBox(); + protected JComboBox xCombobox = new JComboBox<>(); - protected JComboBox yCombobox = new JComboBox(); + protected JComboBox yCombobox = new JComboBox<>(); - protected JComboBox zCombobox = new JComboBox(); - - protected JMenu scoreModelMenu = new JMenu(); + protected JComboBox zCombobox = new JComboBox<>(); protected JMenu viewMenu = new JMenu(); @@ -60,16 +59,15 @@ public class GPCAPanel extends JInternalFrame protected JMenu associateViewsMenu = new JMenu(); - protected JMenu calcSettings = new JMenu(); - - protected JCheckBoxMenuItem nuclSetting = new JCheckBoxMenuItem(); - - protected JCheckBoxMenuItem protSetting = new JCheckBoxMenuItem(); - protected JLabel statusBar = new JLabel(); protected JPanel statusPanel = new JPanel(); + protected JMenuItem originalSeqData; + + /** + * Constructor + */ public GPCAPanel() { try @@ -90,6 +88,7 @@ public class GPCAPanel extends JInternalFrame private void jbInit() throws Exception { + setName("jalview-pca"); this.getContentPane().setLayout(new BorderLayout()); JPanel jPanel2 = new JPanel(); jPanel2.setLayout(new FlowLayout()); @@ -110,7 +109,7 @@ public class GPCAPanel extends JInternalFrame @Override public void actionPerformed(ActionEvent e) { - zCombobox_actionPerformed(e); + doDimensionChange(); } }); yCombobox.setFont(VERDANA_12); @@ -119,7 +118,7 @@ public class GPCAPanel extends JInternalFrame @Override public void actionPerformed(ActionEvent e) { - yCombobox_actionPerformed(e); + doDimensionChange(); } }); xCombobox.setFont(VERDANA_12); @@ -128,7 +127,7 @@ public class GPCAPanel extends JInternalFrame @Override public void actionPerformed(ActionEvent e) { - xCombobox_actionPerformed(e); + doDimensionChange(); } }); JButton resetButton = new JButton(); @@ -139,7 +138,7 @@ public class GPCAPanel extends JInternalFrame @Override public void actionPerformed(ActionEvent e) { - resetButton_actionPerformed(e); + resetButton_actionPerformed(); } }); JMenu fileMenu = new JMenu(); @@ -152,7 +151,7 @@ public class GPCAPanel extends JInternalFrame @Override public void actionPerformed(ActionEvent e) { - eps_actionPerformed(e); + makePCAImage(TYPE.EPS); } }); JMenuItem png = new JMenuItem("PNG"); @@ -161,7 +160,7 @@ public class GPCAPanel extends JInternalFrame @Override public void actionPerformed(ActionEvent e) { - png_actionPerformed(e); + makePCAImage(TYPE.PNG); } }); JMenuItem outputValues = new JMenuItem(); @@ -171,7 +170,7 @@ public class GPCAPanel extends JInternalFrame @Override public void actionPerformed(ActionEvent e) { - outputValues_actionPerformed(e); + outputValues_actionPerformed(); } }); JMenuItem outputPoints = new JMenuItem(); @@ -181,7 +180,7 @@ public class GPCAPanel extends JInternalFrame @Override public void actionPerformed(ActionEvent e) { - outputPoints_actionPerformed(e); + outputPoints_actionPerformed(); } }); JMenuItem outputProjPoints = new JMenuItem(); @@ -192,7 +191,7 @@ public class GPCAPanel extends JInternalFrame @Override public void actionPerformed(ActionEvent e) { - outputProjPoints_actionPerformed(e); + outputProjPoints_actionPerformed(); } }); JMenuItem print = new JMenuItem(); @@ -202,7 +201,7 @@ public class GPCAPanel extends JInternalFrame @Override public void actionPerformed(ActionEvent e) { - print_actionPerformed(e); + print_actionPerformed(); } }); viewMenu.setText(MessageManager.getString("action.view")); @@ -224,33 +223,13 @@ public class GPCAPanel extends JInternalFrame { } }); - scoreModelMenu - .setText(MessageManager.getString("label.select_score_model")); - scoreModelMenu.addMenuListener(new MenuListener() - { - @Override - public void menuSelected(MenuEvent e) - { - scoreModel_menuSelected(); - } - - @Override - public void menuDeselected(MenuEvent e) - { - } - - @Override - public void menuCanceled(MenuEvent e) - { - } - }); showLabels.setText(MessageManager.getString("label.show_labels")); showLabels.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - showLabels_actionPerformed(e); + showLabels_actionPerformed(); } }); JMenuItem bgcolour = new JMenuItem(); @@ -260,47 +239,22 @@ public class GPCAPanel extends JInternalFrame @Override public void actionPerformed(ActionEvent e) { - bgcolour_actionPerformed(e); + bgcolour_actionPerformed(); } }); - JMenuItem originalSeqData = new JMenuItem(); + originalSeqData = new JMenuItem(); originalSeqData.setText(MessageManager.getString("label.input_data")); originalSeqData.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - originalSeqData_actionPerformed(e); + originalSeqData_actionPerformed(); } }); associateViewsMenu.setText( MessageManager.getString("label.associate_nodes_with")); - calcSettings.setText(MessageManager.getString("action.change_params")); - nuclSetting - .setText(MessageManager.getString("label.nucleotide_matrix")); - protSetting.setText(MessageManager.getString("label.protein_matrix")); - nuclSetting.addActionListener(new ActionListener() - { - - @Override - public void actionPerformed(ActionEvent arg0) - { - nuclSetting_actionPerfomed(arg0); - } - }); - protSetting.addActionListener(new ActionListener() - { - - @Override - public void actionPerformed(ActionEvent arg0) - { - protSetting_actionPerfomed(arg0); - } - }); - calcSettings.add(nuclSetting); - calcSettings.add(protSetting); - calcSettings.add(scoreModelMenu); statusPanel.setLayout(new GridLayout()); statusBar.setFont(VERDANA_12); // statusPanel.setBackground(Color.lightGray); @@ -321,7 +275,6 @@ public class GPCAPanel extends JInternalFrame JMenuBar jMenuBar1 = new JMenuBar(); jMenuBar1.add(fileMenu); jMenuBar1.add(viewMenu); - jMenuBar1.add(calcSettings); setJMenuBar(jMenuBar1); fileMenu.add(saveMenu); fileMenu.add(outputValues); @@ -336,91 +289,47 @@ public class GPCAPanel extends JInternalFrame viewMenu.add(associateViewsMenu); } - protected void scoreModel_menuSelected() - { - // TODO Auto-generated method stub - - } - - protected void resetButton_actionPerformed(ActionEvent e) - { - // TODO Auto-generated method stub - - } - - protected void protSetting_actionPerfomed(ActionEvent arg0) - { - // TODO Auto-generated method stub - - } - - protected void nuclSetting_actionPerfomed(ActionEvent arg0) - { - // TODO Auto-generated method stub - - } - - protected void outputPoints_actionPerformed(ActionEvent e) - { - // TODO Auto-generated method stub - - } - - protected void outputProjPoints_actionPerformed(ActionEvent e) - { - // TODO Auto-generated method stub - - } - - protected void xCombobox_actionPerformed(ActionEvent e) + protected void resetButton_actionPerformed() { } - protected void yCombobox_actionPerformed(ActionEvent e) + protected void outputPoints_actionPerformed() { } - protected void zCombobox_actionPerformed(ActionEvent e) + protected void outputProjPoints_actionPerformed() { } - public void eps_actionPerformed(ActionEvent e) + public void makePCAImage(TYPE imageType) { - } - public void png_actionPerformed(ActionEvent e) + protected void outputValues_actionPerformed() { - } - public void outputValues_actionPerformed(ActionEvent e) + protected void print_actionPerformed() { - } - public void print_actionPerformed(ActionEvent e) + protected void showLabels_actionPerformed() { - } - public void showLabels_actionPerformed(ActionEvent e) + protected void bgcolour_actionPerformed() { - } - public void bgcolour_actionPerformed(ActionEvent e) + protected void originalSeqData_actionPerformed() { - } - public void originalSeqData_actionPerformed(ActionEvent e) + protected void viewMenu_menuSelected() { - } - public void viewMenu_menuSelected() + protected void doDimensionChange() { - } }