use of jmri.ThrottleListener in project JMRI by JMRI.
the class AbstractThrottle method removePropertyChangeListener.
// register for notification if any of the properties change
@Override
public void removePropertyChangeListener(PropertyChangeListener l) {
log.debug("Removing property change " + l);
if (listeners.contains(l)) {
listeners.removeElement(l);
}
log.debug("remove listeners size is " + listeners.size());
if ((listeners.isEmpty())) {
log.debug("No listeners so will call the dispose in the InstanceManger with an empty throttleListenr null value");
InstanceManager.throttleManagerInstance().disposeThrottle(this, new ThrottleListener() {
@Override
public void notifyFailedThrottleRequest(DccLocoAddress address, String reason) {
}
@Override
public void notifyThrottleFound(DccThrottle t) {
}
});
}
}
use of jmri.ThrottleListener in project JMRI by JMRI.
the class AbstractThrottleTest method testDispatch_ThrottleListener.
/**
* Test of dispatch method, of class AbstractThrottle.
*/
public void testDispatch_ThrottleListener() {
ThrottleListener l = null;
AbstractThrottle instance = new AbstractThrottleImpl();
instance.dispatch(l);
}
use of jmri.ThrottleListener in project JMRI by JMRI.
the class AbstractThrottleTest method testDispose_ThrottleListener.
/**
* Test of dispose method, of class AbstractThrottle.
*/
public void testDispose_ThrottleListener() {
ThrottleListener l = null;
AbstractThrottle instance = new AbstractThrottleImpl();
instance.dispose(l);
}
Aggregations