On Fri, Mar 2, 2012 at 4:16 PM, Rakshit Majithiya
<[email protected]> wrote:
> Hello all !
>
> I am trying to implement a font color feature in "JFontChooser"
> ( http://svn.osgeo.org/geotools/tags/8.0-M4/modules/unsupported/swing/src/main/java/org/geotools/swing/styling/JFontChooser.java )
>
> My main purpose is to change the color of Labels of fields on the layer
> using
> JSimpleStyleDialog(http://svn.osgeo.org/geotools/tags/8.0-M4/modules/unsupported/swing/src/main/java/org/geotools/swing/styling/JSimpleStyleDialog.java).
>
> In the source code of JFontChooser, the following lines are creating new
> font
>
>     private void createSelectedFont() {
>         selectedFont = sf.createFont(
>                 ff.literal(families[familyIndex]),
>                 ff.literal(styles[styleIndex]),
>                 ff.literal(weights[weightIndex]),
>                 ff.literal(String.valueOf(sizes[sizeIndex])));
>
>     }
>
> using which, I obviously cannot modify the font color.. because color is not
> property of org.geotools.styling.Font.
>
> Is there any way to achieve this goal ?

The color of a TextSymbolizer is not specified in its Font, but as its
"fill" property
instead

Cheers
Andrea


-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to