Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] How can I get the modal tools switching events?Look for help!

I am not sure if there is such an event; we don't tend to add things until people request them. When you implement your own tool you are given various methods to know when you have been activated (incase you need to prepare the map with some graphic commands for feedback etc...).

Still MapViewer (used by the MapEditor to display the map; also used by your own code) has a setModalTool method let us see where that goes.

public void setModalTool( ModalTool tool ) {
        if (activeTool != null) {
            // ask the current tool to stop listening etc...
            activeTool.setActive(false);
            activeTool = null;
        }
        if( tool == null ){
            return;
        }
        activeTool = tool;
        activeTool.setContext(getToolContext());
        activeTool.setActive(true);
    }

So I don't see any event notification there ... 

Jody

On 17/08/2009, at 12:44 PM, yoyobird wrote:


   There are many modal tools ,such as pick tool ,distance tool. Now I want to get the tools switching events when the user select another tool  by listener inferface .How can I do that?
    Thank you!


好玩贺卡等你发,邮箱贺卡全新上线!


好玩贺卡等你发,邮箱贺卡全新上线!_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


Back to the top