Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to use the ComboBoxCellEditor to impl dierect edit?
How to use the ComboBoxCellEditor to impl dierect edit? [message #234095] Fri, 11 May 2007 08:39
Eclipse UserFriend
Originally posted by: sundaolin.126.com

In the editpart,i do this :

protected void performDirectEdit() {
if (directEditManager == null) {
directEditManager = new CDPDBDirectEditManager(this,
ComboBoxCellEditor.class, new CDPDBCellEditorLocator(
getFigure()));
}
directEditManager.show();
}

In the direct edit manager:

protected void initCellEditor() {

CCombo c = (CCombo)getCellEditor().getControl();
c.add("aaa");
c.add("bbb");
getCellEditor().setValue(new Integer(0));
}


In the locator:

Label label = ((ConnectionFigure)figure).getLabel();
Rectangle rect = label.getBounds().getCopy();
figure.translateToAbsolute(rect);

CCombo c = (CCombo)celleditor.getControl();
c.setBounds(rect.x, rect.y, rect.width, rect.height);
return;



but, it seems no use.

I debug the program, and find that the initCellEditor() method doesn't
run.(neither the relocate() method).

why?
Previous Topic:GEF tutorials and Books
Next Topic:Adding context menu for Draw2d figures
Goto Forum:
  


Current Time: Sat Aug 20 02:58:30 GMT 2022

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

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

Back to the top