Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » (Zest] Save/persist positions
(Zest] Save/persist positions [message #244458] Mon, 21 July 2008 11:06 Go to next message
Simon Bernard is currently offline Simon Bernard
Messages: 164
Registered: July 2009
Senior Member
Hi,

After have moved the nodes manualy, does it exist a way to persist the
position of node in the graph ?

thx.
Re: (Zest] Save/persist positions [message #244526 is a reply to message #244458] Wed, 23 July 2008 11:38 Go to previous message
marco is currently offline marco
Messages: 14
Registered: July 2009
Junior Member
Hi.
I've the same problem.

It's possible to "freeze" the position of a node, during layout
updating, using ContraintAdapter ...

it's a little bit of code:

@Override
public void populateConstraint(Object object, LayoutConstraint constraint) {
if (constraint instanceof BasicEntityConstraint) {

BasicEntityConstraint basicEntityConstraint = (BasicEntityConstraint)
constraint;
GraphNode graphnode = (GraphNode) object;

Object data = graphnode.getData();
basicEntityConstraint.hasPreferredLocation =
!getApplyLayoutSet().contains(data);

}
}
where "!getApplyLayoutSet().contains(data);" it's my "freeze/not freeze"
condition.

Well ...
How can catch the "move node" event?? ...
The problem is same as the just signaled bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=236528

Cheers
Marco


Simon Bernard ha scritto:
> Hi,
>
> After have moved the nodes manualy, does it exist a way to persist the
> position of node in the graph ?
>
> thx.
Previous Topic:zest versus gef newbie question
Next Topic:ZEST: Clustering or nesting algorithms
Goto Forum:
  


Current Time: Mon Sep 01 07:42:04 EDT 2014

Powered by FUDForum. Page generated in 0.02028 seconds