Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Enforce FlowLayout / suppress scrolling
Enforce FlowLayout / suppress scrolling [message #1350280] Mon, 12 May 2014 11:38
Stephan Druskat is currently offline Stephan Druskat
Messages: 52
Registered: October 2011
Location: Berlin, Germany
Member

Dear All,

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?
Previous Topic:draw2d Fill Color dependency on Linux libraries
Next Topic:addNode(Object) does not work in GraphViewer
Goto Forum:
  


Current Time: Fri Jul 25 12:12:13 EDT 2014

Powered by FUDForum. Page generated in 0.02422 seconds