Search in sources :

Example 1 with ControllerEvent

use of gate.event.ControllerEvent in project gate-core by GateNLP.

the class ConditionalSerialController method remove.

@Override
public boolean remove(ProcessingResource pr) {
    int index = prList.indexOf(pr);
    if (index != -1) {
        prList.remove(index);
        strategiesList.remove(index);
        fireResourceRemoved(new ControllerEvent(this, ControllerEvent.RESOURCE_REMOVED, pr));
        return true;
    }
    return false;
}
Also used : ControllerEvent(gate.event.ControllerEvent)

Example 2 with ControllerEvent

use of gate.event.ControllerEvent in project gate-core by GateNLP.

the class ConditionalSerialController method remove.

@Override
public ProcessingResource remove(int index) {
    ProcessingResource aPr = super.remove(index);
    strategiesList.remove(index);
    fireResourceRemoved(new ControllerEvent(this, ControllerEvent.RESOURCE_REMOVED, aPr));
    return aPr;
}
Also used : ProcessingResource(gate.ProcessingResource) ControllerEvent(gate.event.ControllerEvent)

Aggregations

ControllerEvent (gate.event.ControllerEvent)2 ProcessingResource (gate.ProcessingResource)1