// TODO Auto-generated method stub
}
+
+ @Override
+ public boolean isListeningFor(SequenceI seq)
+ {
+ if (sequence != null)
+ {
+ for (SequenceI s : sequence)
+ {
+ if (s == seq)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
}
// TODO Auto-generated method stub
}
+
+ @Override
+ public boolean isListeningFor(SequenceI seq)
+ {
+ if (sequence != null)
+ {
+ for (SequenceI s : sequence)
+ {
+ if (s == seq)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
}
*/
package jalview.gui;
-import jalview.structure.AtomSpec;
-import jalview.util.MessageManager;
-
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import fr.orsay.lri.varna.models.rna.Mapping;
import fr.orsay.lri.varna.models.rna.RNA;
+import jalview.datamodel.SequenceI;
+import jalview.structure.AtomSpec;
+import jalview.util.MessageManager;
+
public class AppVarnaBinding extends jalview.ext.varna.JalviewVarnaBinding
implements DropTargetListener, InterfaceVARNAListener,
MouseListener
public void highlightAtoms(List<AtomSpec> atoms)
{
}
+
+ @Override
+ public boolean isListeningFor(SequenceI seq)
+ {
+ return true;
+ }
}
*/
package jalview.javascript;
+import java.util.ArrayList;
+import java.util.List;
+
import jalview.api.AlignmentViewPanel;
import jalview.api.FeatureRenderer;
import jalview.api.SequenceRenderer;
import jalview.structure.StructureMappingcommandSet;
import jalview.structure.StructureSelectionManager;
-import java.util.ArrayList;
-import java.util.List;
-
/**
* Propagate events involving PDB structures associated with sequences to a
* javascript function. Generally, the javascript handler is called with a
}
+ @Override
+ public boolean isListeningFor(SequenceI seq)
+ {
+ return true;
+ }
+
}
import java.util.List;
+import jalview.datamodel.SequenceI;
+
public interface StructureListener
{
/**
* @param svl
*/
public void releaseReferences(Object svl);
+
+ /**
+ * Answers true if this listener is interested in the given sequence
+ *
+ * @param seq
+ * @return
+ */
+ public boolean isListeningFor(SequenceI seq);
}
protected void highlightStructure(StructureListener sl, SequenceI seq,
int index)
{
+ if (!sl.isListeningFor(seq))
+ {
+ return;
+ }
int atomNo;
List<AtomSpec> atoms = new ArrayList<AtomSpec>();
for (StructureMapping sm : mappings)
}
return true;
}
+
+ @Override
+ public boolean isListeningFor(SequenceI seq)
+ {
+ if (sequence != null)
+ {
+ for (SequenceI[] seqs : sequence)
+ {
+ if (seqs != null)
+ {
+ for (SequenceI s : seqs)
+ {
+ if (s == seq)
+ {
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
}
\ No newline at end of file