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 12:25 Go to next message
Magnus Sjöstrand is currently offline Magnus SjöstrandFriend
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 12:40 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 222
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 13:50 Go to previous messageGo to next message
Magnus Sjöstrand is currently offline Magnus SjöstrandFriend
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 09:19 Go to previous messageGo to next message
Magnus Sjöstrand is currently offline Magnus SjöstrandFriend
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 09:24]

Report message to a moderator

Re: [Zest] Combining LayoutStyles and ZestStyles [message #987357 is a reply to message #923879] Mon, 26 November 2012 09:33 Go to previous message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 222
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: Mon Dec 22 05:51:43 GMT 2014

Powered by FUDForum. Page generated in 0.02102 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software