X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAppJmol.java;h=6eb6ac333302c721983ad16f0cd6677e9e3f5fd0;hb=a94284081155efc1183fac5d8254826db542a933;hp=1af0cb33d7a2b61c52a7e565b408fa36a8f9911f;hpb=a8f483d04205bb8273ee311c12968b7e86d205fa;p=jalview.git
diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java
index 1af0cb3..6eb6ac3 100644
--- a/src/jalview/gui/AppJmol.java
+++ b/src/jalview/gui/AppJmol.java
@@ -6,14 +6,16 @@
*
* 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.gui;
@@ -200,7 +202,11 @@ public class AppJmol extends GStructureViewer implements Runnable,
public void itemStateChanged(ItemEvent e)
{
alignStructs.setEnabled(_alignwith.size() > 0);
- alignStructs.setToolTipText(MessageManager.formatMessage("label.align_structures_using_linked_alignment_views", new String[] {new Integer(_alignwith.size()).toString()}));
+ alignStructs.setToolTipText(MessageManager
+ .formatMessage(
+ "label.align_structures_using_linked_alignment_views",
+ new String[]
+ { new Integer(_alignwith.size()).toString() }));
}
});
handler.itemStateChanged(null);
@@ -252,9 +258,11 @@ public class AppJmol extends GStructureViewer implements Runnable,
if (alreadyMapped != null)
{
int option = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
- MessageManager.formatMessage("label.pdb_entry_is_already_displayed", new String[]{pdbentry.getId()}),
- MessageManager.formatMessage("label.map_sequences_to_visible_window", new String[]{pdbentry.getId()}),
- JOptionPane.YES_NO_OPTION);
+ MessageManager.formatMessage(
+ "label.pdb_entry_is_already_displayed", new String[]
+ { pdbentry.getId() }), MessageManager.formatMessage(
+ "label.map_sequences_to_visible_window", new String[]
+ { pdbentry.getId() }), JOptionPane.YES_NO_OPTION);
if (option == JOptionPane.YES_OPTION)
{
@@ -309,10 +317,15 @@ public class AppJmol extends GStructureViewer implements Runnable,
{
AppJmol topJmol = (AppJmol) jm.nextElement();
// TODO: highlight topJmol in view somehow
- int option = JOptionPane.showInternalConfirmDialog(Desktop.desktop,
- MessageManager.formatMessage("label.add_pdbentry_to_view", new String[]{pdbentry.getId(),topJmol.getTitle()}),
- MessageManager.getString("label.align_to_existing_structure_view"),
- JOptionPane.YES_NO_OPTION);
+ int option = JOptionPane
+ .showInternalConfirmDialog(
+ Desktop.desktop,
+ MessageManager.formatMessage(
+ "label.add_pdbentry_to_view", new String[]
+ { pdbentry.getId(), topJmol.getTitle() }),
+ MessageManager
+ .getString("label.align_to_existing_structure_view"),
+ JOptionPane.YES_NO_OPTION);
if (option == JOptionPane.YES_OPTION)
{
topJmol.useAlignmentPanelForSuperposition(ap);
@@ -617,7 +630,8 @@ public class AppJmol extends GStructureViewer implements Runnable,
{
return;
}
- JMenuItem menuItem = new JMenuItem(MessageManager.getString("label.all"));
+ JMenuItem menuItem = new JMenuItem(
+ MessageManager.getString("label.all"));
menuItem.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent evt)
@@ -779,9 +793,12 @@ public class AppJmol extends GStructureViewer implements Runnable,
if (errormsgs.length() > 0)
{
- JOptionPane.showInternalMessageDialog(Desktop.desktop,
- MessageManager.formatMessage("label.pdb_entries_couldnt_be_retrieved", new String[]{errormsgs.toString()}),
- MessageManager.getString("label.couldnt_load_file"), JOptionPane.ERROR_MESSAGE);
+ JOptionPane.showInternalMessageDialog(Desktop.desktop, MessageManager
+ .formatMessage("label.pdb_entries_couldnt_be_retrieved",
+ new String[]
+ { errormsgs.toString() }), MessageManager
+ .getString("label.couldnt_load_file"),
+ JOptionPane.ERROR_MESSAGE);
}
long lastnotify = jmb.getLoadNotifiesHandled();
@@ -829,7 +846,8 @@ public class AppJmol extends GStructureViewer implements Runnable,
// need to wait around until script has finished
while (addingStructures ? lastnotify >= jmb.getLoadNotifiesHandled()
- : (jmb.isFinishedInit() && jmb.getPdbFile()!=null && jmb.getPdbFile().length != jmb.pdbentry.length))
+ : (jmb.isFinishedInit() && jmb.getPdbFile() != null && jmb
+ .getPdbFile().length != jmb.pdbentry.length))
{
try
{
@@ -871,7 +889,7 @@ public class AppJmol extends GStructureViewer implements Runnable,
chooser.setFileView(new JalviewFileView());
chooser.setDialogTitle("Save PDB File");
- chooser.setToolTipText(MessageManager.getString("action.save"));
+ chooser.setToolTipText(MessageManager.getString("action.save"));
int value = chooser.showSaveDialog(this);
@@ -919,8 +937,9 @@ public class AppJmol extends GStructureViewer implements Runnable,
cap.dispose();
return;
}
- jalview.gui.Desktop.addInternalFrame(cap, MessageManager.getString("label.pdb_sequence_mapping"),
- 550, 600);
+ jalview.gui.Desktop.addInternalFrame(cap,
+ MessageManager.getString("label.pdb_sequence_mapping"), 550,
+ 600);
}
/**
@@ -1142,7 +1161,8 @@ public class AppJmol extends GStructureViewer implements Runnable,
g.fillRect(0, 0, currentSize.width, currentSize.height);
g.setColor(Color.white);
g.setFont(new Font("Verdana", Font.BOLD, 14));
- g.drawString(MessageManager.getString("label.error_loading_file") + "...", 20, currentSize.height / 2);
+ g.drawString(MessageManager.getString("label.error_loading_file")
+ + "...", 20, currentSize.height / 2);
StringBuffer sb = new StringBuffer();
int lines = 0;
for (int e = 0; e < jmb.pdbentry.length; e++)
@@ -1167,7 +1187,8 @@ public class AppJmol extends GStructureViewer implements Runnable,
g.fillRect(0, 0, currentSize.width, currentSize.height);
g.setColor(Color.white);
g.setFont(new Font("Verdana", Font.BOLD, 14));
- g.drawString(MessageManager.getString("label.retrieving_pdb_data"), 20, currentSize.height / 2);
+ g.drawString(MessageManager.getString("label.retrieving_pdb_data"),
+ 20, currentSize.height / 2);
}
else
{