X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FMCview%2FPDBViewer.java;h=a29789285981607d56052f7245a44a46fa26b3dd;hb=0b7943691883db09c5dd85e525bfc95539f15566;hp=c8dbe668bbc7a85946c1f687e4590ee2ae9ffba4;hpb=2bd43f464e725844b02a106c2d2f187c2c3655a6;p=jalview.git
diff --git a/src/MCview/PDBViewer.java b/src/MCview/PDBViewer.java
index c8dbe66..a297892 100755
--- a/src/MCview/PDBViewer.java
+++ b/src/MCview/PDBViewer.java
@@ -1,19 +1,22 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
- * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, 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 MCview;
@@ -26,6 +29,7 @@ import jalview.datamodel.*;
import jalview.gui.*;
import jalview.io.*;
import jalview.schemes.*;
+import jalview.util.MessageManager;
import jalview.ws.ebi.EBIFetchClient;
public class PDBViewer extends JInternalFrame implements Runnable
@@ -77,7 +81,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
try
{
tmpPDBFile = pdbentry.getFile();
- PDBfile pdbfile = new PDBfile(tmpPDBFile,
+ PDBfile pdbfile = new PDBfile(false,false,tmpPDBFile,
jalview.io.AppletFormatAdapter.FILE);
pdbcanvas.init(pdbentry, seq, chains, ap, protocol);
@@ -138,10 +142,10 @@ public class PDBViewer extends JInternalFrame implements Runnable
});
this.setJMenuBar(jMenuBar1);
- fileMenu.setText("File");
- coloursMenu.setText("Colours");
- saveMenu.setActionCommand("Save Image");
- saveMenu.setText("Save As");
+ fileMenu.setText(MessageManager.getString("action.file"));
+ coloursMenu.setText(MessageManager.getString("label.colours"));
+ saveMenu.setActionCommand(MessageManager.getString("action.save_image"));
+ saveMenu.setText(MessageManager.getString("action.save_as"));
png.setText("PNG");
png.addActionListener(new ActionListener()
{
@@ -158,7 +162,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
eps_actionPerformed(e);
}
});
- mapping.setText("View Mapping");
+ mapping.setText(MessageManager.getString("label.view_mapping"));
mapping.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -166,7 +170,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
mapping_actionPerformed(e);
}
});
- wire.setText("Wireframe");
+ wire.setText(MessageManager.getString("label.wireframe"));
wire.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -175,7 +179,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
}
});
depth.setSelected(true);
- depth.setText("Depthcue");
+ depth.setText(MessageManager.getString("label.depthcue"));
depth.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -184,7 +188,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
}
});
zbuffer.setSelected(true);
- zbuffer.setText("Z Buffering");
+ zbuffer.setText(MessageManager.getString("label.z_buffering"));
zbuffer.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -192,7 +196,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
zbuffer_actionPerformed(e);
}
});
- charge.setText("Charge & Cysteine");
+ charge.setText(MessageManager.getString("label.charge_cysteine"));
charge.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -200,7 +204,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
charge_actionPerformed(e);
}
});
- chain.setText("By Chain");
+ chain.setText(MessageManager.getString("action.by_chain"));
chain.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -209,7 +213,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
}
});
seqButton.setSelected(true);
- seqButton.setText("By Sequence");
+ seqButton.setText(MessageManager.getString("action.by_sequence"));
seqButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -218,7 +222,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
}
});
allchains.setSelected(true);
- allchains.setText("Show All Chains");
+ allchains.setText(MessageManager.getString("label.show_all_chains"));
allchains.addItemListener(new ItemListener()
{
public void itemStateChanged(ItemEvent e)
@@ -226,7 +230,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
allchains_itemStateChanged(e);
}
});
- zappo.setText("Zappo");
+ zappo.setText(MessageManager.getString("label.zappo"));
zappo.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -234,7 +238,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
zappo_actionPerformed(e);
}
});
- taylor.setText("Taylor");
+ taylor.setText(MessageManager.getString("label.taylor"));
taylor.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -242,7 +246,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
taylor_actionPerformed(e);
}
});
- hydro.setText("Hydro");
+ hydro.setText(MessageManager.getString("label.hydrophobicity"));
hydro.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -250,7 +254,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
hydro_actionPerformed(e);
}
});
- helix.setText("Helix");
+ helix.setText(MessageManager.getString("label.helix_propensity"));
helix.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -258,7 +262,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
helix_actionPerformed(e);
}
});
- strand.setText("Strand");
+ strand.setText(MessageManager.getString("label.strand_propensity"));
strand.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -266,7 +270,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
strand_actionPerformed(e);
}
});
- turn.setText("Turn");
+ turn.setText(MessageManager.getString("label.turn_propensity"));
turn.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -274,7 +278,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
turn_actionPerformed(e);
}
});
- buried.setText("Buried");
+ buried.setText(MessageManager.getString("label.buried_index"));
buried.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -282,7 +286,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
buried_actionPerformed(e);
}
});
- user.setText("User Defined...");
+ user.setText(MessageManager.getString("action.user_defined"));
user.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -290,8 +294,9 @@ public class PDBViewer extends JInternalFrame implements Runnable
user_actionPerformed(e);
}
});
- viewMenu.setText("View");
- background.setText("Background Colour...");
+ viewMenu.setText(MessageManager.getString("action.view"));
+ background.setText(MessageManager.getString("label.background_colour")
+ + "...");
background.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -299,7 +304,7 @@ public class PDBViewer extends JInternalFrame implements Runnable
background_actionPerformed(e);
}
});
- savePDB.setText("PDB File");
+ savePDB.setText(MessageManager.getString("label.pdb_file"));
savePDB.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
@@ -361,8 +366,10 @@ public class PDBViewer extends JInternalFrame implements Runnable
int option = JOptionPane.showInternalConfirmDialog(
jalview.gui.Desktop.desktop,
- "Remove from default list?",
- "Remove user defined colour",
+ MessageManager
+ .getString("label.remove_from_default_list"),
+ MessageManager
+ .getString("label.remove_user_defined_colour"),
JOptionPane.YES_NO_OPTION);
if (option == JOptionPane.YES_OPTION)
{
@@ -563,7 +570,9 @@ public class PDBViewer extends JInternalFrame implements Runnable
try
{
cap.setText(pdbcanvas.mappingDetails.toString());
- Desktop.addInternalFrame(cap, "PDB - Sequence Mapping", 550, 600);
+ Desktop.addInternalFrame(cap,
+ MessageManager.getString("label.pdb_sequence_mapping"), 550,
+ 600);
} catch (OutOfMemoryError oom)
{
new OOMWarning("Opening sequence to structure mapping report", oom);
@@ -626,7 +635,8 @@ public class PDBViewer extends JInternalFrame implements Runnable
public void user_actionPerformed(ActionEvent e)
{
- if (e.getActionCommand().equals("User Defined..."))
+ if (e.getActionCommand().equals(
+ MessageManager.getString("action.user_defined")))
{
// new UserDefinedColours(pdbcanvas, null);
}
@@ -644,7 +654,8 @@ public class PDBViewer extends JInternalFrame implements Runnable
public void background_actionPerformed(ActionEvent e)
{
java.awt.Color col = JColorChooser.showDialog(this,
- "Select Background Colour", pdbcanvas.backgroundColour);
+ MessageManager.getString("label.select_backgroud_colour"),
+ pdbcanvas.backgroundColour);
if (col != null)
{
@@ -660,8 +671,8 @@ public class PDBViewer extends JInternalFrame implements Runnable
jalview.bin.Cache.getProperty("LAST_DIRECTORY"));
chooser.setFileView(new JalviewFileView());
- chooser.setDialogTitle("Save PDB File");
- chooser.setToolTipText("Save");
+ chooser.setDialogTitle(MessageManager.getString("label.save_pdb_file"));
+ chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);