X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGTreePanel.java;h=24e80b624dcd208e613415cd57498c0566ed5489;hb=efc31b4a8d5cee63555586804a2b79c06bdb5a14;hp=088dbde31250dd4e50580ec7e710cd5218e3ddcf;hpb=9257b8510c7354cbd7e43a3fc2817978cc8e4ae9;p=jalview.git diff --git a/src/jalview/jbgui/GTreePanel.java b/src/jalview/jbgui/GTreePanel.java index 088dbde..24e80b6 100755 --- a/src/jalview/jbgui/GTreePanel.java +++ b/src/jalview/jbgui/GTreePanel.java @@ -1,170 +1,206 @@ /* -* 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 -*/ + * 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 fontSize = 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"); - fontSize.setText("Font Size - 12"); - fontSize.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(ActionEvent e) { - fontSize_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(fontSize); - 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 fontSize_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 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 fontSize = 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); } - - public void placeholdersMenu_actionPerformed(ActionEvent e) { - } - - public void textbox_actionPerformed(ActionEvent e) { + 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"); + fontSize.setText("Font Size - 12"); + fontSize.addActionListener(new java.awt.event.ActionListener() + { + public void actionPerformed(ActionEvent e) + { + fontSize_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(fontSize); + 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 fontSize_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) + { + } }