Larry,

could you please elaborate in short what this change does on the code level?

..thanks ede

On 02.04.2012 16:53, Larry Becker wrote:
> Hi Michaël and Jukka,
> 
>   It looks to me like one of the many revisions to FeatureInstaller lost an
> important change to support EZ Buttons.  The patch below restores it.  The
> change to EasyPanel should not be necessary.  Please excuse me if my
> superficial look at the code has missed an important detail.
> 
> Larry
> 
> 
> Index:
> C:/eclipse3/workspace/OpenJumpSvn/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java
> ===================================================================
> ---
> C:/eclipse3/workspace/OpenJumpSvn/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java
> (revision 2786)
> +++
> C:/eclipse3/workspace/OpenJumpSvn/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java
> (working copy)
> @@ -649,12 +649,12 @@
>    }
> 
>    public void addMenuItemShownListener(final JMenuItem menuItem,
> -      final MenuItemShownListener menuItemShownListener) {
> -    JMenu menu = (JMenu) ((JPopupMenu) menuItem.getParent()).getInvoker();
> -    menu.addMenuListener(new MenuItemShownMenuListener(menuItem,
> -        menuItemShownListener));
> +          final MenuItemShownListener menuItemShownListener) {
> +      JMenu menu = (JMenu) ((JPopupMenu)
> menuItem.getParent()).getInvoker();
> +      menu.addMenuListener(new JumpMenuListener(
> menuItemShownListener,menuItem));
>    }
> 
> +
>    /**
>     * Convenience method for entries without menupath
>     *
> 
> 
> On Mon, Apr 2, 2012 at 2:41 AM, Rahkonen Jukka 
> <jukka.rahko...@mmmtike.fi>wrote:
> 
>> Hi,
>>
>> I had a try with rev. 2785 and "Combine two polygons" attached to EZ
>> Buttons so that the layer was editable at the time of shortcut creation.
>>  For me the EZ Button connected tool still combines selected polygons
>> whether the layer is editable or not. I tried with a few different ways.
>> - By toggling the Editable setting of a layer without closing the file in
>> between.
>> - Saving the editable layer on disk and opening it as non-editable
>> - By creating new layers, adding a few polygons, making then non-editable
>> and using the EZ Button connected combine tool.
>>
>>
>> -Jukka Rahkonen-
>>
>> Michaël Michaud wrote:
>>>
>>> Hi Jukka, Larry
>>>> - "Combine two selected polygons tool" is fast but it has a
>>> little bug. It allows to combine polygons even if the layer
>>> is non-editable.
>>>>> How do you do that ? Menu item is inactive (grayed) if
>>> layer is non editable.
>>>> Good question indeed. It took awhile to repeat it. This is
>>> somehow related to EZ-Buttons shortcut. The shortcut seems to
>>> remember, not only the menu selection it is connected with,
>>> but also the state of OJ project when the shortcut was
>>> created. It can be created by opening some layer to OJ and
>>> making is editable so thet combine two polygons is working.
>>> Create the EZ-Button shortcut now and add a new layer. Now
>>> the EZ-Buttons shortcut combines polygons even the layer is
>>> not editable. So this is a feature in the EZ-Buttons.
>>> I tried to fixed this problem.
>>>
>>> Jukka, could you have a look to check it solves your problem
>>> (from svn 2781)
>>> Larry, could you double check the small change I did to the
>>> EasyPanel class
>>> http://jump-pilot.svn.sourceforge.net/viewvc/jump-pilot/core/t
>> runk/src/org/openjump/core/ui/plugin/view/EasyPanel.java?r1=1873&r2=>
>> 2781&sortby=date
>>>
>>> Thanks,
>>>
>>> Michaël
>>>
>>>
>>>
>>>> - "Combine polygon with neighbouring polygon" is very slow
>>> and can give an out-of-memory error. Is it perhaps walking
>>> through all the features when searching for the one to use
>>> for combining? I would guess that it should be much faster if
>>> it correctly selects just the few adjacent polygons for
>>> candidates first.
>>>>> I think the algo of this plugin is not so simple... I
>>> think Stefan know it better
>>>> - Making union of selected features suits me well because I
>>> would like to combine about 10-20 polygons together. However,
>>> because it creates new layer each time there is some extra
>>> work with joining them together later.
>>>> - "Union selected in place (if result can be simple
>>> polygon)" would be the ideal tool for just this case.
>>>>> Agree, this would be helpful. Not sure I would limit to
>>> simple polygons though.
>>>> In my case I want that the new areas are also continuos.
>>> Sometimes multipolygons would be acceptable. Perhaps there
>>> could be a check box for cases when features selected for
>>> combining are all simple polygons "Allow multipolygons as new
>>> features? ". If selection already contains multipolygons then
>>> the result can naturally contain them too.
>>>>
>>>>> I suppose you don't want to union all adjacent polygons,
>>> otherwise, the simplest is to union the whole layer, then to
>>> explode the multipolygon.
>>>> Yes, this is the case.  All the polygons in the layer are
>>> adjacent and all together would be a monster polygon with
>>> thousands of holes and hundreds of thousands of vertices. I
>>> am going to reduce the number of polygons into about 500 and
>>> I want all them to have some reasonable amount of vertices.
>>> Automatic system by using some grid layer as a helper layer
>>> for splitting data into rectangular pieces first to be
>>> unioned later tile by tile would not give directly a good
>>> result. Data is from archipelago and in some places there is
>>> just open sea and in other places masses of islands. I will
>>> get the job ready faster by doing the selections manually.
>>> "Union selected in place" tool would make it more convenient, though.
>>>>
>>>>
>>>>> Here is a workaround (didn't check it though)
>>>>> - create a second layer.
>>>>> - draw 1 linestring per group of building, intersecting
>>> all buildings you want to aggregate (and only those one)
>>>>> - create an auto-increment attribute on these linestring layer
>>>>> - do a spatial join to transfer linestring id to polygons
>>>>> - union polygons by attribute
>>>>> (you will get a multipolygon with all polygons not
>>> intersecting a linestring : explode it)
>>>> Sounds doable, I will try it next week.
>>>>
>>>> -Jukka-
>>>>> Michaël
>>>>
>>>>
>>>>
>>>> -Jukka Rahkonen-
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>> --------------------------------------------------------------
>>> ----------------
>>>> This SF email is sponsosred by:
>>>> Try Windows Azure free for 90 days Click Here
>>>> http://p.sf.net/sfu/sfd2d-msazure
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Jump-pilot-devel mailing list
>>>>
>>> Jump-pilot-devel@lists.sourceforge.net<mailto:Jump-pilot-devel
>> @lists.sourceforge.net>
>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>>
>>>>
>>>>
>>>>
>>> --------------------------------------------------------------
>>> ----------------
>>>> This SF email is sponsosred by:
>>>> Try Windows Azure free for 90 days Click Here
>>>> http://p.sf.net/sfu/sfd2d-msazure
>>>> _______________________________________________
>>>> Jump-pilot-devel mailing list
>>>> Jump-pilot-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>>
>>>>
>>>
>>>
>>> --------------------------------------------------------------
>>> ----------------
>>> This SF email is sponsosred by:
>>> Try Windows Azure free for 90 days Click Here
>>> http://p.sf.net/sfu/sfd2d-msazure
>>> _______________________________________________
>>> Jump-pilot-devel mailing list
>>> Jump-pilot-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> This SF email is sponsosred by:
>> Try Windows Azure free for 90 days Click Here
>> http://p.sf.net/sfu/sfd2d-msazure
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure
> 
> 
> 
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to