Package org.eclipse.draw2d

# Class AbstractConstraintLayout

java.lang.Object
org.eclipse.draw2d.AbstractLayout
org.eclipse.draw2d.AbstractConstraintLayout

All Implemented Interfaces:
  `LayoutManager`

Direct Known Subclasses:
  `DelegatingLayout`, `XYLayout`

public abstract class AbstractConstraintLayout extends AbstractLayout
Common base class for layouts working on a constraint per figure.

Since:
  3.16

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Map<IFigure,Object>`
`constraints`
The layout constraints

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

`isObservingVisibility, preferredSize`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`AbstractConstraintLayout()`

## Method Summary

Modifier and Type
Method
Description
`Object`
`getConstraint(IFigure figure)`
Returns the constraint for the given figure.
`void`
`remove(IFigure figure)`
Removes the given figure from this LayoutManager's list of figures.
`void`
`setConstraint(IFigure figure, Object newConstraint)`
Sets the layout constraint of the given figure.

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

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

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

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

### Methods inherited from interface org.eclipse.draw2d.LayoutManager

`layout`

## Field Details

### constraints

protected Map<IFigure,Object> constraints
The layout constraints

## Constructor Details

### AbstractConstraintLayout

protected AbstractConstraintLayout()

## Method Details

### getConstraint

public Object getConstraint(IFigure figure)
Description copied from class: `AbstractLayout`
Returns the constraint for the given figure.

Specified by:
  `getConstraint` in interface `LayoutManager`
Overrides:
  `getConstraint` in class `AbstractLayout`
Parameters:
  `figure` - The figure
Returns:
  The constraint
See Also:
  - `LayoutManager.getConstraint(IFigure)`

### remove

public void remove(IFigure figure)
Description copied from class: `AbstractLayout`
Removes the given figure from this LayoutManager's list of figures.

Specified by:
  `remove` in interface `LayoutManager`
Overrides:
  `remove` in class `AbstractLayout`
Parameters:
  `figure` - The figure to remove
See Also:
  - `LayoutManager.remove(IFigure)`

### setConstraint

public void setConstraint(IFigure figure, Object newConstraint)
Sets the layout constraint of the given figure.

Specified by:
  `setConstraint` in interface `LayoutManager`
Overrides:
  `setConstraint` in class `AbstractLayout`
Parameters:
  `figure` - the child
  `newConstraint` - the child's new constraint
Since:
  2.0
See Also:
  - `LayoutManager.setConstraint(IFigure, Object)`