[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| [udig-devel] Changes to the Style system | 
In order to implement the decorator API some changes to the styling 
system have to be made.
Style Extension point:
attribute: id - > string
attribute: class -> StyleFactory
StyleFactory interface
boolean canStyle(Layer);
Style createStyle();
The RendererCreator's bestfit method must be altered to take styles into 
account.
Rendering a layer:
1) Build a renderer candidate set
2) Populate the styles black board for the layer
3) If there is a current style, choose a renderer  that supports that 
style. Otherwise, choose the best renderer. Then choose a style that 
that renderer supports.
This requires adding a Map(styleExtensionPointID, Style) of Styles to 
Layer. This is essentially a style bucket or blackboard.
This brings us to Decorators:
A "DecoratorGeoResource" is required - a generic one for all decorators 
that contains an identifier, signifying which type of decorator this 
layer is. This allows the RendererCreator to select the appropriate 
Decorator Renderer for the layer.
So as an extender there is two possibilities. One idea is to make the 
decorator extension point an 'sub' extension point of renderer. Each 
decorator extension would therefor implement the Renderer interface. The 
extender would also have to provide a Style for their decorator. (Ex: 
ScalebarStyle)
There is also a StyleConfig object that is used to change the 
configuration of style objects. This is mostly used by the StyleEditor UI.