((IEventSource<EntityPropertyChangedEvent<IPostScanBehaviour>>) postScanBehaviour)
.removeListener(postScanBehaviourListener);
}
if (this.config != null && this.config instanceof IConfig1D
&& this.config instanceof IEventSource) {
IDimension d = ((IConfig1D) this.config).getDimensionX();
if (d != null && d instanceof IEventSource) {
((IEventSource<EntityPropertyChangedEvent<IDimension>>) d)
.removeListener(dimensionListener);
}
}
this.config = config;
if (config != null) {
if (config.getScanAddOn() == null) {
config.setScanAddOn(new ScanAddOnModel());
}
scanAddOns = config.getScanAddOn();
if (scanAddOns.getPostScanBehaviour() == null) {
scanAddOns.setPostScanBehaviour(new PostScanBehaviourModel());
}
postScanBehaviour = scanAddOns.getPostScanBehaviour();
refresh();
((IEventSource<EntityPropertyChangedEvent<IPostScanBehaviour>>) postScanBehaviour)
.addListener(postScanBehaviourListener);
((IEventSource<EntityPropertyChangedEvent<IConfig<?>>>) this.config)
.addListener(configListener);
IDimension d = null;
if (config instanceof IConfig1D) {
d = ((IConfig1D) config).getDimensionX();
}
if (d != null) {
((IEventSource<EntityPropertyChangedEvent<IDimension>>) d)