X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAppJmol.java;h=e13df4a62d01ac087b78cc5b3d5f6bb1b64f7f98;hb=4f77328104498504339216829abf5ea87e2791ec;hp=56872190d25db1eee76ea014e40ddd42af503a45;hpb=2b8c0785318a3528e1876e8e2dd48b7d831eae69;p=jalview.git diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java index 5687219..e13df4a 100644 --- a/src/jalview/gui/AppJmol.java +++ b/src/jalview/gui/AppJmol.java @@ -238,8 +238,6 @@ public class AppJmol extends StructureViewerBase // TODO: consider waiting until the structure/view is fully loaded before // displaying this.getContentPane().add(renderPanel, java.awt.BorderLayout.CENTER); - this.invalidate(); - this.pack(); jalview.gui.Desktop.addInternalFrame(this, jmb.getViewerTitle(), getBounds().width, getBounds().height); if (scriptWindow == null) @@ -330,7 +328,7 @@ public class AppJmol extends StructureViewerBase for (String s : files) { fileList.append(SPACE).append(QUOTE) - .append(Platform.escapeString(s)).append(QUOTE); + .append(Platform.escapeBackslashes(s)).append(QUOTE); } String filesString = fileList.toString(); @@ -524,7 +522,7 @@ public class AppJmol extends StructureViewerBase addingStructures = true; // already files loaded. for (int c = 0; c < filesInViewer.length; c++) { - if (filesInViewer[c].equals(file)) + if (Platform.pathEquals(filesInViewer[c], file)) { file = null; break; @@ -548,7 +546,7 @@ public class AppJmol extends StructureViewerBase } if (errormsgs.length() > 0) { - JvOptionPane.showInternalMessageDialog(Desktop.getDesktopPane(), + JvOptionPane.showInternalMessageDialog(Desktop.desktop, MessageManager.formatMessage( "label.pdb_entries_couldnt_be_retrieved", new String[] { errormsgs.toString() }), @@ -565,7 +563,6 @@ public class AppJmol extends StructureViewerBase * * @param type */ - @Override public void makePDBImage(ImageMaker.TYPE type) { int width = getWidth(); @@ -629,25 +626,15 @@ public class AppJmol extends StructureViewerBase validate(); } - @SuppressWarnings("serial") class RenderPanel extends JPanel { final Dimension currentSize = new Dimension(); - public RenderPanel() - { - setPreferredSize( - Cache.getDefaultDim(Preferences.STRUCTURE_DIMENSIONS, - Preferences.DEFAULT_STRUCTURE_DIMENSIONS)); - // BH 2019.07.12 suggesting 600,600; current is something like 347 x 323 - } - @Override public void paintComponent(Graphics g) { getSize(currentSize); - // BH: Note that this size could be slightly different from the size set - // prior to packing. + if (jmb != null && jmb.hasFileLoadingError()) { g.setColor(Color.black);