public void doLayout( TLayoutType layoutType, boolean isAllElementsLayouted, boolean isAnimated, int xOffset, int yOffset, final int xGap, final int yGap) { if (layoutType.equals(TLayoutType.SPRING_LAYOUT_TYPE)) { layouter.start(); } else if (layoutType.equals(TLayoutType.RANDOM_LAYOUT_TYPE)) { layouter.stop(); layouter.random(0, 600); } else { layouter.stop(); graph.doLayout( isAllElementsLayouted ? graph.getDataBox().getAllElements().iterator() : graph.getDataBox().getSelectionModel().getAllSelectedElement().iterator(), layoutType.getType(), isAnimated, null, xOffset, yOffset, new Generator() { public Object generate(Object object) { Element element = (Element) object; if (element instanceof Group) { return null; } return new Dimension(xGap, yGap); } }); } }
public void setUpdateDuration(int updateDuration) { layouter.setUpdateDuration(updateDuration); }
public int getUpdateDuration() { return layouter.getUpdateDuration(); }
public void setStepSize(int stepSize) { layouter.setStepSize(stepSize); }
public int getStepSize() { return layouter.getStepSize(); }
public void setForceSize(int forceSize) { layouter.setForceSize(forceSize); }
public int getForceSize() { return layouter.getForceSize(); }
public void stop() { layouter.stop(); }
public void start() { layouter.start(); }