本文整理了Java中edu.uci.ics.jung.algorithms.layout.Layout.setInitializer()
方法的一些代码示例,展示了Layout.setInitializer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Layout.setInitializer()
方法的具体详情如下:
包路径:edu.uci.ics.jung.algorithms.layout.Layout
类名称:Layout
方法名:setInitializer
暂无
代码示例来源:origin: org.opendaylight.controller.thirdparty/net.sf.jung2
/**
* @param initializer
* @see edu.uci.ics.jung.algorithms.layout.Layout#setInitializer(org.apache.commons.collections15.Transformer)
*/
public void setInitializer(Transformer<V, Point2D> initializer) {
delegate.setInitializer(initializer);
}
代码示例来源:origin: org.opendaylight.controller.thirdparty/net.sf.jung2
/**
* @param initializer
* @see edu.uci.ics.jung.algorithms.layout.Layout#setInitializer(org.apache.commons.collections15.Transformer)
*/
public void setInitializer(Transformer<V, Point2D> initializer) {
delegate.setInitializer(initializer);
}
代码示例来源:origin: net.sf.jung/jung-algorithms
public void setInitializer(Function<V, Point2D> initializer) {
delegate.setInitializer(initializer);
}
代码示例来源:origin: net.sf.jung/jung-visualization
public void setInitializer(Function<V, Point2D> initializer) {
layout.setInitializer(initializer);
}
代码示例来源:origin: net.sf.jung/jung-algorithms
public void setInitializer(Function<V, Point2D> initializer) {
delegate.setInitializer(initializer);
}
代码示例来源:origin: net.sf.jung/jung-samples
public void itemStateChanged(ItemEvent e) {
if(e.getStateChange() == ItemEvent.SELECTED) {
@SuppressWarnings({ "unchecked", "rawtypes" })
Class<CircleLayout> clazz = (Class<CircleLayout>)e.getItem();
try {
Layout<String,Number> layout = getLayoutFor(clazz, graph);
layout.setInitializer(vv.getGraphLayout());
clusteringLayout.setDelegate(layout);
vv.setGraphLayout(clusteringLayout);
} catch(Exception ex) {
ex.printStackTrace();
}
}
}});
代码示例来源:origin: net.sourceforge.jadex/jadex-tools-comanalyzer
/**
* Groups a cluster (set) of agents into a sublayout.
*
* @param vertices
*/
protected void groupCluster(Set vertices)
{
if(vertices.size() > 1 && vertices.size() < graph.getVertexCount())
{
// if(vertices.size() < layout.getGraph().getVertexCount()) {
Point2D center = layout.transform(vertices.iterator().next());
Graph subGraph = (Graph)graphFactory.create();
for(Iterator it = vertices.iterator(); it.hasNext();)
{
subGraph.addVertex(it.next());
}
Layout subLayout = new GraphCircleLayout(subGraph);
subLayout.setInitializer(vv.getGraphLayout());
subLayout.setSize(new Dimension(40, 40));
layout.put(subLayout, center);
}
}
代码示例来源:origin: net.sf.jung/jung-samples
private void groupCluster(AggregateLayout<Number,Number> layout, Set<Number> vertices) {
if(vertices.size() < layout.getGraph().getVertexCount()) {
Point2D center = layout.apply(vertices.iterator().next());
Graph<Number,Number> subGraph = SparseMultigraph.<Number,Number>getFactory().get();
for(Number v : vertices) {
subGraph.addVertex(v);
}
Layout<Number,Number> subLayout =
new CircleLayout<Number,Number>(subGraph);
subLayout.setInitializer(vv.getGraphLayout());
subLayout.setSize(new Dimension(40,40));
layout.put(subLayout,center);
vv.repaint();
}
}
}
代码示例来源:origin: net.sf.jung/jung-samples
subLayout.setInitializer(vv.getGraphLayout());
subLayout.setSize(subLayoutSize);
clusteringLayout.put(subLayout,center);
代码示例来源:origin: net.sf.jung/jung-samples
@SuppressWarnings("unchecked")
public void actionPerformed(ActionEvent arg0)
{
Object[] constructorArgs =
{ g_array[graph_index]};
Class<? extends Layout<Integer,Number>> layoutC =
(Class<? extends Layout<Integer,Number>>) jcb.getSelectedItem();
try
{
Constructor<? extends Layout<Integer, Number>> constructor = layoutC
.getConstructor(new Class[] {Graph.class});
Object o = constructor.newInstance(constructorArgs);
Layout<Integer,Number> l = (Layout<Integer,Number>) o;
l.setInitializer(vv.getGraphLayout());
l.setSize(vv.getSize());
LayoutTransition<Integer,Number> lt =
new LayoutTransition<Integer,Number>(vv, vv.getGraphLayout(), l);
Animator animator = new Animator(lt);
animator.start();
vv.getRenderContext().getMultiLayerTransformer().setToIdentity();
vv.repaint();
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
代码示例来源:origin: net.sf.jung/jung-samples
@SuppressWarnings({ "unchecked", "rawtypes" })
public void actionPerformed(ActionEvent arg0)
{
Object[] constructorArgs =
{ collapsedGraph };
Class<? extends Layout> layoutC =
(Class<? extends Layout>) jcb.getSelectedItem();
try
{
Constructor<? extends Layout> constructor = layoutC
.getConstructor(new Class[] {Graph.class});
Object o = constructor.newInstance(constructorArgs);
Layout l = (Layout) o;
l.setInitializer(vv.getGraphLayout());
l.setSize(vv.getSize());
layout = l;
LayoutTransition lt =
new LayoutTransition(vv, vv.getGraphLayout(), l);
Animator animator = new Animator(lt);
animator.start();
vv.getRenderContext().getMultiLayerTransformer().setToIdentity();
vv.repaint();
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
代码示例来源:origin: org.ujmp/ujmp-jung
layout.setInitializer(vv.getGraphLayout());
layout.setSize(getSize());
LayoutTransition<N, EdgeWrapper<E>> lt = new LayoutTransition<N, EdgeWrapper<E>>(vv, vv.getGraphLayout(),
代码示例来源:origin: ujmp/universal-java-matrix-package
layout.setInitializer(vv.getGraphLayout());
layout.setSize(getSize());
LayoutTransition<N, EdgeWrapper<E>> lt = new LayoutTransition<N, EdgeWrapper<E>>(vv, vv.getGraphLayout(),
内容来源于网络,如有侵权,请联系作者删除!