Package y.view

Examples of y.view.NodeRealizer


    private void updateEntityTypeVisibility(NodeCursor parentNodes, boolean hide) {
        for (NodeCursor nc = parentNodes; nc.ok(); nc.next()) {
            Node parentNode = nc.node();
            AbstractFamixEntity entity = fPanel.getGraph().getFamixEntity(parentNode);
            if (!hide && fPanel.getViewConfigModel().getEntityTypeVisibility().get(entity.getClass()).booleanValue()) {
                NodeRealizer parentRealizer = fPanel.getGraph().getRealizer(parentNode);
                parentRealizer.setVisible(true);
                updateEntityTypeVisibility(fPanel.getHierarchyManager().getChildren(parentNode), false);
            } else {
                // hide all descendant nodes and edges
                NodeRealizer parentRealizer = fPanel.getGraph().getRealizer(parentNode);
                if (parentRealizer.isVisible()) {
                    parentRealizer.setVisible(false);
                    updateEntityTypeVisibility(fPanel.getHierarchyManager().getChildren(parentNode), true);
                }
            }
        }
    }
View Full Code Here


                if (lowLevelEdges != null && lowLevelEdges.size() > 0) {
                    association = fPanel.getGraph().getAssociation(lowLevelEdges.get(0));
                } else {
                    association = fPanel.getGraph().getAssociation(edge);
                }
                NodeRealizer fromRealizer = fPanel.getGraph().getRealizer(fPanel.getGraph().getNode(association.getFrom()));
                NodeRealizer toRealizer = fPanel.getGraph().getRealizer(fPanel.getGraph().getNode(association.getTo()));
                if (fromRealizer != null && toRealizer != null) {
                    if (fromRealizer.isVisible() && toRealizer.isVisible()) {
                        edgeRealizer.setVisible(true);
                    } else {
                        edgeRealizer.setVisible(false);
                    }
                } else {
View Full Code Here

        Node node = getHitInfo(e).getHitNode();
        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) {
View Full Code Here

        NodeMap map = graph.getRegisteredNodeMaps()[0];
        Node[] nodes = graph.getNodeArray();
        for (int i = 0; i < nodes.length; i++) {
            AbstractFamixEntity entity = (AbstractFamixEntity) map.get(nodes[i]);
            for (AbstractPolymetricViewUpdater updater : polyViewUpdater) {
                NodeRealizer realizer = graph.getRealizer(nodes[i]);
                String metricIdentifier = updater.getMetricToRepresent();
//                if(!metricIdentifier.equalsIgnoreCase(PolymetricViewControllerView.METRIC_UNIFORM)) {
                    if (dataCollector.containsEntry(entity, metricIdentifier)) {
                        float value = dataCollector.getValue(entity, metricIdentifier);
                        INormalizer normalizer = updater.getNormalizer();
View Full Code Here

     * @param parentNode The folder node to collapse.
     */
    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);
View Full Code Here

        return pm;
    }

    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()) {
View Full Code Here

    private void configureNode(Node node) {
        Graph2D graph = (Graph2D) node.getGraph();
        DependencyGraph rootGraph = (DependencyGraph) graph.getHierarchyManager().getRootGraph();
        AbstractFamixEntity entity = rootGraph.getFamixEntity(node);

        NodeRealizer nr = graph.getRealizer(node);
        NodeRealizer newNodeRealizer = null;
        if (nr instanceof GroupNodeRealizer) {
            newNodeRealizer = new FamixGroupNodeRealizer(nr);
        } else {
            if (entity instanceof FamixAttribute) {
                newNodeRealizer = new FamixAttributeNodeRealizer(nr);
View Full Code Here

     */
    public void execute() {
        setEditResult(new EditResult());

        Graph2D rootGraph = (Graph2D) getGraphLoader().getHierarchyManager().getRootGraph();
        NodeRealizer nr = rootGraph.getRealizer(fSelectedNode);
        if (nr instanceof GroupNodeRealizer) {
            fireGraphPreEvent();

            for (NodeCursor nc = getGraphLoader().getGraph().nodes(); nc.ok(); nc.next()) {
                getEdgeGrouper().reinsertLowLevelEdges(nc.node());
View Full Code Here

TOP

Related Classes of y.view.NodeRealizer

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.