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
Method Summary |
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 |
ContinuousLayoutAlgorithm
public ContinuousLayoutAlgorithm(int styles)
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 entitiesrelationshipsToConsider
- Only consider these relationships when applying the algorithm.
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.