Re: [Geotools-devel] color layer

4 messages Options
Embed this post
Permalink
mbedward

Re: [Geotools-devel] color layer

Reply Threaded More More options
Print post
Permalink
Hello Cintia,

I'm moving your question to the GeoTools user list.

Can you provide more information please ?  For instance, are you are
trying to retrieve the color that has been used by the renderer for a
particular feature ?  Or are you trying to set colours ?

Michael

2009/10/8 Cintia <[hidden email]>:
> Hi,
> How can I get color of a layer?
> Thanks
> Cintia
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
mbedward

Re: [Geotools-devel] color layer

Reply Threaded More More options
Print post
Permalink
2009/10/8 Cintia <[hidden email]>:

> Hi Michael,
> Thank you for your help.
> I want to get a color of a layer that tree menu
>         ContextTreeNode node = (ContextTreeNode)
> tree[0].getLastPathComponent();
>         layer = (MapLayer) node.getUserObject() ;
> Here I get a layer. And the color? The layer is a shapefile (polygon, line
> or point).
> Thanks
> Cintia
>

Hi Cintia,

I see that you are using the gt-widgets-swing-pending module. I'm
afraid that module has no maintainer and will not be continued. The
active module is gt-swing which is minimal compared to
widgets-swing-pending but does have the advantage that it is being
actively developed.

I'm sorry for this terrible confusion of swing module names in
GeoTools 2.6 !  In summary, there is:

gt-swing (modules/unsupported/swing) which is active

gt-widgets-swing (modules/unsupported/widgets-swing) no longer maintained

gt-widgets-swing-pending (modules/unsupported/widgets-swing-pending)
no longer maintained

Now to your question, I'm very sorry but I'm still not able to
understand it properly. What is it that you want to get the colour of
?

I see that you are retrieving a MapLayer in your code but I don't
understand what you want to ask of it.

Michael

PS. please post to the user list so that others may also be able to help you

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
mbedward

Re: [Geotools-devel] color layer

Reply Threaded More More options
Print post
Permalink
In reply to this post by mbedward
Hi Cintia,

> Does this additional module allows me to create a menu like
> widgets-swing-pending?
> Do you have any example?
> I need to get the color layer to set up something similar to
> LayerStylePropertyPanel, but this doesn´t work very well
> Thank you very much.
> Cintia
>

I don't know exactly what LayerStylePropertyPanel offers because I
can't get it to work :-(

In the gt-swing module there is a dialog class that allows you to set
very basic rendering style elements:

- line colour and width
- fill colour and opacity
- point symbol and size
- label font

http://docs.codehaus.org/display/GEOTDOC/JSimpleStyleDialog

Does that do what you need ?

Michael

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
mbedward

Re: [Geotools-devel] color layer

Reply Threaded More More options
Print post
Permalink
In reply to this post by mbedward
Hi Cintia

> using JMapFrame. I enable the option to display a LayerTable. How I do to
> show the JSimpleStyleDialog by clicking on the right button on a layer?

The style dialog and layer table are both fairly new components and
are not hooked together properly at the moment.  If you are willing to
be a beta-tester for me I can send you a version of gt-swing that does
what you need (this is code that will be in GeoTools 2.7).

I can either send a jar file or a patch for the source code. Please
let me know which is most convenient for you.

Michael

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users