Package org.gephi.visualization.selection

Examples of org.gephi.visualization.selection.Rectangle


                eventBridge.mouseClick(objClass, objArray);
            }
        }

        if (vizConfig.isSelectionEnable() && rectangleSelection && !customSelection) {
            Rectangle rectangle = (Rectangle) currentSelectionArea;
            //rectangle.setBlocking(false);
            //Clean opengl picking
            for (ModelClass objClass : selectableClasses) {
                if (objClass.isEnabled() && objClass.isGlSelection()) {
                    for (ModelImpl obj : selectedObjects[objClass.getSelectionId()]) {
                        obj.setAutoSelect(false);
                    }
                }
            }

            //Select with click
            int i = 0;
            boolean someSelection = false;
            for (ModelClass objClass : selectableClasses) {
                markTime2++;
                for (Iterator<ModelImpl> itr = octree.getSelectedObjectIterator(objClass.getClassId()); itr.hasNext();) {
                    ModelImpl obj = itr.next();
                    if (isUnderMouse(obj) && currentSelectionArea.select(obj.getObj())) {
                        if (!obj.isSelected()) {
                            //New selected
                            obj.setSelected(true);
                            /*if (vizEventManager.hasSelectionListeners()) {
                            newSelectedObjects.add(obj);
                            }*/
                            selectedObjects[i].add(obj);
                        }
                        someSelection = true;
                        obj.selectionMark = markTime2;
                    }
                }
                if (!(rectangle.isCtrl() && someSelection)) {
                    for (Iterator<ModelImpl> itr = selectedObjects[i].iterator(); itr.hasNext();) {
                        ModelImpl o = itr.next();
                        if (o.selectionMark != markTime2) {
                            itr.remove();
                            o.setSelected(false);
                        }
                    }
                }

                i++;
            }
            rectangle.setBlocking(someSelection);

            if (vizController.getVizModel().isLightenNonSelectedAuto()) {

                if (vizConfig.isLightenNonSelectedAnimation()) {
                    if (!anySelected && someSelection) {
View Full Code Here


    @Override
    public void mouseMove() {

        //Selection
        if (vizConfig.isSelectionEnable() && rectangleSelection) {
            Rectangle rectangle = (Rectangle) currentSelectionArea;
            rectangle.setMousePosition(graphIO.getMousePosition());
            if (rectangle.isStop()) {
                return;
            }
        }

        if (customSelection || currentSelectionArea.blockSelection()) {
View Full Code Here

    public void stopDrag() {
        scheduler.requireUpdatePosition();

        //Selection
        if (vizConfig.isSelectionEnable() && rectangleSelection) {
            Rectangle rectangle = (Rectangle) currentSelectionArea;
            rectangle.stop();
            scheduler.requireUpdateSelection();
        }
    }
View Full Code Here

        if (vizConfig.isCustomSelection()) {
            //System.out.println("CustomSelection");
            rectangleSelection = false;
            currentSelectionArea = null;
        } else if (vizConfig.isRectangleSelection()) {
            currentSelectionArea = new Rectangle();
            rectangleSelection = true;
            customSelection = false;
        } else {
            currentSelectionArea = new Cylinder();
            rectangleSelection = false;
View Full Code Here

     * Mouse clicked event.
     */
    public void mouseClicked(MouseEvent e) {
        if (SwingUtilities.isLeftMouseButton(e)) {
            if (vizController.getVizConfig().isSelectionEnable() && engine.isRectangleSelection()) {
                Rectangle r = (Rectangle) engine.getCurrentSelectionArea();
                boolean ctrl = (e.getModifiers() & InputEvent.CTRL_DOWN_MASK) != 0 || (e.getModifiers() & InputEvent.CTRL_MASK) != 0;
                r.setCtrl(ctrl);
            }
            engine.getScheduler().requireMouseClick();
            vizEventManager.mouseLeftClick();
        } else if (SwingUtilities.isRightMouseButton(e)) {
            if (vizController.getVizConfig().isContextMenu()) {
View Full Code Here

            if (vizController.getVizConfig().isSelectionEnable() && engine.isRectangleSelection()) {
                if (!dragging) {
                    //Start drag
                    dragging = true;
                    Rectangle rectangle = (Rectangle) engine.getCurrentSelectionArea();
                    rectangle.start(mousePosition);
                }
                engine.getScheduler().requireUpdateSelection();
            } else if (vizController.getVizConfig().isDraggingEnable()) {

                if (!dragging) {
View Full Code Here

     */
    @Override
    public void mouseClicked(MouseEvent e) {
        if (SwingUtilities.isLeftMouseButton(e)) {
            if (vizController.getVizConfig().isSelectionEnable() && engine.isRectangleSelection()) {
                Rectangle r = (Rectangle) engine.getCurrentSelectionArea();
                boolean ctrl = (e.getModifiers() & InputEvent.CTRL_DOWN_MASK) != 0 || (e.getModifiers() & InputEvent.CTRL_MASK) != 0;
                r.setCtrl(ctrl);
            }
            engine.getScheduler().requireMouseClick();
            vizEventManager.mouseLeftClick();
        } else if (SwingUtilities.isRightMouseButton(e)) {
            if (vizController.getVizConfig().isContextMenu()) {
View Full Code Here

            if (vizController.getVizConfig().isSelectionEnable() && engine.isRectangleSelection()) {
                if (!dragging) {
                    //Start drag
                    dragging = true;
                    Rectangle rectangle = (Rectangle) engine.getCurrentSelectionArea();
                    rectangle.start(mousePosition);
                }
                engine.getScheduler().requireUpdateSelection();
            } else if (vizController.getVizConfig().isDraggingEnable()) {

                if (!dragging) {
View Full Code Here

    }

    @Override
    public void mouseClick() {
        if (vizConfig.isSelectionEnable() && rectangleSelection && !customSelection) {
            Rectangle rectangle = (Rectangle) currentSelectionArea;
            //rectangle.setBlocking(false);

            //Select with click
            int i = 0;
            boolean someSelection = false;

//            for (Iterator<ModelImpl> itr = octree.getSelectedObjectIterator(objClass.getClassId()); itr.hasNext();) {
//                NodeModel obj = (NodeModel) itr.next();
//                if (isUnderMouse(obj)) {
//                    if (!obj.isSelected()) {
//                        //New selected
//                        obj.setSelected(true);
//                        /*if (vizEventManager.hasSelectionListeners()) {
//                         newSelectedObjects.add(obj);
//                         }*/
//                        selectedObjects[i].add(obj);
//                    }
//                    someSelection = true;
//                    obj.selectionMark = markTime2;
//                }
//            }
//            if (!(rectangle.isCtrl() && someSelection)) {
//                for (Iterator<ModelImpl> itr = selectedObjects[i].iterator(); itr.hasNext();) {
//                    ModelImpl o = itr.next();
//                    if (o.selectionMark != markTime2) {
//                        itr.remove();
//                        o.setSelected(false);
//                    }
//                }
//
//
//                i++;
//            }
            rectangle.setBlocking(someSelection);

            if (vizController.getVizModel().isLightenNonSelectedAuto()) {

                if (vizConfig.isLightenNonSelectedAnimation()) {
                    if (!anySelected && someSelection) {
View Full Code Here

    @Override
    public void mouseMove() {
        //Selection
        if (vizConfig.isSelectionEnable() && rectangleSelection) {
            Rectangle rectangle = (Rectangle) currentSelectionArea;
            rectangle.setMousePosition(graphIO.getMousePosition());
            if (rectangle.isStop()) {
                return;
            }
        }

        if (customSelection || currentSelectionArea.blockSelection()) {
View Full Code Here

TOP

Related Classes of org.gephi.visualization.selection.Rectangle

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.