Package y.view.hierarchy

Examples of y.view.hierarchy.GroupNodeRealizer


        for (AbstractFamixEntity entity : fEntities) {
            List<AbstractFamixEntity> parentEntities = getGraphLoader().getSnapshotAnalyzer().getParentEntities(entity);
            for (int i = parentEntities.size() - 1; i >= 0; i--) {
                Node parentNode = graph.getNode(parentEntities.get(i));
                if (parentNode != null) {
                    GroupNodeRealizer gr = (GroupNodeRealizer) graph.getRealizer(parentNode);
                    if (gr.isGroupClosed()) {
                        getEdgeGrouper().handleOpenFolder(parentNode);
                    }
                }
            }
        }
View Full Code Here


    private JMenu getFolderMenu(final Node node) {
        JMenu folderMenu = null;
        NodeRealizer nr = ((Graph2D) node.getGraph()).getRealizer(node);
        if (nr instanceof GroupNodeRealizer) {
            folderMenu = new JMenu("Folder");
            GroupNodeRealizer gnr = (GroupNodeRealizer) nr;
            GraphEditPopupMenuAction action = null;
            if (gnr.isGroupClosed()) {
                action = new GraphEditPopupMenuAction("Expand", fGraphPanel);
                action.setDescription("Expand selected folder node");
                action.setCommand(new FolderNodeHandleCommand(getGraphLoader(), getHierarchicEdgeGrouper(), node, true));
            } else {
                action = new GraphEditPopupMenuAction("Collapse", fGraphPanel);
View Full Code Here

        if (node != null && !getHierarchyManager().isNormalNode(node)) {
            double x = translateX(e.getX());
            double y = translateY(e.getY());
            Graph2D graph = getView().getGraph2D();
            NodeRealizer r = graph.getRealizer(node);
            GroupNodeRealizer gnr = null;
            if (r instanceof GroupNodeRealizer) {
                gnr = (GroupNodeRealizer) r;
            } else if (r instanceof ProxyShapeNodeRealizer
                    && ((ProxyShapeNodeRealizer) r).getRealizerDelegate() instanceof GroupNodeRealizer) {
                gnr = (GroupNodeRealizer) ((ProxyShapeNodeRealizer) r).getRealizerDelegate();
            }
            if (gnr != null) {
                NodeLabel handle = gnr.getStateLabel();
                if (handle.getBox().contains(x, y)) {
                    AbstractGraphEditCommand command;
                    if (getHierarchyManager().isFolderNode(node)) {
                        command = new FolderNodeHandleCommand(getGraphPanel().getGraphLoader(), getGraphPanel().getEdgeGrouper(), node, true);
                        getGraphPanel().getCommandController().executeCommand(command);
View Full Code Here

    public void handleCloseFolder(Node parentNode) {
        sLogger.debug("Collapse folder node " + parentNode);

        NodeRealizer nr = ((Graph2D) parentNode.getGraph()).getRealizer(parentNode);
        if (nr instanceof GroupNodeRealizer) {
            GroupNodeRealizer gr = (GroupNodeRealizer) nr;

            if (!gr.isGroupClosed()) {
                getHierarchyManager().closeGroup(parentNode);
                List<Edge> reinsertedLowLevelEdges = reinsertLowLevelEdges(parentNode);
                group(reinsertedLowLevelEdges);
            } else {
                sLogger.debug("Folder node is already collapsed " + parentNode);
View Full Code Here

TOP

Related Classes of y.view.hierarchy.GroupNodeRealizer

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.