Hello  Michael !

thank you for your guidance ! :)

when I looked at the gt-swt , we can see that the font color functionality 
works very well in it.
I tried to understand the code, but couldn't get much about it.

so, in swing , how can we create new SLD for the new style and then apply it to 
layer ?
it will work, right ?

thanks ! :)

________________________________
Best regards,Rakshit Majithiya
Techno geek, Web Developer,Code Lover
email : [email protected]
blog : http://thetechtime.com
skype : rakshit.majithiya


________________________________
 From: Michael Bedward <[email protected]>
To: Rakshit Majithiya <[email protected]> 
Cc: Andrea Aime <[email protected]>; Geotools Mailing List 
<[email protected]> 
Sent: Saturday, 3 March 2012 4:57 AM
Subject: Re: [Geotools-gt2-users] Change Font Color from Style dialogue
 
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..
>
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to