Package org.locationtech.udig.project.ui.internal.tool.impl

Examples of org.locationtech.udig.project.ui.internal.tool.impl.ToolContextImpl


     * @return a ToolContext
     * @see ToolContext
     */
    public static IToolContext createContext(IMap map) {
        if (map instanceof org.locationtech.udig.project.internal.Map) {
            ToolContext context = new ToolContextImpl();
            context
                    .setMapInternal((org.locationtech.udig.project.internal.Map) map);
            return context;
        }
        return null;
    }
View Full Code Here


       
    }
   
    public TestHandler( int numFeatures, String featureTypeName) throws Exception {
        super(null, null);
        ToolContextImpl context = new ToolContextImpl();
        map = MapTests.createDefaultMap(featureTypeName, numFeatures, true, new Dimension(10,10));
        context.setMapInternal(map);
        context.setRenderManagerInternal(map.getRenderManagerInternal());
        ((RenderManager)context.getRenderManager()).setMapDisplay(new TestViewportPane(new Dimension(500,500)));
        setContext(context);
        testing=true;
        bb=new TestEditBlackboard(10,10, context.worldToScreenTransform(), map.getLayersInternal().get(0).layerToMapTransform());

        setCurrentState(EditState.NONE);
        setCurrentShape(null);
    }
View Full Code Here

                            && currentContext.getMapInternal() == editor.getMap())
                        return;
                    if (currentContext != null)
                        currentContext.getEditManagerInternal().eAdapters().remove(this);

                    currentContext = new ToolContextImpl();
                    currentContext.setMapInternal(editor.getMap());
                    currentContext.setRenderManagerInternal(editor.getMap()
                            .getRenderManagerInternal());
                    currentContext.getEditManagerInternal().eAdapters().add(this);
                    for( IUDIGView view : views ) {
View Full Code Here

        if (!map.eAdapters().contains(listener)){
            map.eAdapters().add(listener);
        }
       
        // Define the tool context allowing tools to interact with this map
        ToolContext tools = new ToolContextImpl();
        tools.setMapInternal(map);
       
        // Provide each tool with the new tool context
        //
        setContext(modalCategories, tools); // if active a modal tool is supposed to register listeners
        setContext(actionCategories, tools);
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.ui.internal.tool.impl.ToolContextImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.