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-1950 group hits by architecture
[jalview.git]
/
src
/
jalview
/
appletgui
/
ExtJmol.java
diff --git
a/src/jalview/appletgui/ExtJmol.java
b/src/jalview/appletgui/ExtJmol.java
index
1efb971
..
929a871
100644
(file)
--- a/
src/jalview/appletgui/ExtJmol.java
+++ b/
src/jalview/appletgui/ExtJmol.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*
* This file is part of Jalview.
*
@@
-20,14
+20,6
@@
*/
package jalview.appletgui;
*/
package jalview.appletgui;
-import java.awt.Container;
-import java.util.BitSet;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import org.jmol.api.JmolAppConsoleInterface;
-import org.jmol.api.JmolViewer;
-
import jalview.api.AlignmentViewPanel;
import jalview.api.FeatureRenderer;
import jalview.api.SequenceRenderer;
import jalview.api.AlignmentViewPanel;
import jalview.api.FeatureRenderer;
import jalview.api.SequenceRenderer;
@@
-35,6
+27,16
@@
import jalview.datamodel.PDBEntry;
import jalview.datamodel.SequenceI;
import jalview.ext.jmol.JalviewJmolBinding;
import jalview.datamodel.SequenceI;
import jalview.ext.jmol.JalviewJmolBinding;
+import java.awt.Container;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.jmol.api.JmolAppConsoleInterface;
+import org.jmol.java.BS;
+import org.jmol.viewer.Viewer;
+
/**
* bind an alignment view to an external Jmol instance.
*
/**
* bind an alignment view to an external Jmol instance.
*
@@
-54,12
+56,11
@@
public class ExtJmol extends JalviewJmolBinding
chains, protocol);
}
chains, protocol);
}
- public ExtJmol(JmolViewer viewer, AlignmentPanel alignPanel,
+ public ExtJmol(Viewer viewer, AlignmentPanel alignPanel,
SequenceI[][] seqs)
{
SequenceI[][] seqs)
{
- super(alignPanel.getStructureSelectionManager(), viewer);
+ super(alignPanel.getStructureSelectionManager(), seqs, viewer);
ap = alignPanel;
ap = alignPanel;
- this.sequence = seqs;
notifyFileLoaded(null, null, null, null, 0);
}
notifyFileLoaded(null, null, null, null, 0);
}
@@
-75,6
+76,7
@@
public class ExtJmol extends JalviewJmolBinding
showUrl(arg0, "jmol");
}
showUrl(arg0, "jmol");
}
+ @Override
public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment)
{
AlignmentPanel ap = (AlignmentPanel) alignment;
public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment)
{
AlignmentPanel ap = (AlignmentPanel) alignment;
@@
-88,66
+90,78
@@
public class ExtJmol extends JalviewJmolBinding
}
}
}
}
+ @Override
public SequenceRenderer getSequenceRenderer(AlignmentViewPanel alignment)
{
return ((AlignmentPanel) alignment).getSequenceRenderer();
}
public SequenceRenderer getSequenceRenderer(AlignmentViewPanel alignment)
{
return ((AlignmentPanel) alignment).getSequenceRenderer();
}
+ @Override
public void notifyScriptTermination(String strStatus, int msWalltime)
{
// ignore
}
public void notifyScriptTermination(String strStatus, int msWalltime)
{
// ignore
}
+ @Override
public void sendConsoleEcho(String strEcho)
{
// ignore
}
public void sendConsoleEcho(String strEcho)
{
// ignore
}
+ @Override
public void sendConsoleMessage(String strStatus)
{
// ignore
}
public void sendConsoleMessage(String strStatus)
{
// ignore
}
+ @Override
public void showUrl(String url, String target)
{
ap.alignFrame.showURL(url, target);
}
public void showUrl(String url, String target)
{
ap.alignFrame.showURL(url, target);
}
+ @Override
public void refreshGUI()
{
// ignore
}
public void refreshGUI()
{
// ignore
}
- public void selectionChanged(BitSet arg0)
+ public void selectionChanged(BS arg0)
{
System.out.println(arg0);
}
{
System.out.println(arg0);
}
+ @Override
public void refreshPdbEntries()
{
public void refreshPdbEntries()
{
- Vector pdbe = new Vector();
- Hashtable fileids = new Hashtable();
+ List<PDBEntry> pdbe = new ArrayList<PDBEntry>();
+ List<String> fileids = new ArrayList<String>();
SequenceI[] sq = ap.av.getAlignment().getSequencesArray();
for (int s = 0; s < sq.length; s++)
{
SequenceI[] sq = ap.av.getAlignment().getSequencesArray();
for (int s = 0; s < sq.length; s++)
{
- Vector pdbids = sq[s].getPDBId();
+ Vector<PDBEntry> pdbids = sq[s].getAllPDBEntries();
if (pdbids != null)
{
for (int pe = 0, peSize = pdbids.size(); pe < peSize; pe++)
{
if (pdbids != null)
{
for (int pe = 0, peSize = pdbids.size(); pe < peSize; pe++)
{
- PDBEntry pentry = (PDBEntry) pdbids.elementAt(pe);
- if (!fileids.containsKey(pentry.getId()))
+ PDBEntry pentry = pdbids.elementAt(pe);
+ if (!fileids.contains(pentry.getId()))
+ {
+ pdbe.add(pentry);
+ }
+ else
{
{
- pdbe.addElement(pentry);
+ fileids.add(pentry.getId());
}
}
}
}
}
}
}
}
- pdbentry = new PDBEntry[pdbe.size()];
+ PDBEntry[] newEntries = new PDBEntry[pdbe.size()];
for (int pe = 0; pe < pdbe.size(); pe++)
{
for (int pe = 0; pe < pdbe.size(); pe++)
{
- pdbentry[pe] = (PDBEntry) pdbe.elementAt(pe);
+ newEntries[pe] = pdbe.get(pe);
}
}
+ setPdbentry(newEntries);
}
@Override
}
@Override
@@
-161,7
+175,7
@@
public class ExtJmol extends JalviewJmolBinding
}
@Override
}
@Override
- protected JmolAppConsoleInterface createJmolConsole(JmolViewer viewer2,
+ protected JmolAppConsoleInterface createJmolConsole(
Container consolePanel, String buttonsToShow)
{
// TODO Auto-generated method stub
Container consolePanel, String buttonsToShow)
{
// TODO Auto-generated method stub
@@
-172,19
+186,7
@@
public class ExtJmol extends JalviewJmolBinding
protected void releaseUIResources()
{
ap = null;
protected void releaseUIResources()
{
ap = null;
- if (console != null)
- {
- try
- {
- console.setVisible(false);
- } catch (Error e)
- {
- } catch (Exception x)
- {
- }
- ;
- console = null;
- }
+ closeConsole();
}
}
@@
-195,4
+197,11
@@
public class ExtJmol extends JalviewJmolBinding
}
}
+ @Override
+ public Map<String, Object> getJSpecViewProperty(String arg0)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
}