Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gmf-dev] WrapLabel Replacement


GMF Developers,

I am continuing with the work Syed did to refactor our WrapLabel to use GEF's text layout classes instead of handling the wrapping ourselves in GMF.
Bug 162932 WrapLabel should use Gef's text layout

There are a number of issues with our current WrapLabel that we hope to fix with this.  Specifically,
Bug 136871 [NoteTextLabel] TextDirectEditManager does not allow to use WrapLabels with edit parts other then TextCompartmentEditPart
Bug 145826 [NoteTextLabel] TextDirectEditManager does not work with GraphicalEditParts
Bug 156771 [NoteTextLabel] WrapLabel position changes upon multiple invocations with same text.
Bug 160380 [NoteTextLabel] WrapLabel text not drawn properly when text alignment is centered.
Bug 160382 [NoteTextLabel] WrapLabel's focus rectangle being drawn away from WrapLabel itself
Bug 161628 [NoteTextLabel] Multi Line Text is not working properly
Bug 194944 WrapLabel is cutting off bottom of text in compartment's name label
Text justification while editing should match that of the label.
The caret location when direct editing does not always match where the mouse was clicked.
Added support for BiDi character set and double byte characters.
Text cut with no indication that there is more text, but it doesn't fit on the note.

I plan on deprecating the existing WrapLabel figure and creating a new one with similar functionality that uses GEF's text layout classes to handle the wrapping, caret positioning, bidi issues, etc.  This should resolve many of the issues.

I also want to remove/deprecate any code in GMF that assumes that the figure of a TextCompartmentEditPart is a WrapLabel (or the new equivalent).  Clients should be able to easily use any figure in a TextCompartmentEditPart subclass (e.g. GEF's Label if they don't need wrapping, their own custom label figure).  I am thinking of introducing some new interfaces that the TextCompartmentEditPart can adapt to if they wish to support generic label functionality in their custom label figure (e.g. text selection) so that a default set of editpolicies can continue to work with the TextCompartmentEditPart's figure.

The current WrapLabel supports multiple icons.  I am considering not supporting this in the new version as it was developed for a specific use case and I know of no case where it is now being used..  If anyone feels supporting multiple icons in a label is common enough that it should be in GMF, let me know.

Let me know if you have any requirements or feedback regarding this work.

Thanks,
Cherie








Back to the top