Examples of DraggingManipulator


Examples of net.sourceforge.jpowergraph.manipulator.dragging.DraggingManipulator

    }

    public JPowerGraphColor getTextColor(Node theNode, JGraphPane theGraphPane, SubGraphHighlighter theSubGraphHighlighter) {
        HighlightingManipulator highlightingManipulator = null;
        SelectionManipulator selectionManipulator = null;
        DraggingManipulator draggingManipulator = null;
        if (theGraphPane != null){
            highlightingManipulator = (HighlightingManipulator) theGraphPane.getManipulator(HighlightingManipulator.NAME);
            selectionManipulator = (SelectionManipulator) theGraphPane.getManipulator(SelectionManipulator.NAME);
            draggingManipulator = (DraggingManipulator) theGraphPane.getManipulator(DraggingManipulator.NAME);
        }
       
        boolean isHighlighted = highlightingManipulator != null && highlightingManipulator.getHighlightedNode() == theNode;
        boolean isSelected = selectionManipulator != null && selectionManipulator.getNodeSelectionModel().isNodeSelected(theNode);
        boolean isDragging = draggingManipulator != null && draggingManipulator.getDraggedNode() == theNode;
        boolean notHighlightedBecauseOfSubGraph = theSubGraphHighlighter.isHighlightSubGraphs() && !theSubGraphHighlighter.doesSubGraphContain(theNode);
       
        if (notHighlightedBecauseOfSubGraph) {
            return notHighlightedTextColor;
        }
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.