Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » ZEST: table cells as nodes / nodes in table cells?
icon5.gif  ZEST: table cells as nodes / nodes in table cells? [message #779759] Mon, 16 January 2012 13:46 Go to next message
Stephan Druskat is currently offline Stephan DruskatFriend
Messages: 104
Registered: October 2011
Location: Berlin, Germany
Senior Member

Dear All,

I'm considering using ZEST for the first time for my RCP, and I have a general question: Is it possible to use the cells of a table as nodes?

Background: I want to draw a graph over a text which is placed in a a table. The table has one word per cell (all in one line), and I want to use the cells as nodes.

Alternatively, is it possible to place nodes in cells, and still "addres" them?

Many thanks!

[Updated on: Mon, 16 January 2012 13:47]

Report message to a moderator

Re: ZEST: table cells as nodes / nodes in table cells? [message #779765 is a reply to message #779759] Mon, 16 January 2012 14:06 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 392
Registered: July 2015
Senior Member
I think, it is not possible, or at least it is very hard to do. Zest uses an SWT Canvas to draw the Graph; while Table is a native widget in most operating systems. Some hack that would provide similar solutions is to put a Graph widget into every cell of the table, and then you have something you wanted.

However, it is possible to share data/selection between the Zest Graphs and your table. The simplest way to do this is using a JFace content provider for both the table (TableViewer) and the Zest Graph (in this case GraphViewer); and then you can synchronize the selection between the table and the graph nodes using a simple transformation code.

I hope, I could help a bit; or if not, please, clarify a bit your question.
Zoltán Ujhelyi
Re: ZEST: table cells as nodes / nodes in table cells? [message #780140 is a reply to message #779765] Tue, 17 January 2012 09:02 Go to previous messageGo to next message
Stephan Druskat is currently offline Stephan DruskatFriend
Messages: 104
Registered: October 2011
Location: Berlin, Germany
Senior Member

Thanks Zoltán!

That helps indeed. I guess using a JFace content provider makes sense. One follow-up question, can nodes be styled to be "invisible"? That way I could put nodes over the individual cells and make it seem as if edges connect to cells, when they really connect to "invisible" nodes...
Re: ZEST: table cells as nodes / nodes in table cells? [message #813086 is a reply to message #780140] Sun, 04 March 2012 20:33 Go to previous message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 392
Registered: July 2015
Senior Member
Hi!

Sorry for the late answer - I hope its not too late.

It is possible to create invisible figures: you can modify your label provider to extend IFigureProvider (http://git.eclipse.org/c/gef/org.eclipse.zest.git/tree/org.eclipse.zest.jface/src/org/eclipse/zest/core/viewers/IFigureProvider.java - the same interface exists for Zest 1.x as well) to provide a custom Draw2D figure. Zest then draws the returned figure instead of the default implementation.

Zoltán Ujhelyi
Previous Topic:How to rotate draw2d label?
Next Topic:Connections selection after changing z-order of layers
Goto Forum:
  


Current Time: Fri Apr 19 20:12:12 GMT 2024

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

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

Back to the top