3 import jalview.api.AlignmentViewPanel;
4 import jalview.datamodel.PDBEntry;
5 import jalview.datamodel.SequenceI;
6 import jalview.ext.rbvi.chimera.JalviewChimeraBinding;
7 import jalview.structure.StructureSelectionManager;
9 public class JalviewChimeraBindingModel extends JalviewChimeraBinding
11 private ChimeraViewFrame cvf;
13 private FeatureRenderer fr = null;
15 public JalviewChimeraBindingModel(ChimeraViewFrame chimeraViewFrame,
16 StructureSelectionManager ssm, PDBEntry[] pdbentry,
17 SequenceI[][] sequenceIs, String[][] chains, String protocol)
19 super(ssm, pdbentry, sequenceIs, chains, protocol);
20 cvf = chimeraViewFrame;
24 public FeatureRenderer getFeatureRenderer(
25 AlignmentViewPanel alignment)
27 AlignmentPanel ap = (alignment == null) ? cvf.getAlignmentPanel()
28 : (AlignmentPanel) alignment;
29 if (ap.av.isShowSequenceFeatures())
33 fr = (jalview.gui.FeatureRenderer) ap.cloneFeatureRenderer();
37 ap.updateFeatureRenderer(fr);
45 public jalview.api.SequenceRenderer getSequenceRenderer(
46 AlignmentViewPanel alignment)
48 return new SequenceRenderer(((AlignmentPanel) alignment).av);
52 public void refreshGUI()
54 javax.swing.SwingUtilities.invokeLater(new Runnable()
58 cvf.updateTitleAndMenus();
64 public void updateColours(Object source)
66 AlignmentPanel ap = (AlignmentPanel) source;
67 // ignore events from panels not used to colour this view
68 if (!cvf.isUsedforcolourby(ap))
72 if (!isLoadingFromArchive())
74 colourBySequence(ap.av.isShowSequenceFeatures(), ap);
79 public void releaseReferences(Object svl)
84 protected void releaseUIResources()
89 public void refreshPdbEntries()