Cool, it works. Thanks.
-----Ursprüngliche Nachricht-----
Von: Sascha L. Teichmann [mailto:[EMAIL PROTECTED]
Gesendet am: Montag, 18. Juni 2007 13:55
An: JUMP Users Discussion
Betreff: Re: [jump-users] Beanshell: change Style of Layer
Hi Stefan!
Maybe a
layer = wc.layerManager.getLayer("bb_bofla");
layer.removeStyle(layer.getStyle(BasicStyle.class));
layer.addStyle(Style1)
instead of
wc.layerManager.getLayer("bb_bofla").addStyle(Style1);
helps?
Styles are stored in list so a simple
addStyle() appends another but you want to replace
the old.
Regards,
Sascha
Ziegler Stefan schrieb:
> Hi
>
> I'm changing the style of a layer with the following lines:
>
> Style1 = new BasicStyle();
> Style1.setFillColor(new Color(0,0,0,0));
> Style1.setLineColor(new Color(255,255,0,0));
> Style1.setLineWidth(3);
>
> wc.layerManager.addLayer("Gebäudeadresse", "bb_bofla", fc);
> wc.layerManager.getLayer("bb_bofla").addStyle(Style1);
>
> Everythings works fine except that the small rectangle in the legend
on
> the left side shows still the original color of the layer which was
> assigned by OpenJump automatically. Did I miss something? Is there a
> kind of refresh-method or something like that?
>
> Thanks.
>
> Stefan
>
> Mit freundlichem Gruss
> Stefan Ziegler
> Leiter Aufsicht
>
> Kanton Solothurn
> Bau- und Justizdepartement
> Amt für Geoinformation
> Rötistrasse 4
> 4501 Solothurn
> Telefon 032 627 75 96
> Telefax 032 627 75 98
> [EMAIL PROTECTED]
> http://www.so.ch
>
>
>
------------------------------------------------------------------------
>
> _______________________________________________
> jump-users mailing list
> [email protected]
> http://lists.refractions.net/mailman/listinfo/jump-users
_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users
_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users