O'Reilly logo

The Eclipse Graphical Editing Framework (GEF) by Eric Clayberg, Jaime Wren, Dan Rubel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Layout Managers

When a figure contains children, its layout manager is responsible for setting the bounds and location of each child. There is no implicit layout manager, so if no manager is provided, then the children are not displayed. Layout managers may use the preferred size of the figure as well as a constraint to position and size the children.

5.1 List Constraints

Constraints are extra data that the LayoutManager may require when positioning the children. For example, the XYLayout (see Section 5.3.7 on page 63) takes a Rectangle as its constraint which provides the location and size for the figure.

XYLayout layout = new XYLayout();root.setLayoutManager(layout);root.add(figures[0]);layout.setConstraint(figures[0], new Rectangle(10, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required