Package org.eclipse.zest.layouts.algorithms

# Class AbstractLayoutAlgorithm.Zest1

java.lang.Object
org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm.Zest1

All Implemented Interfaces:
  `LayoutAlgorithm`, `LayoutAlgorithm.Zest1`, `Stoppable`

Direct Known Subclasses:
  `CompositeLayoutAlgorithm.Zest1`, `ContinuousLayoutAlgorithm`, `DirectedGraphLayoutAlgorithm.Zest1`, `GridLayoutAlgorithm.Zest1`, `HorizontalShift`, `TreeLayoutAlgorithm.Zest1`

Enclosing class:
  `AbstractLayoutAlgorithm`

@Deprecated(since="2.0", forRemoval=true) public abstract static class AbstractLayoutAlgorithm.Zest1 extends Object implements LayoutAlgorithm.Zest1, Stoppable
Deprecated, for removal: This API element is subject to removal in a future version.
No longer used in Zest 2.x. This class will be removed in a future release.

Since:
  2.0
@noextend
  This class is not intended to be subclassed by clients.
@noreference
  This class is not intended to be referenced by clients.

## Nested Class Summary

## Nested classes/interfaces inherited from interface org.eclipse.zest.layouts.LayoutAlgorithm

`LayoutAlgorithm.Zest1`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Comparator`
`comparator`
Deprecated.
`protected Filter`
`filter`
Deprecated.
`protected boolean`
`internalAsynchronous`
Deprecated.
`protected boolean`
`internalContinuous`
Deprecated.
`protected int`
`layout_styles`
Deprecated.
`protected boolean`
`layoutStopped`
Deprecated.
`static final int`
`MIN_ENTITY_SIZE`
Deprecated.
`protected boolean`
`resizeEntitiesAfterLayout`
Deprecated.

## Constructor Summary

Constructors
Constructor
Description
`Zest1(int styles)`
Deprecated.

## Method Summary

Modifier and Type
Method
Description
`void`
`addEntity(LayoutEntity entity)`
Deprecated.
`void`
`addProgressListener(ProgressListener listener)`
Deprecated.
`void`
`addRelationship(LayoutRelationship relationship)`
Deprecated.
`void`
`applyLayout(boolean clean)`
Deprecated.
`void`
`applyLayout(LayoutEntity[] entitiesToLayout, LayoutRelationship[] relationshipsToConsider, double x, double y, double width, double height, boolean asynchronous, boolean continuous)`
Deprecated.
`protected abstract void`
`applyLayoutInternal(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider, double boundsX, double boundsY, double boundsWidth, double boundsHeight)`
Deprecated.
`protected void`
`defaultFitWithinBounds(InternalNode[] entitiesToLayout, DisplayIndependentRectangle realBounds)`
Deprecated.
`protected void`
`defaultFitWithinBounds(InternalNode[] entitiesToLayout, InternalRelationship[] relationships, DisplayIndependentRectangle realBounds)`
Deprecated.
`protected void`
`fireProgressEnded(int totalNumberOfSteps)`
Deprecated.
`protected void`
`fireProgressEvent(int currentStep, int totalNumberOfSteps)`
Deprecated.
`protected void`
`fireProgressStarted(int totalNumberOfSteps)`
Deprecated.
`protected void`
`fireProgressUpdated(int currentStep, int totalNumberOfSteps)`
Deprecated.
`protected abstract int`
`getCurrentLayoutStep()`
Deprecated.
`double`
`getEntityAspectRatio()`
Deprecated.
`protected DisplayIndependentRectangle`
`getLayoutBounds(InternalNode[] entitiesToLayout, boolean includeNodeSize)`
Deprecated.
`protected DisplayIndependentPoint`
`getLocalLocation(InternalNode[] entitiesToLayout, double x, double y, DisplayIndependentRectangle realBounds)`
Deprecated.
`protected int`
`getNumberOfProgressListeners()`
Deprecated.
`int`
`getStyle()`
Deprecated.
`protected abstract int`
`getTotalNumberOfLayoutSteps()`
Deprecated.
`boolean`
`isRunning()`
Deprecated.
`protected abstract boolean`
`isValidConfiguration(boolean asynchronous, boolean continuous)`
Deprecated.
`protected abstract void`
`postLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider)`
Deprecated.
`protected abstract void`
`preLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider, double x, double y, double width, double height)`
Deprecated.
`void`
`removeEntity(LayoutEntity entity)`
Deprecated.
`void`
`removeProgressListener(ProgressListener listener)`
Deprecated.
`void`
`removeRelationship(LayoutRelationship relationship)`
Deprecated.
`void`
`removeRelationships(Collection<? extends LayoutRelationship> collection)`
Deprecated.
`void`
`removeRelationships(List<? extends LayoutRelationship> relationships)`
Deprecated.
`void`
`setComparator(Comparator comparator)`
Deprecated.
`void`
`setEntityAspectRatio(double ratio)`
Deprecated.
`void`
`setFilter(Filter filter)`
Deprecated.
`abstract void`
`setLayoutArea(double x, double y, double width, double height)`
Deprecated.
`void`
`setLayoutContext(LayoutContext context)`
Deprecated.
`void`
`setStyle(int style)`
Deprecated.
`void`
`stop()`
Deprecated.
`protected void`
`updateBendPoints(InternalRelationship[] relationshipsToConsider)`
Deprecated.
`protected InternalNode[]`
`updateEntities(InternalNode[] entities)`
Deprecated.
`protected void`
`updateLayoutLocations(InternalNode[] nodes)`
Deprecated.
`protected InternalRelationship[]`
`updateRelationships(InternalRelationship[] relationships)`
Deprecated.
`static boolean`
`verifyInput(LayoutEntity[] entitiesToLayout, LayoutRelationship[] relationshipsToConsider)`
Deprecated.

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

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

## Field Details

### MIN_ENTITY_SIZE

@Deprecated public static final int MIN_ENTITY_SIZE
Deprecated.

See Also:
  - Constant Field Values

### comparator

@Deprecated protected Comparator comparator
Deprecated.

### filter

@Deprecated protected Filter filter
Deprecated.

### internalContinuous

@Deprecated protected boolean internalContinuous
Deprecated.

### internalAsynchronous

@Deprecated protected boolean internalAsynchronous
Deprecated.

### layoutStopped

@Deprecated protected boolean layoutStopped
Deprecated.

### layout_styles

@Deprecated protected int layout_styles
Deprecated.

### resizeEntitiesAfterLayout

@Deprecated protected boolean resizeEntitiesAfterLayout
Deprecated.

## Constructor Details

### Zest1

@Deprecated public Zest1(int styles)
Deprecated.
Initializes the abstract layout algorithm.

See Also:
  - `LayoutStyles`

## Method Details

### removeRelationships

@Deprecated public void removeRelationships(Collection<? extends LayoutRelationship> collection)
Deprecated.

### addEntity

@Deprecated public void addEntity(LayoutEntity entity)
Deprecated.
Queues up the given entity (if it isn't in the list) to be added to the algorithm.

Specified by:
  `addEntity` in interface `LayoutAlgorithm.Zest1`
Parameters:
  `entity` -

### addRelationship

@Deprecated public void addRelationship(LayoutRelationship relationship)
Deprecated.
Queues up the given relationshp (if it isn't in the list) to be added to the algorithm.

Specified by:
  `addRelationship` in interface `LayoutAlgorithm.Zest1`
Parameters:
  `relationship` -

### removeEntity

@Deprecated public void removeEntity(LayoutEntity entity)
Deprecated.
Queues up the given entity to be removed from the algorithm next time it runs.

Specified by:
  `removeEntity` in interface `LayoutAlgorithm.Zest1`
Parameters:
  `entity` - The entity to remove

### removeRelationship

@Deprecated public void removeRelationship(LayoutRelationship relationship)
Deprecated.
Queues up the given relationship to be removed from the algorithm next time it runs.

Specified by:
  `removeRelationship` in interface `LayoutAlgorithm.Zest1`
Parameters:
  `relationship` - The relationship to remove.

### removeRelationships

@Deprecated public void removeRelationships(List<? extends LayoutRelationship> relationships)
Deprecated.
Queues up all the relationships in the list to be removed.

Specified by:
  `removeRelationships` in interface `LayoutAlgorithm.Zest1`
Parameters:
  `relationships` -

### setStyle

@Deprecated public void setStyle(int style)
Deprecated.
Sets the current layout style. This overwrites all other layout styles. Use getStyle to get the current style.

Specified by:
  `setStyle` in interface `LayoutAlgorithm.Zest1`
Parameters:
  `style` -

### getStyle

@Deprecated public int getStyle()
Deprecated.
Gets the current layout style

Specified by:
  `getStyle` in interface `LayoutAlgorithm.Zest1`
Returns:
  the layout styles for this layout

### setLayoutArea

@Deprecated public abstract void setLayoutArea(double x, double y, double width, double height)
Deprecated.

### isValidConfiguration

@Deprecated protected abstract boolean isValidConfiguration(boolean asynchronous, boolean continuous)
Deprecated.
Determines if the configuration is valid for this layout

Parameters:
  `asynchronous` -
  `continuous` -

### applyLayoutInternal

@Deprecated protected abstract void applyLayoutInternal(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider, double boundsX, double boundsY, double boundsWidth, double boundsHeight)
Deprecated.
Apply the layout to the given entities. The entities will be moved and resized based on the algorithm.

Parameters:
  `entitiesToLayout` - Apply the algorithm to these entities
  `relationshipsToConsider` - Only consider these relationships when applying the algorithm.
  `boundsX` - The left side of the bounds in which the layout can place the entities.
  `boundsY` - The top side of the bounds in which the layout can place the entities.
  `boundsWidth` - The width of the bounds in which the layout can place the entities.
  `boundsHeight` - The height of the bounds in which the layout can place the entities.

### updateEntities

@Deprecated protected InternalNode[] updateEntities(InternalNode[] entities)
Deprecated.
Updates the given array of entities checking if any need to be removed or added.

Parameters:
  `entities` - the current entities
Returns:
  the updated entities array

### updateRelationships

@Deprecated protected InternalRelationship[] updateRelationships(InternalRelationship[] relationships)
Deprecated.
Updates the given array of relationships checking if any need to be removed or added. Also updates the original array of relationships.

Parameters:
  `relationships` - the current relationships
Returns:
  the update relationships array

### isRunning

@Deprecated public boolean isRunning()
Deprecated.
Returns true if the layout algorithm is running

Specified by:
  `isRunning` in interface `LayoutAlgorithm.Zest1`
Returns:
  boolean if the layout algorithm is running

### stop

@Deprecated public void stop()
Deprecated.
Stops the current layout from running. All layout algorithms should constantly check isLayoutRunning

Specified by:
  `stop` in interface `LayoutAlgorithm.Zest1`
Specified by:
  `stop` in interface `Stoppable`

### preLayoutAlgorithm

@Deprecated protected abstract void preLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider, double x, double y, double width, double height)
Deprecated.
Code called before the layout algorithm starts

### postLayoutAlgorithm

@Deprecated protected abstract void postLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider)
Deprecated.
Code called after the layout algorithm ends

### getTotalNumberOfLayoutSteps

@Deprecated protected abstract int getTotalNumberOfLayoutSteps()
Deprecated.
Gets the total number of steps in this layout

### getCurrentLayoutStep

@Deprecated protected abstract int getCurrentLayoutStep()
Deprecated.
Gets the current layout step

### applyLayout

@Deprecated public void applyLayout(LayoutEntity[] entitiesToLayout, LayoutRelationship[] relationshipsToConsider, double x, double y, double width, double height, boolean asynchronous, boolean continuous) throws InvalidLayoutConfiguration
Deprecated.
This actually applies the layout

Specified by:
  `applyLayout` in interface `LayoutAlgorithm.Zest1`
Parameters:
  `entitiesToLayout` - Apply the algorithm to these entities
  `relationshipsToConsider` - Only consider these relationships when applying the algorithm.
  `x` - The left side of the bounds in which the layout can place the entities.
  `y` - The top side of the bounds in which the layout can place the entities.
  `width` - The width of the bounds in which the layout can place the entities.
  `height` - The height of the bounds in which the layout can place the entities.
  `asynchronous` - Should the algorithm run Asynchronously
Throws:
  `InvalidLayoutConfiguration`

### updateBendPoints

@Deprecated protected void updateBendPoints(InternalRelationship[] relationshipsToConsider)
Deprecated.
Update external bend points from the internal bendpoints list. Save the source and destination points for later use in scaling and translating

Parameters:
  `relationshipsToConsider` -

### setFilter

@Deprecated public void setFilter(Filter filter)
Deprecated.
Filters the entities and relationships to apply the layout on

Specified by:
  `setFilter` in interface `LayoutAlgorithm.Zest1`

### setComparator

@Deprecated public void setComparator(Comparator comparator)
Deprecated.
Determines the order in which the objects should be displayed. Note: Some algorithms force a specific order.

Specified by:
  `setComparator` in interface `LayoutAlgorithm.Zest1`

### verifyInput

@Deprecated public static boolean verifyInput(LayoutEntity[] entitiesToLayout, LayoutRelationship[] relationshipsToConsider)
Deprecated.
Verifies the endpoints of the relationships are entities in the entitiesToLayout list. Allows other classes in this package to use this method to verify the input

### getLocalLocation

@Deprecated protected DisplayIndependentPoint getLocalLocation(InternalNode[] entitiesToLayout, double x, double y, DisplayIndependentRectangle realBounds)
Deprecated.
Gets the location in the layout bounds for this node

Parameters:
  `x` -
  `y` -

### defaultFitWithinBounds

@Deprecated protected void defaultFitWithinBounds(InternalNode[] entitiesToLayout, DisplayIndependentRectangle realBounds)
Deprecated.
Find an appropriate size for the given nodes, then fit them into the given bounds. The relative locations of the nodes to each other must be preserved. Child classes should set flag reresizeEntitiesAfterLayout to false if they want to preserve node sizes.

### defaultFitWithinBounds

@Deprecated protected void defaultFitWithinBounds(InternalNode[] entitiesToLayout, InternalRelationship[] relationships, DisplayIndependentRectangle realBounds)
Deprecated.
Find an appropriate size for the given nodes, then fit them into the given bounds. The relative locations of the nodes to each other must be preserved. Child classes should set flag reresizeEntitiesAfterLayout to false if they want to preserve node sizes.

### getLayoutBounds

@Deprecated protected DisplayIndependentRectangle getLayoutBounds(InternalNode[] entitiesToLayout, boolean includeNodeSize)
Deprecated.
Find the bounds in which the nodes are located. Using the bounds against the real bounds of the screen, the nodes can proportionally be placed within the real bounds. The bounds can be determined either including the size of the nodes or not. If the size is not included, the bounds will only be guaranteed to include the center of each node.

### setEntityAspectRatio

@Deprecated public void setEntityAspectRatio(double ratio)
Deprecated.
Set the width to height ratio you want the entities to use

Specified by:
  `setEntityAspectRatio` in interface `LayoutAlgorithm.Zest1`

### getEntityAspectRatio

@Deprecated public double getEntityAspectRatio()
Deprecated.
Returns the width to height ratio this layout will use to set the size of the entities.

Specified by:
  `getEntityAspectRatio` in interface `LayoutAlgorithm.Zest1`

### addProgressListener

@Deprecated public void addProgressListener(ProgressListener listener)
Deprecated.
A layout algorithm could take an uncomfortable amout of time to complete. To relieve some of the mystery, the layout algorithm will notify each ProgressListener of its progress.

Specified by:
  `addProgressListener` in interface `LayoutAlgorithm.Zest1`
Specified by:
  `addProgressListener` in interface `Stoppable`

### removeProgressListener

@Deprecated public void removeProgressListener(ProgressListener listener)
Deprecated.
Removes the given progress listener, preventing it from receiving any more updates.

Specified by:
  `removeProgressListener` in interface `LayoutAlgorithm.Zest1`

### updateLayoutLocations

@Deprecated protected void updateLayoutLocations(InternalNode[] nodes)
Deprecated.
Updates the layout locations so the external nodes know about the new locations

### fireProgressStarted

@Deprecated protected void fireProgressStarted(int totalNumberOfSteps)
Deprecated.

### fireProgressEnded

@Deprecated protected void fireProgressEnded(int totalNumberOfSteps)
Deprecated.

### fireProgressUpdated

@Deprecated protected void fireProgressUpdated(int currentStep, int totalNumberOfSteps)
Deprecated.

Since:
  1.5

### fireProgressEvent

@Deprecated protected void fireProgressEvent(int currentStep, int totalNumberOfSteps)
Deprecated.
Fires an event to notify all of the registered ProgressListeners that another step has been completed in the algorithm.

Parameters:
  `currentStep` - The current step completed.
  `totalNumberOfSteps` - The total number of steps in the algorithm.

### getNumberOfProgressListeners

@Deprecated protected int getNumberOfProgressListeners()
Deprecated.

### setLayoutContext

@Deprecated public void setLayoutContext(LayoutContext context)
Deprecated.
Description copied from interface: `LayoutAlgorithm`
Sets the layout context for this algorithm. The receiver will unregister from its previous layout context and register to the new one (registration means for example adding listeners). After a call to this method, the receiving algorithm can compute and cache internal data related to given context and perform an initial layout.

Specified by:
  `setLayoutContext` in interface `LayoutAlgorithm`
Parameters:
  `context` - a new layout context or null if this algorithm should not perform any layout
Since:
  2.0

### applyLayout

@Deprecated public void applyLayout(boolean clean)
Deprecated.
Description copied from interface: `LayoutAlgorithm`
Makes this algorithm perform layout computation and apply it to its context.

Specified by:
  `applyLayout` in interface `LayoutAlgorithm`
Parameters:
  `clean` - if true the receiver should assume that the layout context has changed significantly and recompute the whole layout even if it keeps track of changes with listeners. False can be used after dynamic layout in a context is turned back on so that layout algorithm working in background can apply accumulated changes. Static layout algorithm can ignore this call entirely if clean is false.
Since:
  2.0