Search in sources :

Example 1 with SequenceEvent

use of com.twinsoft.convertigo.beans.core.SequenceEvent in project convertigo by convertigo.

the class AbstractSequenceComposite method checkEventSource.

protected boolean checkEventSource(EventObject event) {
    boolean isSourceFromSequence = false;
    Object source = event.getSource();
    if (event instanceof SequenceEvent) {
        if ((source instanceof Sequence) || (source instanceof Step)) {
            Sequence sequence = null;
            if (source instanceof Sequence)
                sequence = (Sequence) source;
            if (source instanceof Step)
                sequence = ((Step) source).getParentSequence();
            if ((sequence != null) && (sequence.equals(this.sequence) || sequence.getOriginal().equals(this.sequence)))
                isSourceFromSequence = true;
        }
    }
    return isSourceFromSequence;
}
Also used : SequenceEvent(com.twinsoft.convertigo.beans.core.SequenceEvent) TreeObject(com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject) EventObject(java.util.EventObject) Sequence(com.twinsoft.convertigo.beans.core.Sequence) Step(com.twinsoft.convertigo.beans.core.Step)

Example 2 with SequenceEvent

use of com.twinsoft.convertigo.beans.core.SequenceEvent in project convertigo by convertigo.

the class AbstractSequenceCompositeWrap method checkEventSource.

protected boolean checkEventSource(EventObject event) {
    boolean isSourceFromSequence = false;
    Object source = event.getSource();
    if (event instanceof SequenceEvent) {
        if ((source instanceof Sequence) || (source instanceof Step)) {
            Sequence sequence = null;
            if (source instanceof Sequence)
                sequence = (Sequence) source;
            if (source instanceof Step)
                sequence = ((Step) source).getParentSequence();
            if ((sequence != null) && (sequence.equals(this.sequence) || sequence.getOriginal().equals(this.sequence)))
                isSourceFromSequence = true;
        }
    }
    return isSourceFromSequence;
}
Also used : SequenceEvent(com.twinsoft.convertigo.beans.core.SequenceEvent) EventObject(java.util.EventObject) Sequence(com.twinsoft.convertigo.beans.core.Sequence) Step(com.twinsoft.convertigo.beans.core.Step)

Aggregations

Sequence (com.twinsoft.convertigo.beans.core.Sequence)2 SequenceEvent (com.twinsoft.convertigo.beans.core.SequenceEvent)2 Step (com.twinsoft.convertigo.beans.core.Step)2 EventObject (java.util.EventObject)2 TreeObject (com.twinsoft.convertigo.eclipse.views.projectexplorer.model.TreeObject)1