VWorkflows
VWorkflows copied to clipboard
Enable auto-layout
Related to #33. Would be great if the canvas had an auto-layout feature. Perhaps http://jung.sourceforge.net/ and https://github.com/prefuse/Prefuse can serve as inspiration; even better, their layouting algorithms could be reused "as is".
One of our students is already working on it...
Prototype layouting functionality added to branch "layouting". Still work in progress.
The current implementation uses the VisualizationViewer component to compute the JUNG layout. It is probably better to work with VisualizationModel instead.
Example:
VisualizationModel visModel= new DefaultVisualizationModel(myLayout, new Dimension(800, 600));
This will also solve potential multithreading problems with the Swing EDT and JavaFX.
Great news! Very much looking forward to testing the new codebase 😄
Fixed the bug with multiplying edges and switched from using VisualizationViewer to DefaultVisualizationModel. VisualizationViewer is only instantiated once "testvis()" is run.
Great news! Just tried the new implementation. Worked well!
Some ideas for improving the current layout generators:
- use simple grid-alignment after layout to prevent "almost-aligned" nodes:

- naive layout could be highly improved if max-width was chosen per row instead of globally:

Newest implementation adresses both problems. node-alignment is done pairwise for all nodepairs with a distance smaller than a certain threshold. This threshold is given by the size of the concerned nodes and the scaling parameter.
Looks much better now. Thanks!
Current implementation will be published in next maven release. Since it is still an incubating feature, LayoutGenerator* classes will be moved to the incubating package.
@TCMBoby are we ready for maven/bintray publication?
Yes.
We have a new release which includes automatic layout as incubating feature: https://bintray.com/miho/VWorkflows/vworkflows-fx/0.2.3
Hey, just a heads-up: the getters for boolean values are called "is..." instead of "get..." as per Java convention. I think this should get fixed.