Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Zest: How to style connections? Compartments?
Zest: How to style connections? Compartments? [message #240567] Fri, 11 January 2008 04:39 Go to next message
Miles Parker is currently offline Miles ParkerFriend
Messages: 1340
Registered: July 2009
Senior Member
This is kind of embarrasing question to ask :) but I cannot figure out
how to implement styled connections and entities. I see the
IConnectionStyleProvider interface and there seems to be a factory, but
that is located in .internals, i.e. presumably not for extension. I
can't find any hooks in GraphiViewer or any of the providers either..

Also is there any built-in support for compartments?

Links to more example code would be great. I've seen both of these
features in screenshots but I can't find any code eamples except for
the two simple examples on the Wiki page.

Zest is great! GMF was huge overkill / complexity for what I wanted and
GEF alone would involve a lot of custom work -- you've saved me a ton
of work and allowed me to offer a tool to users right away that I was
planning for months from now.
Re: Zest: How to style connections? Compartments? [message #240638 is a reply to message #240567] Sat, 12 January 2008 02:15 Go to previous message
Eclipse UserFriend
Originally posted by: irbull.cs.uvic.ca

Miles Parker wrote:
>
> This is kind of embarrasing question to ask :) but I cannot figure out
> how to implement styled connections and entities. I see the
> IConnectionStyleProvider interface and there seems to be a factory, but
> that is located in .internals, i.e. presumably not for extension. I
> can't find any hooks in GraphiViewer or any of the providers either..

No this is not an embarrassing question, I really should have better
code examples.

For this to work, simply have your label provider implement
IConnectionStyleProvider. Then implement the methods. This provides a
few simply styles you can add to your graph.

I may change the API slightly (to make it easier to add new styles) but
I will try not to break any backwards compatibility. I have opened a
bug to remind myself to add a new snippet for this:

215101: Add a code snippet to show how to use style providers
https://bugs.eclipse.org/bugs/show_bug.cgi?id=215101
>
> Also is there any built-in support for compartments?

There is limited support. You should be able to add a GraphContainer to
your graph. Currently graph containers cannot contain other containers.

Take a look at this snippet for an example:
ttp://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gef/test /org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/Neste dGraphSnippet.java?revision=1.3&root=Tools_Project&v iew=markup



>
> Links to more example code would be great. I've seen both of these
> features in screenshots but I can't find any code eamples except for the
> two simple examples on the Wiki page.

There are a few in the CVS repository
eclipse.org/home/tools/gef/test/org.eclipse.zest.tests

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.gef/tes t/org.eclipse.zest.tests/src/org/eclipse/zest/tests/swt/?roo t=Tools_Project


>
> Zest is great! GMF was huge overkill / complexity for what I wanted and
> GEF alone would involve a lot of custom work -- you've saved me a ton of
> work and allowed me to offer a tool to users right away that I was
> planning for months from now.
>
Thanks for the kind words.

Cheers,
ian
Previous Topic:Zest Graph nodes - vertically align Text and Image on node Label
Next Topic:GEF parent child problem
Goto Forum:
  


Current Time: Sat Dec 20 20:55:34 GMT 2014

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

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