Enable auto-layout #34

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

Comments

Projects
None yet
4 participants
@aalmiray
Contributor

aalmiray commented Feb 19, 2016

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

This comment has been minimized.

Show comment
Hide comment
@miho

miho Feb 19, 2016

Owner

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

Owner

miho commented Feb 19, 2016

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

@miho miho added the enhancement label Apr 26, 2016

@TCMBoby

This comment has been minimized.

Show comment
Hide comment
@TCMBoby

TCMBoby Apr 28, 2016

Collaborator

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

Collaborator

TCMBoby commented Apr 28, 2016

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

@miho

This comment has been minimized.

Show comment
Hide comment
@miho

miho May 17, 2016

Owner

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.

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

This comment has been minimized.

Show comment
Hide comment
@aalmiray

aalmiray May 17, 2016

Contributor

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

Contributor

aalmiray commented May 17, 2016

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

@TCMBoby

This comment has been minimized.

Show comment
Hide comment
@TCMBoby

TCMBoby May 17, 2016

Collaborator

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

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

This comment has been minimized.

Show comment
Hide comment
@miho

miho Jun 6, 2016

Owner

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

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

This comment has been minimized.

Show comment
Hide comment
@TCMBoby

TCMBoby Jun 7, 2016

Collaborator

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.

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

This comment has been minimized.

Show comment
Hide comment
@miho

miho Jun 12, 2016

Owner

Looks much better now. Thanks!

Owner

miho commented Jun 12, 2016

Looks much better now. Thanks!

@miho

This comment has been minimized.

Show comment
Hide comment
@miho

miho Jul 5, 2016

Owner

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.

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 added a commit that referenced this issue Jul 5, 2016

miho added a commit that referenced this issue Jul 5, 2016

@miho

This comment has been minimized.

Show comment
Hide comment
@miho

miho Jul 5, 2016

Owner

@TCMBoby are we ready for maven/bintray publication?

Owner

miho commented Jul 5, 2016

@TCMBoby are we ready for maven/bintray publication?

@TCMBoby

This comment has been minimized.

Show comment
Hide comment
@TCMBoby

TCMBoby Jul 5, 2016

Collaborator

Yes.

Collaborator

TCMBoby commented Jul 5, 2016

Yes.

miho added a commit that referenced this issue Jul 7, 2016

Automatic Layout
- 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

This comment has been minimized.

Show comment
Hide comment
@miho

miho Jul 7, 2016

Owner

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

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

This comment has been minimized.

Show comment
Hide comment
@zilti

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

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