X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGTreePanel.java;h=83a98666fd8fe0614c45278d943b6a3478013af2;hb=95ceead3cb4ea5aa5260e1fd4ab53658b64866e1;hp=8616a4b64534308b34e9d5e35bfe546cc73fd1fb;hpb=d423f22792e47dbc800ae220a58677f988971d06;p=jalview.git
diff --git a/src/jalview/jbgui/GTreePanel.java b/src/jalview/jbgui/GTreePanel.java
index 8616a4b..83a9866 100755
--- a/src/jalview/jbgui/GTreePanel.java
+++ b/src/jalview/jbgui/GTreePanel.java
@@ -1,26 +1,40 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Copyright (C) 2014 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.
- *
+ * 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 .
+ * 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 java.awt.*;
-import java.awt.event.*;
-import javax.swing.*;
-import javax.swing.event.*;
+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
{
@@ -40,6 +54,8 @@ public class GTreePanel extends JInternalFrame
public JMenuItem font = new JMenuItem();
+ public JMenuItem sortAssocViews = new JMenuItem();
+
public JCheckBoxMenuItem bootstrapMenu = new JCheckBoxMenuItem();
public JCheckBoxMenuItem distanceMenu = new JCheckBoxMenuItem();
@@ -78,8 +94,8 @@ public class GTreePanel extends JInternalFrame
this.setBackground(Color.white);
this.setFont(new java.awt.Font("Verdana", 0, 12));
scrollPane.setOpaque(false);
- fileMenu.setText("File");
- saveAsNewick.setText("Newick Format");
+ fileMenu.setText(MessageManager.getString("action.file"));
+ saveAsNewick.setText(MessageManager.getString("label.newick_format"));
saveAsNewick.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -87,7 +103,7 @@ public class GTreePanel extends JInternalFrame
saveAsNewick_actionPerformed(e);
}
});
- printMenu.setText("Print");
+ printMenu.setText(MessageManager.getString("action.print"));
printMenu.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -95,7 +111,7 @@ public class GTreePanel extends JInternalFrame
printMenu_actionPerformed(e);
}
});
- viewMenu.setText("View");
+ viewMenu.setText(MessageManager.getString("action.view"));
viewMenu.addMenuListener(new MenuListener()
{
public void menuSelected(MenuEvent e)
@@ -111,7 +127,16 @@ public class GTreePanel extends JInternalFrame
{
}
});
- font.setText("Font...");
+ 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)
@@ -119,7 +144,8 @@ public class GTreePanel extends JInternalFrame
font_actionPerformed(e);
}
});
- bootstrapMenu.setText("Show Bootstrap Values");
+ bootstrapMenu.setText(MessageManager
+ .getString("label.show_bootstrap_values"));
bootstrapMenu.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -127,7 +153,7 @@ public class GTreePanel extends JInternalFrame
bootstrapMenu_actionPerformed(e);
}
});
- distanceMenu.setText("Show Distances");
+ distanceMenu.setText(MessageManager.getString("label.show_distances"));
distanceMenu.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -136,7 +162,7 @@ public class GTreePanel extends JInternalFrame
}
});
fitToWindow.setSelected(true);
- fitToWindow.setText("Fit To Window");
+ fitToWindow.setText(MessageManager.getString("label.fit_to_window"));
fitToWindow.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -160,10 +186,12 @@ public class GTreePanel extends JInternalFrame
pngTree_actionPerformed(e);
}
});
- saveAsMenu.setText("Save as");
+ saveAsMenu.setText(MessageManager.getString("action.save_as"));
placeholdersMenu
- .setToolTipText("Marks leaves of tree not associated with a sequence");
- placeholdersMenu.setText("Mark Unlinked Leaves");
+ .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)
@@ -171,7 +199,8 @@ public class GTreePanel extends JInternalFrame
placeholdersMenu_actionPerformed(e);
}
});
- textbox.setText("Output to Textbox...");
+ textbox.setText(MessageManager.getString("label.out_to_textbox")
+ + "...");
textbox.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -179,7 +208,7 @@ public class GTreePanel extends JInternalFrame
textbox_actionPerformed(e);
}
});
- originalSeqData.setText("Input Data...");
+ originalSeqData.setText(MessageManager.getString("label.input_data"));
originalSeqData.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -187,7 +216,8 @@ public class GTreePanel extends JInternalFrame
originalSeqData_actionPerformed(e);
}
});
- associateLeavesMenu.setText("Associate Leaves With");
+ associateLeavesMenu.setText(MessageManager
+ .getString("label.associate_leaves_with"));
this.getContentPane().add(scrollPane, BorderLayout.CENTER);
jMenuBar1.add(fileMenu);
jMenuBar1.add(viewMenu);
@@ -200,6 +230,7 @@ public class GTreePanel extends JInternalFrame
viewMenu.add(distanceMenu);
viewMenu.add(bootstrapMenu);
viewMenu.add(placeholdersMenu);
+ viewMenu.add(sortAssocViews);
viewMenu.add(associateLeavesMenu);
saveAsMenu.add(saveAsNewick);
saveAsMenu.add(epsTree);
@@ -259,4 +290,10 @@ public class GTreePanel extends JInternalFrame
public void viewMenu_menuSelected()
{
}
+
+ public void sortByTree_actionPerformed()
+ {
+
+ }
+
}