Package y.view

Examples of y.view.EdgeRealizer


     * target nodes have to be obtained.
     */
    private void updateAssociationTypeVisibility() {
        for (Edge edge : fPanel.getGraph().getEdgeArray()) {
            Class<? extends FamixAssociation> associationType = fPanel.getGraph().getEdgeType(edge);
            EdgeRealizer edgeRealizer = fPanel.getGraph().getRealizer(edge);
            if (fPanel.getViewConfigModel().getAssociationTypeVisibility().get(associationType).booleanValue()) {
                // check whether from and to node are also visible
                // if edge is an aggregated edge then check if the source and target node of the first lower level edge are visible
                List<Edge> lowLevelEdges = fPanel.getGraph().getLowLevelEdges(edge);
                FamixAssociation association;
                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 {
                    fLogger.error("From or to node of edge not in the graph - error in graph structure");
                }
            } else {
                edgeRealizer.setVisible(false);
            }
        }
    }
View Full Code Here


    private void configureHighLevelEdge(Edge edge) {
        Graph2D graph = (Graph2D) edge.getGraph();
        DependencyGraph rootGraph = (DependencyGraph) graph.getHierarchyManager().getRootGraph();

        Class<? extends FamixAssociation> associationType = rootGraph.getEdgeType(edge);
        EdgeRealizer er = graph.getRealizer(edge);
        EdgeRealizer newEdgeRealizer = null;
        if (associationType.equals(FamixInvocation.class)) {
            newEdgeRealizer = new DefaultFamixEdgeRealizer(er);
        } else if (associationType.equals(FamixInheritance.class)) {
            newEdgeRealizer = new DeltaEdgeRealizer(er);
        } else if (associationType.equals(FamixSubtyping.class)) {
View Full Code Here

TOP

Related Classes of y.view.EdgeRealizer

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.