X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAppJmol.java;fp=src%2Fjalview%2Fgui%2FAppJmol.java;h=a4597d370c517c9b275dc8ef08f00f25e2dc94d4;hp=68a847ecc01ae096064ec2a923cd936bca074cc2;hb=9e2b4ccd9c95ffa75130bf808b0037ea6a1054ca;hpb=4dd40d33a5becefd51c31a426f2501b21029f82c diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java index 68a847e..a4597d3 100644 --- a/src/jalview/gui/AppJmol.java +++ b/src/jalview/gui/AppJmol.java @@ -89,8 +89,8 @@ public class AppJmol extends StructureViewerBase */ public AppJmol(String[] files, String[] ids, SequenceI[][] seqs, AlignmentPanel ap, boolean usetoColour, boolean useToAlign, - boolean leaveColouringToJmol, String loadStatus, - Rectangle bounds, String viewid) + boolean leaveColouringToJmol, String loadStatus, Rectangle bounds, + String viewid) { PDBEntry[] pdbentrys = new PDBEntry[files.length]; for (int i = 0; i < pdbentrys.length; i++) @@ -133,7 +133,8 @@ public class AppJmol extends StructureViewerBase this.addInternalFrameListener(new InternalFrameAdapter() { @Override - public void internalFrameClosing(InternalFrameEvent internalFrameEvent) + public void internalFrameClosing( + InternalFrameEvent internalFrameEvent) { closeViewer(false); } @@ -218,7 +219,8 @@ public class AppJmol extends StructureViewerBase this.addInternalFrameListener(new InternalFrameAdapter() { @Override - public void internalFrameClosing(InternalFrameEvent internalFrameEvent) + public void internalFrameClosing( + InternalFrameEvent internalFrameEvent) { closeViewer(false); } @@ -281,8 +283,8 @@ public class AppJmol extends StructureViewerBase scriptWindow.setVisible(false); } - jmb.allocateViewer(renderPanel, true, "", null, null, "", - scriptWindow, null); + jmb.allocateViewer(renderPanel, true, "", null, null, "", scriptWindow, + null); // jmb.newJmolPopup("Jmol"); if (command == null) { @@ -293,8 +295,6 @@ public class AppJmol extends StructureViewerBase jmb.setFinishedInit(true); } - - boolean allChainsSelected = false; @Override @@ -410,8 +410,8 @@ public class AppJmol extends StructureViewerBase int waitFor = 35; int waitTotal = 0; while (addingStructures ? lastnotify >= jmb.getLoadNotifiesHandled() - : !(jmb.isFinishedInit() && jmb.getStructureFiles() != null && jmb - .getStructureFiles().length == files.size())) + : !(jmb.isFinishedInit() && jmb.getStructureFiles() != null + && jmb.getStructureFiles().length == files.size())) { try { @@ -423,12 +423,11 @@ public class AppJmol extends StructureViewerBase } if (waitTotal > waitMax) { - System.err - .println("Timed out waiting for Jmol to load files after " - + waitTotal + "ms"); -// System.err.println("finished: " + jmb.isFinishedInit() -// + "; loaded: " + Arrays.toString(jmb.getPdbFile()) -// + "; files: " + files.toString()); + System.err.println("Timed out waiting for Jmol to load files after " + + waitTotal + "ms"); + // System.err.println("finished: " + jmb.isFinishedInit() + // + "; loaded: " + Arrays.toString(jmb.getPdbFile()) + // + "; files: " + files.toString()); jmb.getStructureFiles(); break; } @@ -509,8 +508,9 @@ public class AppJmol extends StructureViewerBase long hdl = pdbid.hashCode() - System.currentTimeMillis(); if (progressBar != null) { - progressBar.setProgressBar(MessageManager.formatMessage( - "status.fetching_pdb", new String[] { pdbid }), hdl); + progressBar.setProgressBar(MessageManager + .formatMessage("status.fetching_pdb", new String[] + { pdbid }), hdl); } try { @@ -576,9 +576,10 @@ public class AppJmol extends StructureViewerBase } if (errormsgs.length() > 0) { - JvOptionPane.showInternalMessageDialog(Desktop.desktop, MessageManager - .formatMessage("label.pdb_entries_couldnt_be_retrieved", - new String[] { errormsgs.toString() }), + JvOptionPane.showInternalMessageDialog(Desktop.desktop, + MessageManager.formatMessage( + "label.pdb_entries_couldnt_be_retrieved", new String[] + { errormsgs.toString() }), MessageManager.getString("label.couldnt_load_file"), JvOptionPane.ERROR_MESSAGE); } @@ -706,8 +707,8 @@ public class AppJmol extends StructureViewerBase if (e == jmb.getPdbCount() - 1 || sb.length() > 20) { lines++; - g.drawString(sb.toString(), 20, currentSize.height / 2 - lines - * g.getFontMetrics().getHeight()); + g.drawString(sb.toString(), 20, currentSize.height / 2 + - lines * g.getFontMetrics().getHeight()); } } }