From 8449a33e712dfec13771d4e1b8be20bf625f190b Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 20 Aug 2010 12:32:13 +0000 Subject: [PATCH] refactor jmol api so it doesn't clash with Swing component method. * JAL-582 --- src/jalview/appletgui/AppletJmolBinding.java | 2 +- src/jalview/appletgui/ExtJmol.java | 2 +- src/jalview/ext/jmol/JalviewJmolBinding.java | 8 ++++---- src/jalview/gui/AppJmol.java | 11 ++++++++--- src/jalview/gui/AppJmolBinding.java | 2 +- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/jalview/appletgui/AppletJmolBinding.java b/src/jalview/appletgui/AppletJmolBinding.java index 89d053b..9299af2 100644 --- a/src/jalview/appletgui/AppletJmolBinding.java +++ b/src/jalview/appletgui/AppletJmolBinding.java @@ -68,7 +68,7 @@ class AppletJmolBinding extends jalview.ext.jmol.JalviewJmolBinding } - public void updateUI() + public void refreshGUI() { appletJmolBinding.updateTitleAndMenus(); } diff --git a/src/jalview/appletgui/ExtJmol.java b/src/jalview/appletgui/ExtJmol.java index 2c5da17..8e42f2a 100644 --- a/src/jalview/appletgui/ExtJmol.java +++ b/src/jalview/appletgui/ExtJmol.java @@ -86,7 +86,7 @@ public class ExtJmol extends JalviewJmolBinding ap.alignFrame.showURL(url, target); } - public void updateUI() + public void refreshGUI() { // ignore } diff --git a/src/jalview/ext/jmol/JalviewJmolBinding.java b/src/jalview/ext/jmol/JalviewJmolBinding.java index 929411f..44a9993 100644 --- a/src/jalview/ext/jmol/JalviewJmolBinding.java +++ b/src/jalview/ext/jmol/JalviewJmolBinding.java @@ -778,7 +778,7 @@ public abstract class JalviewJmolBinding implements StructureListener, break; case JmolConstants.CALLBACK_SYNC: case JmolConstants.CALLBACK_RESIZE: - updateUI(); + refreshGUI(); break; case JmolConstants.CALLBACK_MEASURE: @@ -824,7 +824,7 @@ public abstract class JalviewJmolBinding implements StructureListener, if (errorMsg != null) { fileLoadingError = errorMsg; - updateUI(); + refreshGUI(); return; } // the rest of this routine ignores the arguments, and simply interrogates @@ -970,7 +970,7 @@ public abstract class JalviewJmolBinding implements StructureListener, { fr.featuresAdded(); } - updateUI(); + refreshGUI(); } } @@ -1060,7 +1060,7 @@ public abstract class JalviewJmolBinding implements StructureListener, * state change. this could be because structures were loaded, or because an * error has occured. */ - public abstract void updateUI(); + public abstract void refreshGUI(); public void allocateViewer(Component renderPanel, String htmlName, URL documentBase, URL codeBase, String commandOptions) diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java index e274b84..9e1e35a 100644 --- a/src/jalview/gui/AppJmol.java +++ b/src/jalview/gui/AppJmol.java @@ -364,13 +364,18 @@ public class AppJmol extends GStructureViewer implements Runnable, public void viewMapping_actionPerformed(ActionEvent actionEvent) { jalview.gui.CutAndPasteTransfer cap = new jalview.gui.CutAndPasteTransfer(); - jalview.gui.Desktop.addInternalFrame(cap, "PDB - Sequence Mapping", - 550, 600); - for (int pdbe = 0; pdbe