X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fjbgui%2FGTreePanel.java;h=d184e76f388f4c9d612c6f7434d5a46e49307e36;hb=1aa7a7bfe46e16a5125192933b8ba6ae4bc6c9bf;hp=4d847c054bec7afc34aaca7d3daa687643b4ae53;hpb=797df64fa2a0a30773d0f48f5494d4155e5a8be3;p=jalview.git
diff --git a/src/jalview/jbgui/GTreePanel.java b/src/jalview/jbgui/GTreePanel.java
index 4d847c0..d184e76 100755
--- a/src/jalview/jbgui/GTreePanel.java
+++ b/src/jalview/jbgui/GTreePanel.java
@@ -1,27 +1,43 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
- * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ 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.ImageMaker.TYPE;
+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;
+
+@SuppressWarnings("serial")
public class GTreePanel extends JInternalFrame
{
BorderLayout borderLayout1 = new BorderLayout();
@@ -76,79 +92,92 @@ public class GTreePanel extends JInternalFrame
private void jbInit() throws Exception
{
+ setName("jalview-tree");
this.getContentPane().setLayout(borderLayout1);
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()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
saveAsNewick_actionPerformed(e);
}
});
- printMenu.setText("Print");
+ printMenu.setText(MessageManager.getString("action.print"));
printMenu.addActionListener(new java.awt.event.ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
printMenu_actionPerformed(e);
}
});
- viewMenu.setText("View");
+ viewMenu.setText(MessageManager.getString("action.view"));
viewMenu.addMenuListener(new MenuListener()
{
+ @Override
public void menuSelected(MenuEvent e)
{
viewMenu_menuSelected();
}
+ @Override
public void menuDeselected(MenuEvent e)
{
}
+ @Override
public void menuCanceled(MenuEvent e)
{
}
});
- sortAssocViews.setText("Sort Alignment By Tree");
+ sortAssocViews.setText(
+ MessageManager.getString("label.sort_alignment_by_tree"));
sortAssocViews.addActionListener(new java.awt.event.ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
- sortByTree_actionPerformed(e);
+ sortByTree_actionPerformed();
}
});
- font.setText("Font...");
+ font.setText(MessageManager.getString("action.font"));
font.addActionListener(new java.awt.event.ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
font_actionPerformed(e);
}
});
- bootstrapMenu.setText("Show Bootstrap Values");
+ bootstrapMenu.setText(
+ MessageManager.getString("label.show_bootstrap_values"));
bootstrapMenu.addActionListener(new java.awt.event.ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
bootstrapMenu_actionPerformed(e);
}
});
- distanceMenu.setText("Show Distances");
+ distanceMenu.setText(MessageManager.getString("label.show_distances"));
distanceMenu.addActionListener(new java.awt.event.ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
distanceMenu_actionPerformed(e);
}
});
fitToWindow.setSelected(true);
- fitToWindow.setText("Fit To Window");
+ fitToWindow.setText(MessageManager.getString("label.fit_to_window"));
fitToWindow.addActionListener(new java.awt.event.ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
fitToWindow_actionPerformed(e);
@@ -157,47 +186,54 @@ public class GTreePanel extends JInternalFrame
epsTree.setText("EPS");
epsTree.addActionListener(new java.awt.event.ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
- epsTree_actionPerformed(e);
+ writeTreeImage(TYPE.EPS);
}
});
pngTree.setText("PNG");
pngTree.addActionListener(new java.awt.event.ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
- pngTree_actionPerformed(e);
+ writeTreeImage(TYPE.PNG);
}
});
- saveAsMenu.setText("Save as");
- placeholdersMenu
- .setToolTipText("Marks leaves of tree not associated with a sequence");
- placeholdersMenu.setText("Mark Unlinked Leaves");
+ 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()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
placeholdersMenu_actionPerformed(e);
}
});
- textbox.setText("Output to Textbox...");
+ textbox.setText(MessageManager.getString("label.out_to_textbox"));
textbox.addActionListener(new ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
textbox_actionPerformed(e);
}
});
- originalSeqData.setText("Input Data...");
+ originalSeqData.setText(MessageManager.getString("label.input_data"));
originalSeqData.addActionListener(new ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
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);
@@ -237,11 +273,7 @@ public class GTreePanel extends JInternalFrame
{
}
- public void pngTree_actionPerformed(ActionEvent e)
- {
- }
-
- public void epsTree_actionPerformed(ActionEvent e)
+ public void writeTreeImage(TYPE imageType)
{
}
@@ -270,7 +302,8 @@ public class GTreePanel extends JInternalFrame
public void viewMenu_menuSelected()
{
}
- public void sortByTree_actionPerformed(ActionEvent e)
+
+ public void sortByTree_actionPerformed()
{
}