Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » GEF viewer in CTableTreeCell
GEF viewer in CTableTreeCell [message #564973] Thu, 14 September 2006 16:43
Al Major is currently offline Al Major
Messages: 72
Registered: July 2009
Member
i'm attempting to get a GEF based viewer to show up in a cell.

here's (a slightly simplified version of) the code. SalesViewer is a
class that draws a diagram into its composite. it happens to use GEF to
do this, although that shouldn't matter to this code. it is setup so
that the diagram should appear in the title area of the table cell.

the viewers are being correctly initialized (checked that in debugger).
and clearly something is happening because the rows heights are changing
in the appropriate window. unfortunately, nothing is visible in the
cell, the blank background remains unchanged.

has anyone got something like this working (granted jeremy is probably
the only one who may have tried :-)? if not, does anyone have
suggestions on a troubleshooting procedure. what events should i try to
set off (paint? resize? selectio?), and where should i set the debugger,
etc. to get a handle on what might be going wrong.

regards,

al

public class ViewerCell extends CTableTreeCell {
SalesViewer fCSV;

public ViewerCell(CContainerItem item, int style) {
super(item, style | SWT.TITLE);
}

private SalesViewer getSV() {
if ( fCSV == null ) {
fCSV = new SalesViewer();
}
return fCSV;
}

protected void createTitleContents(Composite contents, int style) {
getSV().createControl(contents, SWT.NO_BACKGROUND);
}

public boolean update(Object element, String[] properties) {
if ( element instanceof AreaRefNode ) {
getSV().init(element);
}
return false;
}
}
Previous Topic:variable CTableTreeCell
Next Topic:Alpha dist needs updated to reflect Snippet changes
Goto Forum:
  


Current Time: Thu Oct 23 11:58:03 GMT 2014

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

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