Maven module :un.api : api-display :
Class : un.api.layout.Layout
Extends/Implements : un.api.event.EventSource
Subclasses : -

Layouts are object in charge of placing Positionables in a defined space.
They can be used in widgets for user interfaces, to calculate graph node
positions or any system which require dynamic positioning based on constraints.
author  Johann Sorel


Variables : PROPERTY_VIEW, PROPERTY_DIRTY
Functions : getLayoutConstraintClass, setView, getView, setPositionables, getExtents, getExtents, update, getPositionables



Property indicating when the layout view ractangle change.
public Chars PROPERTY_VIEW


Property indicating when the layout element placement have changed.
public Chars PROPERTY_DIRTY



Get this layout constraint class.
Every layout may require different types of informations.
return  expected positionable layout constraint class, can be null.
Class getLayoutConstraintClass ()


Set layout working bbox.
The layout will try to place elements within this bbox.
param  extent
void setView (BBox extent)


Working bbox of this layout.
return  BBox never null
BBox getView ()


Set collection of Positionable managed by the layout
param  positionables
void setPositionables (Sequence positionables)


Calculate layout min, best and max extents based on given constraint.
param  buffer
param  constraint can be null
return
Extents getExtents (Extents buffer, Extent constraint)


Minimum,best and maximum extent the layout needs for the current view.
Under minimum size or over maximum the layout won't have a proper rendering.
return  Extent, never null
Extents getExtents ()


Update positionables transforms and size.
The transforms will be relative to coordinate (0,0).
void update ()


Get an iterator of Pair (Positionable,AbsoluteConstraint) for elements which intersect the given extent
param  searchArea
return
Iterator getPositionables (BBox searchArea)