[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[udig-devel] LayerDecorator and LayerListener/LayerEvent
|
I have been attempting to hook up StyleView to the layer notification
system. StyleView works by having a clone of the layer blackboard which
it needs to keep in sync with updates from the layer, while only pushing
changes back during the application of a style change.
The class SelectionLayer already provides a layer decorator (aka an
Object that operates as a wrapper on a layer while maintaining the same
interface).
SelectionLayer pretends to be the original layer while replacing the
existing StyleBlackboard with one specifically designed to render things
in Orange.
StyleLayer pretends to be the original layer while replacing the
existing StyleBlackboard with one that can be edited.
Since this is a common use I have taken the boilerplate code into
LayerDecorator.
The other addition is the need to listen to modifications on the layer,
right now layer makes use of EMF "adapters" which are like the listeners
everyone knows and loves.
Jesse has promised me normal listeners for a while, now today I have
defined the interface and make use of it for StyleLayer. The
implementation will forward any events from the original layer in
addition to indicating changes to the local clone of the blackboard.
This work replaces the concept of StyleTransaction, StyleTransaction
made allowances for editing multiple layers. This can still be
accomplished - simply wraps multiple Layers (each in its own StyleLayer).
I hope this makes sense to all involved.
Jody