X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGTreePanel.java;h=6130204ef5484018346fef6e1b296c730e1775b3;hb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;hp=a70920ce0fc8e407e85a8cac95e2cdc4cd1f6e6e;hpb=55e2e9b22b133db8b9ff0979b0338a33081fc8fd;p=jalview.git diff --git a/src/jalview/jbgui/GTreePanel.java b/src/jalview/jbgui/GTreePanel.java index a70920c..6130204 100755 --- a/src/jalview/jbgui/GTreePanel.java +++ b/src/jalview/jbgui/GTreePanel.java @@ -1,210 +1,298 @@ -/* - * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ -package jalview.jbgui; - -import java.awt.*; -import java.awt.event.*; -import javax.swing.*; - -public class GTreePanel - extends JInternalFrame -{ - BorderLayout borderLayout1 = new BorderLayout(); - public JScrollPane scrollPane = new JScrollPane(); - JMenuBar jMenuBar1 = new JMenuBar(); - JMenu jMenu1 = new JMenu(); - JMenuItem saveAsNewick = new JMenuItem(); - JMenuItem printMenu = new JMenuItem(); - JMenu jMenu2 = new JMenu(); - public JMenuItem font = new JMenuItem(); - public JCheckBoxMenuItem bootstrapMenu = new JCheckBoxMenuItem(); - public JCheckBoxMenuItem distanceMenu = new JCheckBoxMenuItem(); - public JCheckBoxMenuItem fitToWindow = new JCheckBoxMenuItem(); - public JCheckBoxMenuItem placeholdersMenu = new JCheckBoxMenuItem(); - JMenuItem pngTree = new JMenuItem(); - JMenuItem epsTree = new JMenuItem(); - JMenu saveAsMenu = new JMenu(); - JMenuItem textbox = new JMenuItem(); - public GTreePanel() - { - try - { - jbInit(); - this.setJMenuBar(jMenuBar1); - } - catch (Exception e) - { - e.printStackTrace(); - } - } - - private void jbInit() - throws Exception - { - this.getContentPane().setLayout(borderLayout1); - this.setBackground(Color.white); - this.setFont(new java.awt.Font("Verdana", 0, 12)); - scrollPane.setOpaque(false); - jMenu1.setText("File"); - saveAsNewick.setText("Newick Format"); - saveAsNewick.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - saveAsNewick_actionPerformed(e); - } - }); - printMenu.setText("Print"); - printMenu.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - printMenu_actionPerformed(e); - } - }); - jMenu2.setText("View"); - font.setText("Font..."); - font.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - font_actionPerformed(e); - } - }); - bootstrapMenu.setText("Show Bootstrap Values"); - bootstrapMenu.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - bootstrapMenu_actionPerformed(e); - } - }); - distanceMenu.setText("Show Distances"); - distanceMenu.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - distanceMenu_actionPerformed(e); - } - }); - fitToWindow.setSelected(true); - fitToWindow.setText("Fit To Window"); - fitToWindow.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - fitToWindow_actionPerformed(e); - } - }); - epsTree.setText("EPS"); - epsTree.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - epsTree_actionPerformed(e); - } - }); - pngTree.setText("PNG"); - pngTree.addActionListener(new java.awt.event.ActionListener() - { - public void actionPerformed(ActionEvent e) - { - pngTree_actionPerformed(e); - } - }); - saveAsMenu.setText("Save as"); - placeholdersMenu.setToolTipText( - "Marks leaves of tree not associated with a sequence"); - placeholdersMenu.setText("Mark Unlinked Leaves"); - placeholdersMenu.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - placeholdersMenu_actionPerformed(e); - } - }); - textbox.setText("Output to Textbox..."); - textbox.addActionListener(new ActionListener() - { - public void actionPerformed(ActionEvent e) - { - textbox_actionPerformed(e); - } - }); - this.getContentPane().add(scrollPane, BorderLayout.CENTER); - jMenuBar1.add(jMenu1); - jMenuBar1.add(jMenu2); - jMenu1.add(saveAsMenu); - jMenu1.add(textbox); - jMenu1.add(printMenu); - jMenu2.add(fitToWindow); - jMenu2.add(font); - jMenu2.add(distanceMenu); - jMenu2.add(bootstrapMenu); - jMenu2.add(placeholdersMenu); - saveAsMenu.add(saveAsNewick); - saveAsMenu.add(epsTree); - saveAsMenu.add(pngTree); - } - - public void printMenu_actionPerformed(ActionEvent e) - { - } - - public void font_actionPerformed(ActionEvent e) - { - } - - public void distanceMenu_actionPerformed(ActionEvent e) - { - } - - public void bootstrapMenu_actionPerformed(ActionEvent e) - { - } - - public void fitToWindow_actionPerformed(ActionEvent e) - { - } - - public void pngTree_actionPerformed(ActionEvent e) - { - } - - public void epsTree_actionPerformed(ActionEvent e) - { - } - - public void saveAsNewick_actionPerformed(ActionEvent e) - { - } - - public void placeholdersMenu_actionPerformed(ActionEvent e) - { - } - - public void textbox_actionPerformed(ActionEvent e) - { - } - - public void fullid_actionPerformed(ActionEvent e) - { - - } -} +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) + * Copyright (C) 2015 The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ +package jalview.jbgui; + +import jalview.util.MessageManager; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JCheckBoxMenuItem; +import javax.swing.JInternalFrame; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JScrollPane; +import javax.swing.event.MenuEvent; +import javax.swing.event.MenuListener; + +public class GTreePanel extends JInternalFrame +{ + BorderLayout borderLayout1 = new BorderLayout(); + + public JScrollPane scrollPane = new JScrollPane(); + + JMenuBar jMenuBar1 = new JMenuBar(); + + JMenu fileMenu = new JMenu(); + + JMenuItem saveAsNewick = new JMenuItem(); + + JMenuItem printMenu = new JMenuItem(); + + protected JMenu viewMenu = new JMenu(); + + public JMenuItem font = new JMenuItem(); + + public JMenuItem sortAssocViews = new JMenuItem(); + + public JCheckBoxMenuItem bootstrapMenu = new JCheckBoxMenuItem(); + + public JCheckBoxMenuItem distanceMenu = new JCheckBoxMenuItem(); + + public JCheckBoxMenuItem fitToWindow = new JCheckBoxMenuItem(); + + public JCheckBoxMenuItem placeholdersMenu = new JCheckBoxMenuItem(); + + JMenuItem pngTree = new JMenuItem(); + + JMenuItem epsTree = new JMenuItem(); + + JMenu saveAsMenu = new JMenu(); + + JMenuItem textbox = new JMenuItem(); + + public JMenuItem originalSeqData = new JMenuItem(); + + protected JMenu associateLeavesMenu = new JMenu(); + + public GTreePanel() + { + try + { + jbInit(); + this.setJMenuBar(jMenuBar1); + } catch (Exception e) + { + e.printStackTrace(); + } + } + + private void jbInit() throws Exception + { + this.getContentPane().setLayout(borderLayout1); + this.setBackground(Color.white); + this.setFont(new java.awt.Font("Verdana", 0, 12)); + scrollPane.setOpaque(false); + fileMenu.setText(MessageManager.getString("action.file")); + saveAsNewick.setText(MessageManager.getString("label.newick_format")); + saveAsNewick.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + saveAsNewick_actionPerformed(e); + } + }); + printMenu.setText(MessageManager.getString("action.print")); + printMenu.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + printMenu_actionPerformed(e); + } + }); + viewMenu.setText(MessageManager.getString("action.view")); + viewMenu.addMenuListener(new MenuListener() + { + public void menuSelected(MenuEvent e) + { + viewMenu_menuSelected(); + } + + public void menuDeselected(MenuEvent e) + { + } + + public void menuCanceled(MenuEvent e) + { + } + }); + sortAssocViews.setText(MessageManager + .getString("label.sort_alignment_by_tree")); + sortAssocViews.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + sortByTree_actionPerformed(); + } + }); + font.setText(MessageManager.getString("action.font")); + font.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + font_actionPerformed(e); + } + }); + bootstrapMenu.setText(MessageManager + .getString("label.show_bootstrap_values")); + bootstrapMenu.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + bootstrapMenu_actionPerformed(e); + } + }); + distanceMenu.setText(MessageManager.getString("label.show_distances")); + distanceMenu.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + distanceMenu_actionPerformed(e); + } + }); + fitToWindow.setSelected(true); + fitToWindow.setText(MessageManager.getString("label.fit_to_window")); + fitToWindow.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + fitToWindow_actionPerformed(e); + } + }); + epsTree.setText("EPS"); + epsTree.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + epsTree_actionPerformed(e); + } + }); + pngTree.setText("PNG"); + pngTree.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + pngTree_actionPerformed(e); + } + }); + saveAsMenu.setText(MessageManager.getString("action.save_as")); + placeholdersMenu + .setToolTipText(MessageManager + .getString("label.marks_leaves_tree_not_associated_with_sequence")); + placeholdersMenu.setText(MessageManager + .getString("label.mark_unlinked_leaves")); + placeholdersMenu.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + placeholdersMenu_actionPerformed(e); + } + }); + textbox.setText(MessageManager.getString("label.out_to_textbox")); + textbox.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + textbox_actionPerformed(e); + } + }); + originalSeqData.setText(MessageManager.getString("label.input_data")); + originalSeqData.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + originalSeqData_actionPerformed(e); + } + }); + associateLeavesMenu.setText(MessageManager + .getString("label.associate_leaves_with")); + this.getContentPane().add(scrollPane, BorderLayout.CENTER); + jMenuBar1.add(fileMenu); + jMenuBar1.add(viewMenu); + fileMenu.add(saveAsMenu); + fileMenu.add(textbox); + fileMenu.add(printMenu); + fileMenu.add(originalSeqData); + viewMenu.add(fitToWindow); + viewMenu.add(font); + viewMenu.add(distanceMenu); + viewMenu.add(bootstrapMenu); + viewMenu.add(placeholdersMenu); + viewMenu.add(sortAssocViews); + viewMenu.add(associateLeavesMenu); + saveAsMenu.add(saveAsNewick); + saveAsMenu.add(epsTree); + saveAsMenu.add(pngTree); + } + + public void printMenu_actionPerformed(ActionEvent e) + { + } + + public void font_actionPerformed(ActionEvent e) + { + } + + public void distanceMenu_actionPerformed(ActionEvent e) + { + } + + public void bootstrapMenu_actionPerformed(ActionEvent e) + { + } + + public void fitToWindow_actionPerformed(ActionEvent e) + { + } + + public void pngTree_actionPerformed(ActionEvent e) + { + } + + public void epsTree_actionPerformed(ActionEvent e) + { + } + + public void saveAsNewick_actionPerformed(ActionEvent e) + { + } + + public void placeholdersMenu_actionPerformed(ActionEvent e) + { + } + + public void textbox_actionPerformed(ActionEvent e) + { + } + + public void fullid_actionPerformed(ActionEvent e) + { + + } + + public void originalSeqData_actionPerformed(ActionEvent e) + { + + } + + public void viewMenu_menuSelected() + { + } + + public void sortByTree_actionPerformed() + { + + } + +}