git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3829 pushed the PDBFTSClient specific code to new ‘StructureChooserQuerySource...
[jalview.git]
/
src
/
jalview
/
gui
/
AppJmolBinding.java
diff --git
a/src/jalview/gui/AppJmolBinding.java
b/src/jalview/gui/AppJmolBinding.java
index
db698ac
..
98787cb
100644
(file)
--- a/
src/jalview/gui/AppJmolBinding.java
+++ b/
src/jalview/gui/AppJmolBinding.java
@@
-20,6
+20,16
@@
*/
package jalview.gui;
*/
package jalview.gui;
+import java.awt.Container;
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+import javax.swing.JComponent;
+
+import org.jmol.api.JmolAppConsoleInterface;
+import org.openscience.jmol.app.jmolpanel.console.AppConsole;
+
import jalview.api.AlignmentViewPanel;
import jalview.api.structures.JalviewStructureDisplayI;
import jalview.bin.Cache;
import jalview.api.AlignmentViewPanel;
import jalview.api.structures.JalviewStructureDisplayI;
import jalview.bin.Cache;
@@
-28,15
+38,8
@@
import jalview.datamodel.SequenceI;
import jalview.ext.jmol.JalviewJmolBinding;
import jalview.io.DataSourceType;
import jalview.structure.StructureSelectionManager;
import jalview.ext.jmol.JalviewJmolBinding;
import jalview.io.DataSourceType;
import jalview.structure.StructureSelectionManager;
-
-import java.awt.Container;
-import java.util.Map;
-
-import javax.swing.JComponent;
-
-import org.jmol.api.JmolAppConsoleInterface;
-import org.jmol.java.BS;
-import org.openscience.jmol.app.jmolpanel.console.AppConsole;
+import jalview.util.Platform;
+import javajs.util.BS;
public class AppJmolBinding extends JalviewJmolBinding
{
public class AppJmolBinding extends JalviewJmolBinding
{
@@
-90,6
+93,11
@@
public class AppJmolBinding extends JalviewJmolBinding
@Override
public void refreshGUI()
{
@Override
public void refreshGUI()
{
+ if (getMappedStructureCount() == 0)
+ {
+ // too soon!
+ return;
+ }
// appJmolWindow.repaint();
javax.swing.SwingUtilities.invokeLater(new Runnable()
{
// appJmolWindow.repaint();
javax.swing.SwingUtilities.invokeLater(new Runnable()
{
@@
-97,6
+105,7
@@
public class AppJmolBinding extends JalviewJmolBinding
public void run()
{
JalviewStructureDisplayI theViewer = getViewer();
public void run()
{
JalviewStructureDisplayI theViewer = getViewer();
+ // invokes colourbySequence() via seqColour_ActionPerformed()
theViewer.updateTitleAndMenus();
((JComponent) theViewer).revalidate();
}
theViewer.updateTitleAndMenus();
((JComponent) theViewer).revalidate();
}
@@
-140,7
+149,9
@@
public class AppJmolBinding extends JalviewJmolBinding
Container consolePanel, String buttonsToShow)
{
jmolViewer.setJmolCallbackListener(this);
Container consolePanel, String buttonsToShow)
{
jmolViewer.setJmolCallbackListener(this);
- return new AppConsole(jmolViewer, consolePanel, buttonsToShow);
+ // BH comment: can't do this yet [for JS only, or generally?]
+ return Platform.isJS() ? null
+ : new AppConsole(jmolViewer, consolePanel, buttonsToShow);
}
@Override
}
@Override
@@
-165,4
+176,17
@@
public class AppJmolBinding extends JalviewJmolBinding
// TODO Auto-generated method stub
return null;
}
// TODO Auto-generated method stub
return null;
}
+
+ @SuppressWarnings("unused")
+ public void cacheFiles(List<File> files)
+ {
+ if (files == null)
+ {
+ return;
+ }
+ for (File f : files)
+ {
+ Platform.cacheFileData(f);
+ }
+ }
}
}