Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] activating a tool without having it in the toolbar

Really do not think you are bothering, instead you help with your
thoughtd :). I have some difficulties to understand how to get the
categories properly created in order to make things appear in the proper
menu parts and in nice buttons with more than one tool. I wasn't able to
create new ones. Can you post a plugin.xml snippet where a new category
is created and you see it new and with a nice icon or so? I am doing
something wrong and I can't figure out what... :)

Cheers
Andrea


tony.roth@xxxxxx probaly wrote:
>  
> solution:
> the tool has to be in a category which has only tools with
> onToolbar="false". Then the category is not shown in the toolbar and it
> works like I want it.
>  
> I'm still in my private udig learning process :)
> sorry for bothering the list
>  
> tony roth
> 
> 
>     I want to activate a tool (e.g. the PolygonTool) without having it
>     in the toolbar. In my plugin.xml I declare the modal tool with all
>     its attributes like categoryId, class,... and onToolbar="false".
>     Which works: It is not on the toolbar.
>     In my code I activate this tool programatically this way:
>     IAction tool = ApplicationGIS.getToolManager().getTool("...","...");
>     // toolID and categroyID
>     tool.run();
>     the good fact: The tool is activated and I can draw the polygon on
>     the map.
>     but: The tool appears in the toolbar in its category. It is the the
>     activated tool (so one can see it) but not in the list which opens
>     clicking the little arrow. Which means that using another tool of
>     this category lets the tool disappear again. Using a tool of another
>     category will deactivate the tool but it's still visible and
>     selectable.
>     How can I prevent this behaviour?
>     Is there another way to activate a tool?
>     (background:
>     To many tools in the toolbar will confuse some of my users.
>     Therefore the tools shall be activated out of some workflow
>     components like special view parts, dialogs, ...
>     Only some general actions like zoom or pan have to be selectable via
>     the toolbar.)
>     thanks again,
>     tony roth
>     _______________________________________________
>     User-friendly Desktop Internet GIS (uDig)
>     http://udig.refractions.net <http://udig.refractions.net/>
>     http://lists.refractions.net/mailman/listinfo/udig-devel
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel


Back to the top