Package net.sourceforge.jpowergraph.manipulator.selection

Examples of net.sourceforge.jpowergraph.manipulator.selection.SelectionManipulator$NodeSelectionHandler


      public void nodesAddedToSelection(NodeSelectionModel nodeSelectionModel, Collection nodes) {
        theJGraphPane.getSubGraphHighlighter().setSubGraph(getSubGraph(nodeSelectionModel.getSelectedNodes()));
      }
    });

    theJGraphPane.addManipulator(new SelectionManipulator(nodeSelectionModel));
    theJGraphPane.addManipulator(new DraggingManipulator((CursorLens) getLensSet().getFirstLensOfType(CursorLens.class)));
    theJGraphPane.addManipulator(new EdgeCreatorManipulator((CursorLens) getLensSet().getFirstLensOfType(CursorLens.class), new DefaultEdgeCreatorListener(theJGraphPane.getGraph())));
    theJGraphPane.addManipulator(new PopupManipulator(theJGraphPane, (TooltipLens) getLensSet().getFirstLensOfType(TooltipLens.class)));
  }
View Full Code Here


            public void nodesAddedToSelection(NodeSelectionModel nodeSelectionModel, Collection nodes) {
                theJGraphPane.getSubGraphHighlighter().setSubGraph(getSubGraph(nodeSelectionModel.getSelectedNodes()));
            }
        });
       
        theJGraphPane.addManipulator(new SelectionManipulator(nodeSelectionModel));
        theJGraphPane.addManipulator(new DraggingManipulator((CursorLens) getLensSet().getFirstLensOfType(CursorLens.class)));
        theJGraphPane.addManipulator(new EdgeCreatorManipulator((CursorLens) getLensSet().getFirstLensOfType(CursorLens.class), new DefaultEdgeCreatorListener(theJGraphPane.getGraph())));
        theJGraphPane.addManipulator(new PopupManipulator(theJGraphPane, (TooltipLens) getLensSet().getFirstLensOfType(TooltipLens.class)));
    }
View Full Code Here

        return numOuterCircles;
    }

    public JPowerGraphColor getBorderColor(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 notHighlightedBorderColor;
View Full Code Here

        return borderColor;
    }
   
    public JPowerGraphColor getBackgroundColor(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 notHighlightedBackgroundColor;
View Full Code Here

        return backgroundColor;
    }

    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

    }
   
   
    public JPowerGraphColor getBorderColor(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 notHighlightedBorderColor;
View Full Code Here

        return borderColor;
    }

    public JPowerGraphColor getBackgroundColor(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 notHighlightedBackgroundColor;
View Full Code Here

        return backgroundColor;
    }

    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

Related Classes of net.sourceforge.jpowergraph.manipulator.selection.SelectionManipulator$NodeSelectionHandler

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.