That would work for me. However perhaps if we want to give full control in
terms of layout perhaps we should do something like this.

GeoServerNodeInfo {
  String getId();
  WebMarkupContainer render(MarkupContainer parent);
}

And then with a subclass that creates a single element with a css stye
applied. Whether that is from a template, an option map, or a single
getCssStyle() method becomes an implementation detail.

On Thu, Mar 13, 2014 at 9:41 AM, Andrea Aime
<andrea.a...@geo-solutions.it>wrote:

>
>>>> Hmmm... how about using the same terminology as the system properties:
>>>
>>> interface GeoServerNodeInfo {
>>>   String getId();
>>>   Map<String,String> getOptions();
>>>  }
>>>
>>
>> There was actually a reason, the style that sits behind the identifier
>> element is build
>> from this template:
>>
>> position:absolute; top:12px; left:12px; right:28px; width:auto;
>> background:$background; padding: 1px; border: 1px solid #0076a1;
>> color:$color; font-weight:bold
>>
>
> And of course I forgot to complete this sentence... I wanted to give
> implementors of GeoServerNodeInfo
> the ability to control the styling fully. However if we apply the approach
> below, that would
> work with getOptions as a map too.
>
>
>> However, getOptions could just return all of the above as a map (with the
>> placeholders replaced)
>> and the style attribute be built from it. I guess we can also have each
>> of the elements templatable
>> and allow new elements to be inserted, that would make the above a
>> "default", so that if
>> for example you want to have italic you could add font-style:italic to
>> the system variable.
>>
>
> Cheers
> Andrea
>
> --
> ==
> Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
> for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39  339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>



-- 
*Justin Deoliveira*
Vice President, Engineering | Boundless
jdeol...@boundlessgeo.com
@j_deolive <https://twitter.com/j_deolive>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to