edu.uci.ics.jung.algorithms.layout.Layout.setGraph()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(91)

本文整理了Java中edu.uci.ics.jung.algorithms.layout.Layout.setGraph()方法的一些代码示例,展示了Layout.setGraph()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Layout.setGraph()方法的具体详情如下:
包路径:edu.uci.ics.jung.algorithms.layout.Layout
类名称:Layout
方法名:setGraph

Layout.setGraph介绍

[英]setter for graph
[中]图形设定器

代码示例

代码示例来源:origin: net.sf.jung/jung-algorithms

public void setGraph(Graph<V, E> graph) {
    delegate.setGraph(graph);
  }
}

代码示例来源:origin: net.sf.jung/jung-visualization

@Override
public void setGraph(Graph<V, E> graph) {
  delegate.setGraph(graph);
}

代码示例来源:origin: net.sf.jung/jung-visualization

@Override
public void setGraph(Graph<V, E> graph) {
  delegate.setGraph(graph);
}

代码示例来源:origin: org.opendaylight.controller.thirdparty/net.sf.jung2

/**
 * @param graph
 * @see edu.uci.ics.jung.algorithms.layout.Layout#setGraph(edu.uci.ics.jung.graph.Graph)
 */
public void setGraph(Graph<V, E> graph) {
  delegate.setGraph(graph);
}

代码示例来源:origin: org.opendaylight.controller.thirdparty/net.sf.jung2

public void setGraph(Graph<V, E> graph) {
    delegate.setGraph(graph);
  }
}

代码示例来源:origin: net.sf.jung/jung-algorithms

public void setGraph(Graph<V, E> graph) {
  delegate.setGraph(graph);
}

代码示例来源:origin: net.sf.jung/jung-samples

public void actionPerformed(ActionEvent e) {
  layout.setGraph(graph);
  exclusions.clear();
  vv.repaint();
}});

代码示例来源:origin: net.sf.jung/jung-samples

public void actionPerformed(ActionEvent e) {
  layout.setGraph(graph);
  exclusions.clear();
  vv.repaint();
}});

代码示例来源:origin: net.sf.jung/jung-samples

public void actionPerformed(ActionEvent e) {
  Collection picked = new HashSet(vv.getPickedVertexState().getPicked());
  if(picked.size() > 1) {
    Graph inGraph = layout.getGraph();
    Graph clusterGraph = collapser.getClusterGraph(inGraph, picked);
    Graph g = collapser.collapse(layout.getGraph(), clusterGraph);
    double sumx = 0;
    double sumy = 0;
    for(Object v : picked) {
      Point2D p = (Point2D)layout.apply(v);
      sumx += p.getX();
      sumy += p.getY();
    }
    Point2D cp = new Point2D.Double(sumx/picked.size(), sumy/picked.size());
    vv.getRenderContext().getParallelEdgeIndexFunction().reset();
    layout.setGraph(g);
    layout.setLocation(clusterGraph, cp);
    vv.getPickedVertexState().clear();
    vv.repaint();
  }
}});

代码示例来源:origin: net.sf.jung/jung-samples

public void actionPerformed(ActionEvent e) {
  Collection picked = new HashSet(vv.getPickedVertexState().getPicked());
  if(picked.size() > 1) {
    Graph inGraph = layout.getGraph();
    Graph clusterGraph = collapser.getClusterGraph(inGraph, picked);
    Graph g = collapser.collapse(layout.getGraph(), clusterGraph);
    collapsedGraph = g;
    double sumx = 0;
    double sumy = 0;
    for(Object v : picked) {
      Point2D p = (Point2D)layout.apply(v);
      sumx += p.getX();
      sumy += p.getY();
    }
    Point2D cp = new Point2D.Double(sumx/picked.size(), sumy/picked.size());
    vv.getRenderContext().getParallelEdgeIndexFunction().reset();
    layout.setGraph(g);
    layout.setLocation(clusterGraph, cp);
    vv.getPickedVertexState().clear();
    vv.repaint();
  }
}});

代码示例来源:origin: net.sf.jung/jung-samples

public void actionPerformed(ActionEvent e) {
  Collection picked = new HashSet(vv.getPickedVertexState().getPicked());
  for(Object v : picked) {
    if(v instanceof Graph) {
      
      Graph g = collapser.expand(layout.getGraph(), (Graph)v);
      vv.getRenderContext().getParallelEdgeIndexFunction().reset();
      layout.setGraph(g);
    }
    vv.getPickedVertexState().clear();
    vv.repaint();
  }
}});

代码示例来源:origin: net.sf.jung/jung-samples

public void actionPerformed(ActionEvent e) {
  Collection picked = new HashSet(vv.getPickedVertexState().getPicked());
  for(Object v : picked) {
    if(v instanceof Graph) {
      
      Graph g = collapser.expand(layout.getGraph(), (Graph)v);
      vv.getRenderContext().getParallelEdgeIndexFunction().reset();
      layout.setGraph(g);
    }
    vv.getPickedVertexState().clear();
    vv.repaint();
  }
}});

相关文章