org.eclipse.draw2d

## Class FreeformLayout

- java.lang.Object
- - org.eclipse.draw2d.AbstractLayout
  - - org.eclipse.draw2d.XYLayout
    - - org.eclipse.draw2d.FreeformLayout

All Implemented Interfaces:
  LayoutManager

    public class FreeformLayout
    extends XYLayout

A layout for `FreeformFigures`. Supports option to set only positive (x,y) coordinates for children figures.

### Field Summary

### Fields inherited from class org.eclipse.draw2d.XYLayout

`constraints`

### Fields inherited from class org.eclipse.draw2d.AbstractLayout

`isObservingVisibility, preferredSize`

### Constructor Summary

Constructors
Constructor and Description
`FreeformLayout()`

### Method Summary

Methods
`Point` `getOrigin(IFigure figure)` Returns the point (0,0) as the origin.
`void` `invalidate()` Tells the LayoutManager to throw away all cached information about the figures it is responsible for.
`boolean` `isPositiveCoordinates()` Checks whether the positive coordinates flag is on, e.g positive coordinates for children are inforced by the layout
`void` `setPositiveCoordinates(boolean positiveCoordinates)` Sets/unsets the positive coordinates flag for true/false parameters respectively.

### Methods inherited from class org.eclipse.draw2d.XYLayout

`calculatePreferredSize, getConstraint, layout, remove, setConstraint`

### Methods inherited from class org.eclipse.draw2d.AbstractLayout

`calculatePreferredSize, getBorderPreferredSize, getMinimumSize, getMinimumSize, getPreferredSize, getPreferredSize, invalidate, isObservingVisibility, setObserveVisibility`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### FreeformLayout

    public FreeformLayout()

### Method Detail

#### getOrigin

    public Point getOrigin(IFigure figure)

Returns the point (0,0) as the origin.

Overrides:
  `getOrigin` in class `XYLayout`
Parameters:
  `figure` - the figure whose origin is requested
Returns:
  the origin
See Also:
  `XYLayout.getOrigin(IFigure)`

#### isPositiveCoordinates

    public boolean isPositiveCoordinates()

Checks whether the positive coordinates flag is on, e.g positive coordinates for children are inforced by the layout

Returns:
  `boolean`
Since:
  3.6

#### setPositiveCoordinates

    public void setPositiveCoordinates(boolean positiveCoordinates)

Sets/unsets the positive coordinates flag for true/false parameters respectively. If option is set to on then layout calculates positive coordinates for children figures by adjusting the layout origin accordingly.

Parameters:
  `positiveCoordinates` -
Since:
  3.6

#### invalidate

    public void invalidate()

Description copied from interface: `LayoutManager`
Tells the LayoutManager to throw away all cached information about the figures it is responsible for. This method is called whenever the owning figure is invalidated.

Specified by:
  `invalidate` in interface `LayoutManager`
Overrides:
  `invalidate` in class `AbstractLayout`
See Also:
  `AbstractLayout.invalidate()`