-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.g2d.diagram.handler;\r
-\r
-import java.awt.geom.Rectangle2D;\r
-\r
-import org.simantics.g2d.diagram.IDiagram;\r
-import org.simantics.g2d.diagram.handler.layout.BorderLayout;\r
-import org.simantics.g2d.diagram.handler.layout.FlowLayout;\r
-import org.simantics.g2d.diagram.handler.layout.GridLayout;\r
-\r
-/**\r
- * LayoutManager puts elements on diagram. \r
- * layout() method must be explicitely invoked.\r
- * \r
- * Diagram must have size hint (DiagramHints.KEY_BOUNDS).\r
- * \r
- * @See {@link FlowLayout}\r
- * @See {@link GridLayout}\r
- * @See {@link BorderLayout}\r
- * @author Toni Kalajainen\r
- */\r
-public interface LayoutManager extends DiagramHandler {\r
-\r
- /**\r
- * Lay-out elements on the diagram. \r
- * \r
- * @param diagram\r
- */\r
- void layout(IDiagram diagram, Rectangle2D bounds);\r
- \r
- /**\r
- * Computes and returns the size of the specified\r
- * composite's client area according to this layout.\r
- * <p>\r
- * This method computes the size that the client area \r
- * of the composite must be in order to position all \r
- * children at their preferred size inside the\r
- * composite according to the layout algorithm\r
- * encoded by this layout.\r
- * </p>\r
- * <p>\r
- * When a width or height hint is supplied, it is\r
- * used to constrain the result. For example, if a\r
- * width hint is provided that is less than the\r
- * width of the client area, the layout may choose\r
- * to wrap and increase height, clip, overlap, or\r
- * otherwise constrain the children.\r
- * </p>\r
- *\r
- * @param composite a composite widget using this layout\r
- * @param wHint width (<code>null</code> for preferred size)\r
- * @param hHint height (<code>null</code> for preferred size)\r
- * @return the computed size (width, height)\r
- */\r
- Rectangle2D computeSize(IDiagram diagram, Double wHint, Double hHint); \r
- \r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.g2d.diagram.handler;
+
+import java.awt.geom.Rectangle2D;
+
+import org.simantics.g2d.diagram.IDiagram;
+import org.simantics.g2d.diagram.handler.layout.BorderLayout;
+import org.simantics.g2d.diagram.handler.layout.FlowLayout;
+import org.simantics.g2d.diagram.handler.layout.GridLayout;
+
+/**
+ * LayoutManager puts elements on diagram.
+ * layout() method must be explicitely invoked.
+ *
+ * Diagram must have size hint (DiagramHints.KEY_BOUNDS).
+ *
+ * @See {@link FlowLayout}
+ * @See {@link GridLayout}
+ * @See {@link BorderLayout}
+ * @author Toni Kalajainen
+ */
+public interface LayoutManager extends DiagramHandler {
+
+ /**
+ * Lay-out elements on the diagram.
+ *
+ * @param diagram
+ */
+ void layout(IDiagram diagram, Rectangle2D bounds);
+
+ /**
+ * Computes and returns the size of the specified
+ * composite's client area according to this layout.
+ * <p>
+ * This method computes the size that the client area
+ * of the composite must be in order to position all
+ * children at their preferred size inside the
+ * composite according to the layout algorithm
+ * encoded by this layout.
+ * </p>
+ * <p>
+ * When a width or height hint is supplied, it is
+ * used to constrain the result. For example, if a
+ * width hint is provided that is less than the
+ * width of the client area, the layout may choose
+ * to wrap and increase height, clip, overlap, or
+ * otherwise constrain the children.
+ * </p>
+ *
+ * @param composite a composite widget using this layout
+ * @param wHint width (<code>null</code> for preferred size)
+ * @param hHint height (<code>null</code> for preferred size)
+ * @return the computed size (width, height)
+ */
+ Rectangle2D computeSize(IDiagram diagram, Double wHint, Double hHint);
+
+}