Hello Rakshit,

The styling dialogs are extremely basic and do not cater for what you
want to do.  Also, I'm afraid you would need to modify more than the
font dialog.  The swing dialogs were only intended for the most basic
applications.

The current code works as follows:
- Your font preferences are passed back from JFontChooser to JSimpleStyleDialog.

- JSimpleStyleDialog passes the font and other information to one of
the static methods in the org.geotools.styling.SLD utility class to
create a Style

- The SLD class methods are hard coded to use a black text fill.

Doing what you want with minimal coding would involve modifying the
dialogs, and then adding new versions of the relevant SLD class
methods (createPolygonStyle etc) which accept an additional label fill
argument.

A better way to do it would be to re-code the dialogs to use the new
StyleBuilder class in the brewer module.

I will not be able to implement either of the above in the near future
but I could review changes contributed as a patch. However, if you are
very new to GeoTools this is probably not a practical option for you.

If it is just styling, rather than interactive styling, that is
important to your application you might want to investigate using SLD
documents or the brewer module StyleBuilder directly. Either of these
will give you huge flexibility, though both will take some time to
learn.

For the StyleBuilder, there are presently no docs so the best way to
learn it is to study the sources of the unit tests.

Michael

On 3 March 2012 03:21, Rakshit Majithiya <[email protected]> wrote:
> Hi !
> thanks for having a look  :)
>
> How to change the "fill" property  ??
> Should we modify the object of "Font" or anything else ?
> I am sorry, I am not much experienced with geotools..
>

------------------------------------------------------------------------------
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