int atomNo = 0;
for (int i = 0; i < listeners.size(); i++)
{
- if (listeners.elementAt(i) instanceof StructureListener)
+ Object listener=listeners.elementAt(i);
+ if (listener==source)
{
- sl = (StructureListener) listeners.elementAt(i);
+ continue;
+ }
+ if (listener instanceof StructureListener)
+ {
+ sl = (StructureListener) listener;
if (mappings == null)
{
continue;
else
{
if (relaySeqMappings && hasSequenceListeners
- && listeners.elementAt(i) instanceof SequenceListener)
+ && listener instanceof SequenceListener)
{
// DEBUG
// System.err.println("relay Seq " + seq.getDisplayId(false) + " " +
}
if (hasSequenceListeners)
{
- ((SequenceListener) listeners.elementAt(i))
+ ((SequenceListener) listener)
.highlightSequence(results);
}
}
- else if (listeners.elementAt(i) instanceof VamsasListener
+ else if (listener instanceof VamsasListener
&& !handlingVamsasMo)
{
// DEBUG
// index);
// pass the mouse over and absolute position onto the
// VamsasListener(s)
- ((VamsasListener) listeners.elementAt(i)).mouseOver(seq,
+ ((VamsasListener) listener).mouseOver(seq,
indexpos, source);
}
- else if(listeners.elementAt(i) instanceof SecondaryStructureListener){
- ((SecondaryStructureListener) listeners.elementAt(i)).mouseOverSequence(seq,indexpos);
+ else if(listener instanceof SecondaryStructureListener){
+ ((SecondaryStructureListener) listener).mouseOverSequence(seq,indexpos);
}
}
}