Package org.locationtech.udig.project.ui.render.displayAdapter

Examples of org.locationtech.udig.project.ui.render.displayAdapter.ViewportPane.addDrawCommand()


        // All SWT widgets have helper methods to determine this so:
        Control control=pane.getControl();
        final Point drawLocation = control.toControl(getEvent().x, getEvent().y);
       
        // By Adding a custom draw command we can draw on the viewport model...
        pane.addDrawCommand(new AbstractDrawCommand(){

            public Rectangle getValidArea() {
                // I'm being lazy and returning null so that this will be re-drawn every time the
                // Viewport is updated.
                return null;
View Full Code Here


            tasks = new CopyOnWriteArrayList<AnimationUpdater>();
            displayToTaskMap.put(frameInterval, tasks);
        }

        AnimationUpdater updater = findUpdater(frameInterval,  viewport);
        viewport.addDrawCommand(animation);

        if (updater != null) {
            updater.getAnimations().add(animation);
        } else {
            AnimationUpdater task = new AnimationUpdater((ViewportPane) viewport, frameInterval);
View Full Code Here

        if (drawShapeCommand == null) {
            DrawCommandFactory dcf = DrawCommandFactory.getInstance();
            drawShapeCommand = dcf.createDrawShapeCommand(shape);
            IToolContext context = handler.getContext();
            ViewportPane viewportPane = context.getViewportPane();
            viewportPane.addDrawCommand(drawShapeCommand);
        } else {
            drawShapeCommand.setShape(shape);
        }
        handler.repaint();
       
View Full Code Here

        return selectionFactory;
    }
    public void sendCommand( IDrawCommand command ) {
        command.setMap(getMap());
        ViewportPane viewportPane = ((ViewportPane) getRenderManagerInternal().getMapDisplay());
        viewportPane.addDrawCommand(command);
        Rectangle validArea;
        try{
        validArea = command.getValidArea();
        }catch (Exception e) {
            validArea=null;
View Full Code Here

        IDrawCommand command = DrawCommandFactory.getInstance().createDrawFeatureCommand(feature,
                layer);

        ViewportPane pane = (ViewportPane) layer.getMapInternal().getRenderManager()
                .getMapDisplay();
        pane.addDrawCommand(command);

        PlatformGIS.syncInDisplayThread(PlatformUI.getWorkbench().getDisplay(), new Runnable(){
            public void run() {

                boolean result;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.