Search in sources :

Example 1 with Display

use of prefuse.Display in project qi4j-sdk by Qi4j.

the class StackedLayout method run.

@Override
public void run(double frac) {
    // setup
    NodeItem root = getLayoutRoot();
    layout(root, 0, 0);
    Rectangle2D bounds = root.getBounds();
    Display display = this.getVisualization().getDisplay(0);
    Dimension size = new Dimension((int) bounds.getWidth(), (int) bounds.getHeight());
    display.setSize(size);
    if (!display.isValid()) {
        display.validate();
    }
}
Also used : NodeItem(prefuse.visual.NodeItem) Rectangle2D(java.awt.geom.Rectangle2D) Dimension(java.awt.Dimension) Display(prefuse.Display)

Aggregations

Dimension (java.awt.Dimension)1 Rectangle2D (java.awt.geom.Rectangle2D)1 Display (prefuse.Display)1 NodeItem (prefuse.visual.NodeItem)1