Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » [Zest] Combining LayoutStyles and ZestStyles
[Zest] Combining LayoutStyles and ZestStyles [message #922881] Tue, 25 September 2012 08:25 Go to next message
Magnus Sjöstrand is currently offline Magnus Sjöstrand
Messages: 16
Registered: June 2012
Junior Member
So, I've noticed that removing animations when performing a layout can be performed using

graph.setLayoutAlgorithm(new RadialLayoutAlgorithm(ZestStyles.NODES_NO_ANIMATION), true);

or with some other type of algorithm. Also I would like to use the LayoutStyles.NO_LAYOUT_NODE_RESIZING

How can I use both of these at the same time, meaning that they neither resize or animate when laying them all out on the graph.

I tried using a new CompositeLayoutAlgorithm but it would only use the LayoutStyles and ignore the ZestStyles when both were in use.
Re: [Zest] Combining LayoutStyles and ZestStyles [message #922898 is a reply to message #922881] Tue, 25 September 2012 08:40 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan Ujhelyi
Messages: 203
Registered: July 2009
Senior Member
Hi,

did you try the standard bitwise or operation for SWT style bits, like the following:

graph.setLayoutAlgorithm(new RadialLayoutAlgorithm(ZestStyles.NODES_NO_ANIMATION|LayoutStyles.NO_LAYOUT_NODE_RESIZING), true)

Cheers,
Zoltán Ujhelyi
Re: [Zest] Combining LayoutStyles and ZestStyles [message #922968 is a reply to message #922898] Tue, 25 September 2012 09:50 Go to previous messageGo to next message
Magnus Sjöstrand is currently offline Magnus Sjöstrand
Messages: 16
Registered: June 2012
Junior Member
Yes, I also tried to switch the order of the parameters but LayoutStyles still dominates and ZestStyles doesn't work
Re: [Zest] Combining LayoutStyles and ZestStyles [message #923879 is a reply to message #922968] Wed, 26 September 2012 05:19 Go to previous messageGo to next message
Magnus Sjöstrand is currently offline Magnus Sjöstrand
Messages: 16
Registered: June 2012
Junior Member
Fixed!

It seems like you can't use ZestStyles.NODES_NO_ANIMATION in any of the standard algorithms. What I did instead was:

graph.setLayoutAlgorithm(new RadialLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING), true);
graph.setNodeStyle(ZestStyles.NODES_NO_ANIMATION);

[Updated on: Wed, 26 September 2012 05:24]

Report message to a moderator

Re: [Zest] Combining LayoutStyles and ZestStyles [message #987357 is a reply to message #923879] Mon, 26 November 2012 04:33 Go to previous message
Zoltan Ujhelyi is currently offline Zoltan Ujhelyi
Messages: 203
Registered: July 2009
Senior Member
Hi,

In the GEF4/Zest2 Git repository there is a corresponding fix: https://bugs.eclipse.org/bugs/show_bug.cgi?id=238529#c1

You might want to check it, or possibly comment in the issue.

Zoltán
Previous Topic:[ZEST] Nested elements in container
Next Topic:Combined Selection and ConnectionCreationToolEntry
Goto Forum:
  


Current Time: Fri Aug 22 03:54:12 EDT 2014

Powered by FUDForum. Page generated in 0.01673 seconds