本文整理了Java中edu.uci.ics.jung.algorithms.layout.Layout.setSize()
方法的一些代码示例,展示了Layout.setSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Layout.setSize()
方法的具体详情如下:
包路径:edu.uci.ics.jung.algorithms.layout.Layout
类名称:Layout
方法名:setSize
暂无
代码示例来源:origin: org.opendaylight.controller.thirdparty/net.sf.jung2
/**
* @param d
* @see edu.uci.ics.jung.algorithms.layout.Layout#setSize(java.awt.Dimension)
*/
public void setSize(Dimension d) {
delegate.setSize(d);
}
代码示例来源:origin: org.opendaylight.controller.thirdparty/net.sf.jung2
/**
* @see edu.uci.ics.jung.algorithms.layout.Layout#setSize(Dimension)
*/
public void setSize(Dimension d) {
delegate.setSize(d);
}
代码示例来源:origin: net.sf.jung/jung-visualization
public void setSize(Dimension d) {
layout.setSize(d);
}
代码示例来源:origin: net.sf.jung/jung-algorithms
public void setSize(Dimension d) {
delegate.setSize(d);
}
代码示例来源:origin: net.sf.jung/jung-algorithms
public void setSize(Dimension d) {
delegate.setSize(d);
}
代码示例来源:origin: stackoverflow.com
public void writeImage(String filename) {
Layout layout = new CircleLayout<V, E>(jungGraph);
layout.setSize(innerSize);
bvs = new VisualizationImageServer<V,E>(layout);
// [...]
BufferedImage image = (BufferedImage)bvs.getImage();
}
代码示例来源:origin: com.github.fburato/highwheel-core
private Layout<ElementName, Dependency> springLayout(
final DirectedGraph<ElementName, Dependency> g, final Dimension d) {
final Layout<ElementName, Dependency> l = new SpringLayout2<ElementName, Dependency>(
g);
l.setSize(new Dimension(d.width - 100, d.height - 150));
shift(l, 50, 20);
return l;
}
代码示例来源:origin: org.pitest/highwheel-core
private Layout<ElementName, Dependency> springLayout(
final DirectedGraph<ElementName, Dependency> g, final Dimension d) {
final Layout<ElementName, Dependency> l = new SpringLayout2<ElementName, Dependency>(
g);
l.setSize(new Dimension(d.width - 100, d.height - 150));
shift(l, 50, 20);
return l;
}
代码示例来源:origin: hcoles/highwheel
private Layout<ElementName, Dependency> springLayout(
final DirectedGraph<ElementName, Dependency> g, final Dimension d) {
final Layout<ElementName, Dependency> l = new SpringLayout2<ElementName, Dependency>(
g);
l.setSize(new Dimension(d.width - 100, d.height - 150));
shift(l, 50, 20);
return l;
}
代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2
/**
* Propagate resize events to layouter.
*
* @param arg0
* ComponentEvent
*/
@Override
public void componentResized(ComponentEvent arg0) {
if (relayoutOnResize)
visviewer.getGraphLayout().setSize(visviewer.getSize());
}
代码示例来源:origin: net.sf.jung/jung-visualization
@Override
public void setVisible(boolean aFlag) {
super.setVisible(aFlag);
if(aFlag == true) {
Dimension d = this.getSize();
if(d.width <= 0 || d.height <= 0) {
d = this.getPreferredSize();
}
model.getGraphLayout().setSize(d);
}
}
代码示例来源:origin: raydac/netbeans-mmd-plugin
@Override
public void actionPerformed(@Nonnull final ActionEvent e) {
final Rectangle visible = scroll.getVisibleRect();
graphViewer.getGraphLayout().reset();
graphViewer.getGraphLayout().setSize(new Dimension(visible.width, visible.height));
graphViewer.repaint();
}
});
代码示例来源: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.sourceforge.jadex/jadex-tools-comanalyzer
public void actionPerformed(ActionEvent arg0)
{
JComboBox jcb = (JComboBox)arg0.getSource();
Object[] constructorArgs = {panelcan.graph};
Class layoutC = (Class)LAYOUTS.get(jcb.getSelectedItem());
try
{
Constructor constructor = layoutC.getConstructor(new Class[]{Graph.class});
Object o = constructor.newInstance(constructorArgs);
Layout l = (Layout)o;
l.setSize(panelcan.vv.getSize());
panelcan.layout.removeAll();
panelcan.layout.setDelegate(l);
// set zoom to identity
panelcan.vv.getRenderContext().getMultiLayerTransformer().setToIdentity();
l_zoom_slider.setValue(50);
panelcan.reinitializeCanvas();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
代码示例来源: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: OpenNMS/opennms
public static void renderGraphToFile(Graph<VertexRef, Edge> jungGraph, File file) {
final edu.uci.ics.jung.algorithms.layout.Layout<VertexRef, Edge> jungLayout = new KKLayout<>(jungGraph);
jungLayout.setSize(new Dimension(1800,1800)); // Size of the layout
代码示例来源:origin: org.ujmp/ujmp-jung
public void refreshUI() {
vv.getGraphLayout().setSize(getSize());
vv.setModel(new DefaultVisualizationModel<N, EdgeWrapper<E>>(vv.getGraphLayout()));
repaint(500);
}
代码示例来源:origin: ujmp/universal-java-matrix-package
public void refreshUI() {
vv.getGraphLayout().setSize(getSize());
vv.setModel(new DefaultVisualizationModel<N, EdgeWrapper<E>>(vv.getGraphLayout()));
repaint(500);
}
代码示例来源:origin: org.ujmp/ujmp-jung
public void componentResized(ComponentEvent e) {
vv.getGraphLayout().setSize(getSize());
vv.setModel(new DefaultVisualizationModel<N, EdgeWrapper<E>>(vv.getGraphLayout()));
repaint(500);
}
代码示例来源:origin: ujmp/universal-java-matrix-package
public void componentResized(ComponentEvent e) {
vv.getGraphLayout().setSize(getSize());
vv.setModel(new DefaultVisualizationModel<N, EdgeWrapper<E>>(vv.getGraphLayout()));
repaint(500);
}
内容来源于网络,如有侵权,请联系作者删除!