}
}
private void addRegionListener() {
ILayer processingRegionLayer = OmsBoxPlugin.getDefault().getProcessingRegionMapGraphic();
IStyleBlackboard blackboard = processingRegionLayer.getStyleBlackboard();
currentBlackboardListener = new IBlackboardListener(){
public void blackBoardCleared( IBlackboard source ) {
}
public void blackBoardChanged( BlackboardEvent event ) {
Object key = event.getKey();
if (key.equals(ProcessingRegionStyleContent.ID)) {
Object newValue = event.getNewValue();
if (newValue instanceof ProcessingRegionStyle) {
ProcessingRegionStyle processingStyle = (ProcessingRegionStyle) newValue;
setRegion(processingStyle);
}
}
}
};
blackboard.addListener(currentBlackboardListener);
}