org.eclipse.zest.layouts.algorithms

## Class ContinuousLayoutAlgorithm

- java.lang.Object
- - org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm
  - - org.eclipse.zest.layouts.algorithms.ContinuousLayoutAlgorithm

All Implemented Interfaces:
  LayoutAlgorithm, Stoppable

Direct Known Subclasses:
  SpringLayoutAlgorithm

    public abstract class ContinuousLayoutAlgorithm
    extends AbstractLayoutAlgorithm

### Field Summary

### Fields inherited from class org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm

`comparator, filter, internalAsynchronous, internalContinuous, layout_styles, layoutStopped, MIN_ENTITY_SIZE, resizeEntitiesAfterLayout`

### Constructor Summary

Constructors
Constructor and Description
`ContinuousLayoutAlgorithm(int styles)`

### Method Summary

Methods
`protected void` `applyLayoutInternal(org.eclipse.zest.layouts.dataStructures.InternalNode[] entitiesToLayout, org.eclipse.zest.layouts.dataStructures.InternalRelationship[] relationshipsToConsider, double x, double y, double width, double height)` Calculates and applies the positions of the given entities based on a spring layout using the given relationships.
`protected abstract void` `computeOneIteration(org.eclipse.zest.layouts.dataStructures.InternalNode[] entitiesToLayout, org.eclipse.zest.layouts.dataStructures.InternalRelationship[] relationshipsToConsider, double x, double y, double width, double height)` Computes a single iteration of the layout algorithm
`org.eclipse.zest.layouts.dataStructures.DisplayIndependentRectangle` `getBounds()`
`protected abstract boolean` `performAnotherNonContinuousIteration()` The logic to determine if a layout should continue running or not
`void` `setBounds(double x, double y, double width, double height)`
`void` `setLayoutArea(double x, double y, double width, double height)`

### Methods inherited from class org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm

`addEntity, addProgressListener, addRelationship, applyLayout, defaultFitWithinBounds, defaultFitWithinBounds, fireProgressEnded, fireProgressEvent, fireProgressStarted, getCurrentLayoutStep, getEntityAspectRatio, getLayoutBounds, getLocalLocation, getNumberOfProgressListeners, getStyle, getTotalNumberOfLayoutSteps, isRunning, isValidConfiguration, postLayoutAlgorithm, preLayoutAlgorithm, removeEntity, removeProgressListener, removeRelationship, removeRelationships, removeRelationships, setComparator, setEntityAspectRatio, setFilter, setStyle, stop, updateBendPoints, updateEntities, updateLayoutLocations, updateRelationships, verifyInput`

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

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

### Constructor Detail

#### ContinuousLayoutAlgorithm

    public ContinuousLayoutAlgorithm(int styles)

### Method Detail

#### performAnotherNonContinuousIteration

    protected abstract boolean performAnotherNonContinuousIteration()

The logic to determine if a layout should continue running or not

#### computeOneIteration

    protected abstract void computeOneIteration(org.eclipse.zest.layouts.dataStructures.InternalNode[] entitiesToLayout,
                           org.eclipse.zest.layouts.dataStructures.InternalRelationship[] relationshipsToConsider,
                           double x,
                           double y,
                           double width,
                           double height)

Computes a single iteration of the layout algorithm

#### setLayoutArea

    public void setLayoutArea(double x,
                     double y,
                     double width,
                     double height)

Specified by:
  `setLayoutArea` in class `AbstractLayoutAlgorithm`

#### getBounds

    public org.eclipse.zest.layouts.dataStructures.DisplayIndependentRectangle getBounds()

#### setBounds

    public void setBounds(double x,
                 double y,
                 double width,
                 double height)

#### applyLayoutInternal

    protected void applyLayoutInternal(org.eclipse.zest.layouts.dataStructures.InternalNode[] entitiesToLayout,
                           org.eclipse.zest.layouts.dataStructures.InternalRelationship[] relationshipsToConsider,
                           double x,
                           double y,
                           double width,
                           double height)

Calculates and applies the positions of the given entities based on a spring layout using the given relationships.

Specified by:
  `applyLayoutInternal` in class `AbstractLayoutAlgorithm`
Parameters:
  `entitiesToLayout` - Apply the algorithm to these entities
  `relationshipsToConsider` - Only consider these relationships when applying the algorithm.