Package y.base

Examples of y.base.Node


        // use the second edge map to store aggregated edges
        EdgeMap aggregatedToContainedEdges = getAggregatedEdgeMap();
        List<Edge> addedHighLevelEdges = new ArrayList<Edge>();

        for (Entry<MultiKey, List<Edge>> entry : nodePairToEdgeMap.entrySet()) {
            Node source = (Node) entry.getKey().getKey(0);
            Node target = (Node) entry.getKey().getKey(1);

            List<Edge> lowLevelEdges = entry.getValue();
            // insert a new edge with the strength corr. to the number of
            // aggregated edges
            Edge highLevelEdge = getHierarchyManager().createEdge(source, target);
View Full Code Here


    public JPopupMenu getSelectionPopup(double arg0, double arg1) {
        List<Node> selectedNodes = new ArrayList<Node>();
        List<Edge> selectedEdges = new ArrayList<Edge>();
        List<Object> selectedElements = new ArrayList<Object>();
        for (NodeCursor nc = getGraphLoader().getGraph().selectedNodes(); nc.ok(); nc.next()) {
            Node node = nc.node();
            selectedNodes.add(node);
            selectedElements.add(node);
        }
        for (EdgeCursor ec = getGraphLoader().getGraph().selectedEdges(); ec.ok(); ec.next()) {
            Edge edge = ec.edge();
View Full Code Here

     *
     * @param event The map change event
     */
    public void propertyChange(PropertyChangeEvent event) {
        if (event.getPropertyName().equals(DependencyGraph.ENTITY_ADDED)) {
            Node node = (Node) event.getNewValue();
            configureNode(node);
            // } else if (graphEvent.getType() == DAForJavaGraphEvent.EDGE_CREATION_ASSOCIATION_SET) {
            // Edge edge = (Edge) graphEvent.getData();
            // configureEdge(edge);
        } else if (event.getPropertyName().equals(DependencyGraph.HIGHLEVEL_EDGE_ADDED)) {
View Full Code Here

                    postLayout = command.getPostLayoutSelectionStrategy();
                }
                refreshLayout(doLayout, preLayout, postLayout);
            }
        } else if (graphEvent.getType() == GraphEvent.NODE_CREATION) {
            Node node = (Node) graphEvent.getData();
            fAddedNodes.add(node);
        } else if (graphEvent.getType() == GraphEvent.POST_NODE_REMOVAL) {
            Node node = (Node) graphEvent.getData();
            fRemovedNodes.add(node);
        } else if (graphEvent.getType() == GraphEvent.SUBGRAPH_INSERTION) {
            NodeList nl = (NodeList) graphEvent.getData();
            for (NodeCursor nc = nl.nodes(); nc.ok(); nc.next()) {
                fAddedNodes.add(nc.node());
View Full Code Here

    @SuppressWarnings({"unchecked", "rawtypes"})
    public void actionPerformed(ActionEvent e) {
    List selectedElements = new ArrayList();
        for (NodeCursor nc = fGraphPanel.getGraph()
                .selectedNodes(); nc.ok(); nc.next()) {
            Node node = nc.node();
            selectedElements.add(node);
        }
        for (EdgeCursor ec = fGraphPanel.getGraph()
                .selectedEdges(); ec.ok(); ec.next()) {
            selectedElements.add(ec.edge());
View Full Code Here

            Set<FamixAssociation> associationsToRemove = getAssociationsToRemove();

            fireGraphPreEvent();

            for (NodeCursor nc = getGraphLoader().getGraph().nodes(); nc.ok(); nc.next()) {
                Node node = nc.node();
                getEdgeGrouper().reinsertLowLevelEdges(node);
            }

            getEditResult().addAll(getGraphLoader().removeEntitiesAndAssociations(new ArrayList<AbstractFamixEntity>(entitiesToRemove)));
            getEditResult().addAll(getGraphLoader().removeAssociations(new ArrayList<FamixAssociation>(associationsToRemove)));
View Full Code Here

  }

  @Override
  protected boolean addChildPresentation( @NotNull Node presentation, @NotNull StructPart child, int index ) {
    Graph2D graph2D = getGraph( presentation );
    Node childNode = getChildPresenter( child ).present( child );
    graph2D.createEdge( presentation, childNode );
    Graph2DPresenter.update( getGraph() );
    return true;
  }
View Full Code Here

    presentation.setLabelText( rootNode, struct.getName() );
  }

  @Override
  protected boolean addChildPresentation( @NotNull Graph2D presentation, @NotNull StructPart child, int index ) {
    Node childNode = getChildPresenter( child ).present( child );
    getGraph().createEdge( rootNode, childNode );
    update( presentation );
    return true;
  }
View Full Code Here

    return true;
  }

  @Override
  protected void removeChildPresentation( @NotNull Graph2D presentation, @NotNull StructPart child, int index ) {
    Node node = presentation.getNodeArray()[index];
    presentation.removeNode( node );
    update( presentation );
  }
View Full Code Here

TOP

Related Classes of y.base.Node

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.