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:DND: How to get dragged item before it is dropped?
Next Topic:CombinedTemplateCreationEntry and drag and drop from the palette
Goto Forum:
  


Current Time: Fri Apr 26 23:42:26 GMT 2024

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

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

Back to the top