2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.appletgui;
23 import jalview.api.AlignmentViewPanel;
24 import jalview.api.FeatureRenderer;
25 import jalview.api.SequenceRenderer;
26 import jalview.datamodel.PDBEntry;
27 import jalview.datamodel.SequenceI;
28 //import jalview.ext.jmol.JalviewJmolBinding;
29 import jalview.structure.AtomSpec;
30 import jalview.structure.StructureSelectionManager;
31 import jalview.structures.models.AAStructureBindingModel;
33 import java.awt.Container;
34 import java.util.ArrayList;
35 import java.util.List;
37 import java.util.Vector;
39 //import org.jmol.api.JmolAppConsoleInterface;
40 //import org.jmol.java.BS;
41 import org.jmol.viewer.Viewer;
44 * bind an alignment view to an external Jmol instance.
49 public class ExtJmol extends AAStructureBindingModel //extends JalviewJmolBinding
52 public ExtJmol(StructureSelectionManager ssm, PDBEntry[] pdbentry,
53 SequenceI[][] sequenceIs, String[][] chains, String protocol) {
54 super(ssm, pdbentry, sequenceIs, chains, protocol);
55 // TODO Auto-generated constructor stub
59 public String[] getPdbFile() {
60 // TODO Auto-generated method stub
65 public void updateColours(Object source) {
66 // TODO Auto-generated method stub
71 public void releaseReferences(Object svl) {
72 // TODO Auto-generated method stub
77 public void highlightAtoms(List<AtomSpec> atoms) {
78 // TODO Auto-generated method stub
82 // private AlignmentPanel ap;
84 // protected ExtJmol(jalview.appletgui.AlignFrame alframe,
85 // PDBEntry[] pdbentry, SequenceI[][] seq, String[][] chains,
88 // super(alframe.alignPanel.getStructureSelectionManager(), pdbentry, seq,
92 // public ExtJmol(Viewer viewer, AlignmentPanel alignPanel,
93 // SequenceI[][] seqs)
95 // super(alignPanel.getStructureSelectionManager(), seqs, viewer);
97 // notifyFileLoaded(null, null, null, null, 0);
100 // public void updateColours(Object source)
103 // // TODO Auto-generated method stub
107 // public void showUrl(String arg0)
109 // showUrl(arg0, "jmol");
113 // public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment)
115 // AlignmentPanel ap = (AlignmentPanel) alignment;
116 // if (ap.av.isShowSequenceFeatures())
118 // return ap.getFeatureRenderer();
127 // public SequenceRenderer getSequenceRenderer(AlignmentViewPanel alignment)
129 // return ((AlignmentPanel) alignment).getSequenceRenderer();
133 // public void notifyScriptTermination(String strStatus, int msWalltime)
139 // public void sendConsoleEcho(String strEcho)
145 // public void sendConsoleMessage(String strStatus)
151 // public void showUrl(String url, String target)
153 // ap.alignFrame.showURL(url, target);
157 // public void refreshGUI()
162 // public void selectionChanged(BS arg0)
164 // System.out.println(arg0);
168 // public void refreshPdbEntries()
170 // List<PDBEntry> pdbe = new ArrayList<PDBEntry>();
171 // List<String> fileids = new ArrayList<String>();
172 // SequenceI[] sq = ap.av.getAlignment().getSequencesArray();
173 // for (int s = 0; s < sq.length; s++)
175 // Vector<PDBEntry> pdbids = sq[s].getPDBId();
176 // if (pdbids != null)
178 // for (int pe = 0, peSize = pdbids.size(); pe < peSize; pe++)
180 // PDBEntry pentry = pdbids.elementAt(pe);
181 // if (!fileids.contains(pentry.getId()))
187 // fileids.add(pentry.getId());
192 // PDBEntry[] newEntries = new PDBEntry[pdbe.size()];
193 // for (int pe = 0; pe < pdbe.size(); pe++)
195 // newEntries[pe] = pdbe.get(pe);
197 // setPdbentry(newEntries);
201 // public void showConsole(boolean show)
203 // // This never gets called because we haven't overriden the associated Jmol's
206 // .println("WARNING: unexpected call to ExtJmol's showConsole method. (showConsole="
211 // protected JmolAppConsoleInterface createJmolConsole(
212 // Container consolePanel, String buttonsToShow)
214 // // TODO Auto-generated method stub
219 // protected void releaseUIResources()
227 // public void releaseReferences(Object svl)
229 // // TODO Auto-generated method stub
234 // public Map<String, Object> getJSpecViewProperty(String arg0)
236 // // TODO Auto-generated method stub