Examples of MouseFilter


Examples of diva.canvas.event.MouseFilter

        s = new SelectionInteractor(model);
        s.setPrototypeDecorator(new BoundsManipulator());
        d = new DragInteractor();
        s.addInteractor(d);
        d.setSelectiveEnabled(true);
        d.setMouseFilter(new MouseFilter(1, 0, 0));
        selectionDragger.addSelectionInteractor(s);
        _rectangle.setInteractor(s);

        s = new SelectionInteractor(model);
        s.setPrototypeDecorator(new CircleManipulator());
        d = new DragInteractor();
        s.addInteractor(d);
        d.setSelectiveEnabled(true);
        d.setMouseFilter(new MouseFilter(1, 0, 0));
        selectionDragger.addSelectionInteractor(s);
        _circle.setInteractor(s);

        s = new SelectionInteractor(model);
        s.setPrototypeDecorator(new PathManipulator());
        d = new DragInteractor();
        s.addInteractor(d);
        d.setSelectiveEnabled(true);
        d.setMouseFilter(new MouseFilter(1, 0, 0));
        selectionDragger.addSelectionInteractor(s);
        _line.setInteractor(s);

        s = new SelectionInteractor(model);
        s.setPrototypeDecorator(new PathManipulator());
        d = new DragInteractor();
        s.addInteractor(d);
        d.setSelectiveEnabled(true);
        d.setMouseFilter(new MouseFilter(1, 0, 0));
        selectionDragger.addSelectionInteractor(s);
        _shape.setInteractor(s);
    }
View Full Code Here

Examples of diva.canvas.event.MouseFilter

        // Add the drag interactor to the selection interactor so
        // selected items are dragged
        _dragInteractor = new DragInteractor();
        _dragInteractor.setSelectiveEnabled(true);
        _dragInteractor.setMouseFilter(new MouseFilter(1, 0, 0));
        _selectionInteractor.addInteractor(_dragInteractor);
    }
View Full Code Here

Examples of diva.canvas.event.MouseFilter

        manipulator.setSnapHalo(4.0);
        manipulator.addConnectorListener(new EdgeDropper());
        ((EdgeInteractor) _interactor).setPrototypeDecorator(manipulator);

        // The mouse filter needs to accept regular click or control click
        MouseFilter handleFilter = new MouseFilter(1, 0, 0);
        manipulator.setHandleFilter(handleFilter);

        // Create and set up the target for connectors
        PerimeterTarget ct = new PerimeterTarget() {
            // Accept the head if the model graph model allows it.
View Full Code Here

Examples of diva.canvas.event.MouseFilter

        ((CompositeInteractor) _relationController.getNodeInteractor())
                .addInteractor(_linkCreator);

        LinkCreator linkCreator2 = new LinkCreator();
        linkCreator2
                .setMouseFilter(new MouseFilter(InputEvent.BUTTON1_MASK, 0));
        ((CompositeInteractor) _entityPortController.getNodeInteractor())
                .addInteractor(linkCreator2);
    }
View Full Code Here

Examples of diva.canvas.event.MouseFilter

        // Add a double click interactor.
        ActionInteractor doubleClickInteractor = new ActionInteractor(
                _configureAction);
        doubleClickInteractor.setConsuming(false);
        doubleClickInteractor.setMouseFilter(new MouseFilter(1, 0, 0, 2));

        interactor.addInteractor(doubleClickInteractor);

        // NOTE: This dance is so that the
        // doubleClickInteractor gets the events before the drag interactor.
View Full Code Here

Examples of diva.canvas.event.MouseFilter

        manipulator.setSnapHalo(4.0);
        manipulator.addConnectorListener(new LinkDropper());
        interactor.setPrototypeDecorator(manipulator);

        // The mouse filter needs to accept regular click or control click
        MouseFilter handleFilter = new MouseFilter(1, 0, 0);
        manipulator.setHandleFilter(handleFilter);

        ConnectorTarget ct = new LinkTarget();
        setConnectorTarget(ct);
        setEdgeRenderer(new LinkRenderer());

        _menuCreator = new MenuCreator(null);
        _menuCreator.setMouseFilter(new PopupMouseFilter());
        interactor.addInteractor(_menuCreator);

        // The contents of the menu is determined by the associated
        // menu factory, which is a protected member of this class.
        // Derived classes can add menu items to it.
        _menuFactory = new PtolemyMenuFactory(controller);
        _menuFactory
                .addMenuItemFactory(new MenuActionFactory(_configureAction));
        _menuCreator.setMenuFactory(_menuFactory);

        // Add a double click interactor.
        ActionInteractor doubleClickInteractor = new ActionInteractor(
                _configureAction);
        doubleClickInteractor.setConsuming(false);
        doubleClickInteractor.setMouseFilter(new MouseFilter(1, 0, 0, 2));

        interactor.addInteractor(doubleClickInteractor);
    }
View Full Code Here

Examples of diva.canvas.event.MouseFilter

        manipulator.setSnapHalo(4.0);
        manipulator.addConnectorListener(new LinkDropper());
        interactor.setPrototypeDecorator(manipulator);

        // The mouse filter needs to accept regular click or control click
        MouseFilter handleFilter = new MouseFilter(1, 0, 0);
        manipulator.setHandleFilter(handleFilter);

        ConnectorTarget ct = new LinkTarget();
        setConnectorTarget(ct);
        setEdgeRenderer(new LinkRenderer());

        _menuCreator = new MenuCreator(null);
        _menuCreator.setMouseFilter(new PopupMouseFilter());
        interactor.addInteractor(_menuCreator);

        // The contents of the menu is determined by the associated
        // menu factory, which is a protected member of this class.
        // Derived classes can add menu items to it.
        _menuFactory = new PtolemyMenuFactory(controller);
        _menuFactory
                .addMenuItemFactory(new MenuActionFactory(_configureAction));
        _menuCreator.setMenuFactory(_menuFactory);

        // Add a double click interactor.
        ActionInteractor doubleClickInteractor = new ActionInteractor(
                _configureAction);
        doubleClickInteractor.setConsuming(false);
        doubleClickInteractor.setMouseFilter(new MouseFilter(1, 0, 0, 2));

        interactor.addInteractor(doubleClickInteractor);

        if (_configuration != null) {
            // NOTE: The following requires that the configuration be
View Full Code Here

Examples of diva.canvas.event.MouseFilter

     * Construct a new interactor with a right button mouse filter.
     * Set the menu factory to the given factory.
     */
    public MenuCreator(MenuFactory factory) {
        setMenuFactory(factory);
        setMouseFilter(new MouseFilter(InputEvent.BUTTON3_MASK));
    }
View Full Code Here

Examples of diva.canvas.event.MouseFilter

        GraphicsPane gpane = (GraphicsPane) imageDisplay.getCanvasPane();
        setFigureLayer(gpane.getForegroundLayer());
        setEventLayer(gpane.getBackgroundEventLayer());

        // Bind to mouse button 3 (and 2, in case there are only 2 buttons)
        dragFilter = new MouseFilter(InputEvent.BUTTON3_MASK | InputEvent.BUTTON2_MASK, 0, 0);
    }
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.