Skip to main content



      Home
Home » Eclipse Projects » GEF » CompoundDirectedGraphLayout - with constrained nodes
CompoundDirectedGraphLayout - with constrained nodes [message #136808] Mon, 07 June 2004 15:06 Go to next message
Eclipse UserFriend
Originally posted by: brianv.phreaker.net

Hi Guys,

My editor uses the CompoundDirectedGraphLayout to layout it's nodes.
However, unlike flow - I also allow my users to manually position the nodes.
I achieve this by running the CompoundDirectedGraphLayout algorithm in my
diagrams LayoutManager, but when I "apply" the results to the graph ( I
follow almost the same technique as the flow example) I check whether the
node has been maually positioned by the user - if it has, then instead of
placing according to the layout algorithm - I place it at the user
designated position.

I'm wondering now whether it is possible for me to modify the
CompoundDirectGraphLayout to take user positioned nodes into account while
it lays out the other nodes.

To be more clear - when CompoundDirectedGraphLayout is laying-out the nodes
it should be aware of the fact that some nodes are fixed and it should
therefore layout the other nodes assuming that certain nodes cannot be
moved.

I'm not too sure whether something like this would fit within the
artchitecture of CompoundDirectedGraphLayout, and I don't think it's going
to be trivial.

Could you point me in the right direction ? Can I grow from
CompoundDirectedGraphLayout or would it be better to use another layout
algorithm altogether?

Any suggestions, pointers appreciated,


Thanks,
Brian.
Re: CompoundDirectedGraphLayout - with constrained nodes [message #136838 is a reply to message #136808] Mon, 07 June 2004 15:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> Hi Guys,
>
> My editor uses the CompoundDirectedGraphLayout to layout it's nodes.
> However, unlike flow - I also allow my users to manually position the
nodes.
> I achieve this by running the CompoundDirectedGraphLayout algorithm in my
> diagrams LayoutManager, but when I "apply" the results to the graph ( I
> follow almost the same technique as the flow example) I check whether the
> node has been maually positioned by the user - if it has, then instead of
> placing according to the layout algorithm - I place it at the user
> designated position.
>
> I'm wondering now whether it is possible for me to modify the
> CompoundDirectGraphLayout to take user positioned nodes into account while
> it lays out the other nodes.
>
> To be more clear - when CompoundDirectedGraphLayout is laying-out the
nodes
> it should be aware of the fact that some nodes are fixed and it should
> therefore layout the other nodes assuming that certain nodes cannot be
> moved.

I have unreleased code which adds support for a constraint index. Nodes and
Subgraphs may have a value indicating the relative left-to-right order in
which they should appear. It is not well tested and is not being released
for 3.0.

> I'm not too sure whether something like this would fit within the
> artchitecture of CompoundDirectedGraphLayout, and I don't think it's going
> to be trivial.

It's not trivial, but it wasn't extremely difficult. For subgraphs, there
was already some complex code which guaranteed that 2 subgraphs swap spaces
on adjacent rows.

> Could you point me in the right direction ? Can I grow from
> CompoundDirectedGraphLayout or would it be better to use another layout
> algorithm altogether?

Is this relative ordering what you are looking for? Or do you want absolute
positioning of a node?
Re: CompoundDirectedGraphLayout - with constrained nodes [message #136873 is a reply to message #136838] Mon, 07 June 2004 16:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brianv.phreaker.net

Hi Randy,
Good to hear that some work is already done in that direction.

>Is this relative ordering what you are looking for? Or do you want
absolute
>ositioning of a node?

Unfortunately I need absolute positioning - relative ordering will not do.
Beyond positions, the user may also resize his node to any dimensions. It
would be cool if dimensions could be taken into account was well.

Whatever you have mentioned so far points to relative ordering - what is
your position on absolute positioning - any work done here at all ? & do you
think it will be possible to integrate this into
CompoundDirectedGraphLayout's architecture ?

Thanks for the heads up,
Brian.
Re: CompoundDirectedGraphLayout - with constrained nodes [message #136898 is a reply to message #136873] Mon, 07 June 2004 17:19 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

I don't see how absolute positioning could work. The hard part would be
determining which row or rows the node really occupies. Sizing is already
supported. Just set the Node or Subgraph's width/height fields prior to
invoking the layout.

I have future plans to play with such a layout where the user can reorder
the nodes, and possible determine how many rows a node should span.

"Brian Fernandes" <brianv@phreaker.net> wrote in message
news:ca2hg0$pn6$1@eclipse.org...
> Hi Randy,
> Good to hear that some work is already done in that direction.
>
> >Is this relative ordering what you are looking for? Or do you want
> absolute
> >ositioning of a node?
>
> Unfortunately I need absolute positioning - relative ordering will not do.
> Beyond positions, the user may also resize his node to any dimensions. It
> would be cool if dimensions could be taken into account was well.
>
> Whatever you have mentioned so far points to relative ordering - what is
> your position on absolute positioning - any work done here at all ? & do
you
> think it will be possible to integrate this into
> CompoundDirectedGraphLayout's architecture ?
>
> Thanks for the heads up,
> Brian.
>
>
>
>
Previous Topic:The disabled cursor is not shown whem creating a part in 3.0
Next Topic:registering custom editpolicy roles
Goto Forum:
  


Current Time: Sun May 11 00:59:49 EDT 2025

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

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

Back to the top