X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAppJmolBinding.java;h=932517205d2a76048dad99a679419d7c1cab6239;hb=725f1f4a7e1448349bf7dd5f8efb1370de5b9a3e;hp=4d7f7cf4b43dd9aa34035c53b90a297d1f945647;hpb=7d67fb613ec026dc9a265e351e7fab542e3f1d61;p=jalview.git diff --git a/src/jalview/gui/AppJmolBinding.java b/src/jalview/gui/AppJmolBinding.java index 4d7f7cf..9325172 100644 --- a/src/jalview/gui/AppJmolBinding.java +++ b/src/jalview/gui/AppJmolBinding.java @@ -21,6 +21,7 @@ package jalview.gui; import jalview.api.AlignmentViewPanel; +import jalview.api.structures.JalviewStructureDisplayI; import jalview.bin.Cache; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; @@ -39,36 +40,15 @@ public class AppJmolBinding extends JalviewJmolBinding { private AppJmol appJmolWindow; - private FeatureRenderer fr = null; - public AppJmolBinding(AppJmol appJmol, StructureSelectionManager sSm, - PDBEntry[] pdbentry, SequenceI[][] sequenceIs, DataSourceType protocol) + PDBEntry[] pdbentry, SequenceI[][] sequenceIs, + DataSourceType protocol) { super(sSm, pdbentry, sequenceIs, protocol); appJmolWindow = appJmol; } @Override - public FeatureRenderer getFeatureRenderer(AlignmentViewPanel alignment) - { - AlignmentPanel ap = (alignment == null) ? appJmolWindow - .getAlignmentPanel() : (AlignmentPanel) alignment; - if (ap.av.isShowSequenceFeatures()) - { - if (fr == null) - { - fr = (jalview.gui.FeatureRenderer) ap.cloneFeatureRenderer(); - } - else - { - ap.updateFeatureRenderer(fr); - } - } - - return fr; - } - - @Override public SequenceRenderer getSequenceRenderer(AlignmentViewPanel alignment) { return new SequenceRenderer(((AlignmentPanel) alignment).av); @@ -208,4 +188,25 @@ public class AppJmolBinding extends JalviewJmolBinding // TODO Auto-generated method stub return null; } + + @Override + public JalviewStructureDisplayI getViewer() + { + return appJmolWindow; + } + + @Override + public jalview.api.FeatureRenderer getFeatureRenderer( + AlignmentViewPanel alignment) + { + AlignmentPanel ap = (alignment == null) + ? appJmolWindow.getAlignmentPanel() + : (AlignmentPanel) alignment; + if (ap.av.isShowSequenceFeatures()) + { + return ap.av.getAlignPanel().getSeqPanel().seqCanvas.fr; + } + + return null; + } }