Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable auto-layout #34

Open
aalmiray opened this issue Feb 19, 2016 · 13 comments
Open

Enable auto-layout #34

aalmiray opened this issue Feb 19, 2016 · 13 comments

Comments

@aalmiray
Copy link
Contributor

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".

@miho
Copy link
Owner

miho commented Feb 19, 2016

One of our students is already working on it...

@TCMBoby
Copy link
Collaborator

TCMBoby commented Apr 28, 2016

Prototype layouting functionality added to branch "layouting".
Still work in progress.

@miho
Copy link
Owner

miho commented May 17, 2016

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.

@aalmiray
Copy link
Contributor Author

Great news! Very much looking forward to testing the new codebase 😄

@TCMBoby
Copy link
Collaborator

TCMBoby commented May 17, 2016

Fixed the bug with multiplying edges and switched from using VisualizationViewer to DefaultVisualizationModel.
VisualizationViewer is only instantiated once "testvis()" is run.

@miho
Copy link
Owner

miho commented Jun 6, 2016

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:

vworkflows-layout-grid-01
vworkflows-layout-grid-02

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

vworkflows-layout-naive-space01

@TCMBoby
Copy link
Collaborator

TCMBoby commented Jun 7, 2016

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.

@miho
Copy link
Owner

miho commented Jun 12, 2016

Looks much better now. Thanks!

@miho
Copy link
Owner

miho commented Jul 5, 2016

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.

@miho
Copy link
Owner

miho commented Jul 5, 2016

@TCMBoby are we ready for maven/bintray publication?

@TCMBoby
Copy link
Collaborator

TCMBoby commented Jul 5, 2016

Yes.

miho added a commit that referenced this issue Jul 7, 2016
- automatic-layout support (see issue #34) as incubating feature
  (uses JUNG library). (by @TCMBoby)
- minor API changes that simply custom skin creation and reduce code
  redundancy    (by @aalmiray)
@miho
Copy link
Owner

miho commented Jul 7, 2016

We have a new release which includes automatic layout as incubating feature: https://bintray.com/miho/VWorkflows/vworkflows-fx/0.2.3

@zilti
Copy link

zilti commented Dec 11, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants