Stephan Druskat Messages: 53 Registered: October 2011 Location: Berlin, Germany
How can I enforce FlowLayout behaviour in a GEF editor for text editor-like look and feel (using nodes for the words), and automatic "line-breaks"?
I've tried to circumvent horizontal scrolling (which results in all nodes being on one line) by using SimpleRootEditPart and a Panel with FlowLayout as the parent figure, but unless I set the preferredSize with width = width of the Graphical Viewer's FigureCanvas and height = some random real int (e.g., 10000), I cannot get it to work.
As I'm hesitant about using a hard-coded height int, and cannot think about how to calculate the *real* optimal height of the parent figure, I'm at a loss here.
Many thanks in advance for any pointers in the right direction! Perhaps my combination of SimpleRootEditPart > Panel > FlowLayout is not the right direction at all?