There is already a Style for IMemento you may want to see if you can use that before creating a new StyleContent just for strings. It is currently called DialogSettingsStyleContent.On 15-May-08, at 7:03 PM, Jody Garnett wrote: Joe Dente wrote:
Hi,
I have a simple String property that I need persisted in the StyleBlackboard. Is there any way to simply dump the String onto the StyleBlackboard, or do I need to implement a StyleContent and StyleConfigurator for my String?
You need to implement a StyleContent (which is also responsible for producing a default value; so you actually need it). The WMSStyleContent is an example that saves a single string.
You don't need a StyleConfigurator, but it is polite (it allows the user to see what is going on and change the value) from the StyleEditor. You can modify the style entry from some other View or Dialog if you want; I only ask that you don't let Renderers modify the style blackboard (or we would get a very difficult feedback loop).
Jody _______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
|