Multi-line label editor [message #230612] |
Sun, 17 May 2009 22:54 |
Eclipse User |
|
|
|
I have diagram elements with WrappingLabels that are actually supposed to
really wrap the text which is displayed on them, i.e. I do
'myWrappingLabel.setTextWrap(true);'.
In the corresponding EditPart I overwrote the getManager() method:
protected DirectEditManager getManager() {
if (manager == null) {
setManager(new TextDirectEditManager(this,
WrapTextCellEditor.class,
CompModellingEditPartFactory.getTextCellEditorLocator(this)) );
}
return manager;
}
However, this results in a very weird behaviour of the diagram element,
when I click on it to bring it into direct edit mode: on typing the first
character into the editor field, the editor field closes and the typed
character is committed as new value into the WrappingLabelText.
If I use TextCellEditorEx.class instead of the WrapTextCellEditor.class
as parameter, the editing works fine, but of course I don't have only a
single editor line of text when going into direct edit mode, i.e. while
typing the text disappears on the left out of the editor line.
Any idea what causes this? Did I forget to change something in some other
class?
|
|
|
Powered by
FUDForum. Page generated in 0.03483 seconds