Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Grid Layout / Directed Graph Layout
Grid Layout / Directed Graph Layout [message #177869] Fri, 15 April 2005 13:41 Go to next message
Eclipse UserFriend
Originally posted by: a.morgan.pilz.ie

Hi,

I want to be able to layout figures in a grid type manner.
I don't see any Grid Layout available in Draw2D.

Have I missed it or will something else do such as the Directed Graph
Layout.
I can't seem to find any documentation that explains the
DirectedGraphLayout.
Lil help ?

Cheers,
Alan.
Re: Directed Graph Layout [message #178113 is a reply to message #177869] Mon, 18 April 2005 15:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mheinman.rumms.uni-mannheim.de

Hi Alan,

may be it will help you to take a look at the GraphLayoutManager in the flow
example.

The idea is, that your model elements represents the nodes of the graph and
the connections the edges of the graph. After you build your graph you are
able to calculate an "asthetic" layout with the DirectedGraphLayout of the
appropriated EditParts.

Best regards and good luck,
M.H.

"Alan Morgan" <a.morgan@pilz.ie> schrieb im Newsbeitrag
news:d3ogmn$sur$1@news.eclipse.org...
> Hi,
>
> I want to be able to layout figures in a grid type manner.
> I don't see any Grid Layout available in Draw2D.
>
> Have I missed it or will something else do such as the Directed Graph
> Layout.
> I can't seem to find any documentation that explains the
> DirectedGraphLayout.
> Lil help ?
>
> Cheers,
> Alan.
>
>
Re: Directed Graph Layout [message #178236 is a reply to message #178113] Tue, 19 April 2005 10:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: a.morgan.pilz.ie

Michail,

Is there perhaps a simplier example somewhere of DirectedGraphLayout usage ?
I have been looking at the Flow example but I was hoping for the "Hello
World" equivalent for DirectedGraphLayout.

Thanks,
Alan.

"Michail Heinmann" <mheinman@rumms.uni-mannheim.de> wrote in message
news:d40ir2$olp$1@news.eclipse.org...
> Hi Alan,
>
> may be it will help you to take a look at the GraphLayoutManager in the
flow
> example.
>
> The idea is, that your model elements represents the nodes of the graph
and
> the connections the edges of the graph. After you build your graph you are
> able to calculate an "asthetic" layout with the DirectedGraphLayout of the
> appropriated EditParts.
>
> Best regards and good luck,
> M.H.
>
> "Alan Morgan" <a.morgan@pilz.ie> schrieb im Newsbeitrag
> news:d3ogmn$sur$1@news.eclipse.org...
> > Hi,
> >
> > I want to be able to layout figures in a grid type manner.
> > I don't see any Grid Layout available in Draw2D.
> >
> > Have I missed it or will something else do such as the Directed Graph
> > Layout.
> > I can't seem to find any documentation that explains the
> > DirectedGraphLayout.
> > Lil help ?
> >
> > Cheers,
> > Alan.
> >
> >
>
>
Re: Directed Graph Layout [message #178278 is a reply to message #178236] Tue, 19 April 2005 14:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Please checkout the draw2d.examples project from CVS. There is a FAQ on our
homepage which talks about how to load code from CVS.

In that project, you will find exactly what you want.

-Randy
Re: Directed Graph Layout [message #178411 is a reply to message #178278] Wed, 20 April 2005 11:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: a.morgan.pilz.ie

Thanks Randy, I had a look at the examples you mentioned.

I tried to do a simple example of my own on the GEF editor I have been
working on.
This is what I have done so far :

I have created a DirectedGraph.
I have added a Node for each Figure on the Diagram.
The Node.data points to the Figure at the moment.
I have added an Edge for each connection on the Diagram.
Source and target of Edge point to Node representing Figure which is being
connected.

However when I call DirectGraphLayout.visit(DirectedGraph) I am not seeing
anything happening.
To be honest I'm not even sure what is supposed to happen.

Do I sound like I'm on the right track or have I missed the idea completely
?
And what about the Layout Role in the EditPart - what role does that play in
all this ?


Thanks,
Alan.




"Randy Hudson" <none@us.ibm.com> wrote in message
news:d433pt$7fn$1@news.eclipse.org...
> Please checkout the draw2d.examples project from CVS. There is a FAQ on
our
> homepage which talks about how to load code from CVS.
>
> In that project, you will find exactly what you want.
>
> -Randy
>
>
Re: Directed Graph Layout [message #178519 is a reply to message #178411] Wed, 20 April 2005 16:45 Go to previous message
Donna Gresh is currently offline Donna GreshFriend
Messages: 30
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 005BF7C585256FE9_=
Content-Type: text/plain; charset="US-ASCII"

I use the DirectedGraphLayout. After the call to "visit" there's still
more work to do. I then call a routine that I call "buildGraph" that for
each node and edge, adds them to the overall Figure. I'd attach my code,
but it's just based very closely on the example in the draw2d examples
"DirectedGraphDemo.java", so you'd be much better off looking at that. The
routine "buildGraph" exists in that demo and is quite close to my version.
--=_alternative 005BF7C585256FE9_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">I use the DirectedGraphLayout. After
the call to &quot;visit&quot; there's still more work to do. I then call
a routine that I call &quot;buildGraph&quot; that for each node and edge,
adds them to the overall Figure. I'd attach my code, but it's just based
very closely on the example in the draw2d examples &quot;DirectedGraphDemo.java&quot;,
so you'd be much better off looking at that. The routine &quot;buildGraph&quot;
exists in that demo and is quite close to my version.</font>
--=_alternative 005BF7C585256FE9_=--
Previous Topic:Maximize window event
Next Topic:Resizable ScrollableThumbnail?
Goto Forum:
  


Current Time: Fri Apr 19 13:08:35 GMT 2024

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

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

Back to the top