Class SpringLayoutAlgorithm.Zest1
java.lang.Object
org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm.Zest1
org.eclipse.zest.layouts.algorithms.ContinuousLayoutAlgorithm
org.eclipse.zest.layouts.algorithms.SpringLayoutAlgorithm.Zest1
- All Implemented Interfaces:
- LayoutAlgorithm,- LayoutAlgorithm.Zest1,- Stoppable
- Enclosing class:
- SpringLayoutAlgorithm
@Deprecated(since="2.0",
            forRemoval=true)
public static class SpringLayoutAlgorithm.Zest1
extends ContinuousLayoutAlgorithm
Deprecated, for removal: This API element is subject to removal in a future version.
Collection of Zest 1.x methods. Used for backwards compatibility.
- 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.
- @noinstantiate
- This class is not intended to be instantiated by clients.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.eclipse.zest.layouts.LayoutAlgorithmLayoutAlgorithm.Zest1
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final doubleDeprecated, for removal: This API element is subject to removal in a future version.The default value for the spring layout gravitation-control.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.The default value for ignoring unconnected nodes.static final intDeprecated, for removal: This API element is subject to removal in a future version.The default value for the spring layout number of interations.static final doubleDeprecated, for removal: This API element is subject to removal in a future version.The default value for the spring layout length-control.static final doubleDeprecated, for removal: This API element is subject to removal in a future version.The default value for the spring layout move-control.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.The default value for positioning nodes randomly.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.The default value for separating connected components.static final doubleDeprecated, for removal: This API element is subject to removal in a future version.The default value for the spring layout strain-control.protected static final doubleDeprecated, for removal: This API element is subject to removal in a future version.An arbitrarily small value in mathematics.static final longDeprecated, for removal: This API element is subject to removal in a future version.the default value for the time algorithm runs.protected static final doubleDeprecated, for removal: This API element is subject to removal in a future version.Minimum distance considered between nodesFields inherited from class org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm.Zest1comparator, filter, internalAsynchronous, internalContinuous, layout_styles, layoutStopped, MIN_ENTITY_SIZE, resizeEntitiesAfterLayout
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidcomputeForces(InternalNode[] entitiesToLayout) Deprecated, for removal: This API element is subject to removal in a future version.Computes the force for each node in this SpringLayoutAlgorithm.protected voidcomputeOneIteration(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider, double x, double y, double width, double height) Deprecated, for removal: This API element is subject to removal in a future version.Computes a single iteration of the layout algorithmprotected voidcomputePositions(InternalNode[] entitiesToLayout) Deprecated, for removal: This API element is subject to removal in a future version.Computes the position for each node in this SpringLayoutAlgorithm.protected voidconvertNodePositionsBack(int i, InternalNode entityToConvert, double px, double py, double screenWidth, double screenHeight, DisplayIndependentRectangle layoutBounds) Deprecated, for removal: This API element is subject to removal in a future version.protected voidconvertToUnitCoordinates(InternalNode[] entitiesToLayout) Deprecated, for removal: This API element is subject to removal in a future version.Converts the position for each node in this SpringLayoutAlgorithm to unit coordinates in double precision.protected intDeprecated, for removal: This API element is subject to removal in a future version.Gets the current layout stepintDeprecated, for removal: This API element is subject to removal in a future version.Returns the number of iterations to be used.protected DisplayIndependentRectanglegetLayoutBoundsTemp(InternalNode[] entitiesToLayout, boolean includeNodeSize) Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.Returns whether or not this SpringLayoutAlgorithm will layout the nodes randomly before beginning iterations.doubleDeprecated, for removal: This API element is subject to removal in a future version.Returns the gravitation-control value of this SpringLayoutAlgorithm in double presion.doubleDeprecated, for removal: This API element is subject to removal in a future version.Returns the length-control value of this SpringLayoutAlgorithm in double presion.doubleDeprecated, for removal: This API element is subject to removal in a future version.Returns the move-control value of this SpringLayoutAlgorithm in double presion.doubleDeprecated, for removal: This API element is subject to removal in a future version.Returns the strain-control value of this SpringLayoutAlgorithm in double presion.longDeprecated, for removal: This API element is subject to removal in a future version.Gets the max time this algorithm will run forprotected intDeprecated, for removal: This API element is subject to removal in a future version.Gets the total number of steps in this layoutdoubleDeprecated, for removal: This API element is subject to removal in a future version.protected booleanisValidConfiguration(boolean asynchronous, boolean continueous) Deprecated, for removal: This API element is subject to removal in a future version.Determines if the configuration is valid for this layoutprotected booleanDeprecated, for removal: This API element is subject to removal in a future version.The logic to determine if a layout should continue running or notvoidplaceRandomly(InternalNode[] entitiesToLayout) Deprecated, for removal: This API element is subject to removal in a future version.Puts vertices in random places, all between (0,0) and (1,1).protected voidpostLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider) Deprecated, for removal: This API element is subject to removal in a future version.Code called after the layout algorithm endsprotected voidpreLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider, double x, double y, double width, double height) Deprecated, for removal: This API element is subject to removal in a future version.Code called before the layout algorithm startsvoidDeprecated, for removal: This API element is subject to removal in a future version.Sets the default conditions.voidsetIterations(int iterations) Deprecated, for removal: This API element is subject to removal in a future version.Sets the number of iterations to be used.voidsetLayoutArea(double x, double y, double width, double height) Deprecated, for removal: This API element is subject to removal in a future version.voidsetRandom(boolean random) Deprecated, for removal: This API element is subject to removal in a future version.Sets whether or not this SpringLayoutAlgorithm will layout the nodes randomly before beginning iterations.voidsetSpringGravitation(double gravitation) Deprecated, for removal: This API element is subject to removal in a future version.Sets the spring layout gravitation-control.voidsetSpringLength(double length) Deprecated, for removal: This API element is subject to removal in a future version.Sets the spring layout length-control.voidsetSpringMove(double move) Deprecated, for removal: This API element is subject to removal in a future version.Sets the spring layout move-control.voidsetSpringStrain(double strain) Deprecated, for removal: This API element is subject to removal in a future version.Sets the spring layout strain-control.voidsetSpringTimeout(long timeout) Deprecated, for removal: This API element is subject to removal in a future version.Sets the spring timeoutvoidDeprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class org.eclipse.zest.layouts.algorithms.ContinuousLayoutAlgorithmapplyLayoutInternal, getBounds, setBoundsMethods inherited from class org.eclipse.zest.layouts.algorithms.AbstractLayoutAlgorithm.Zest1addEntity, addProgressListener, addRelationship, applyLayout, applyLayout, defaultFitWithinBounds, defaultFitWithinBounds, fireProgressEnded, fireProgressEvent, fireProgressStarted, fireProgressUpdated, getEntityAspectRatio, getLayoutBounds, getLocalLocation, getNumberOfProgressListeners, getStyle, isRunning, removeEntity, removeProgressListener, removeRelationship, removeRelationships, removeRelationships, setComparator, setEntityAspectRatio, setFilter, setLayoutContext, setStyle, stop, updateBendPoints, updateEntities, updateLayoutLocations, updateRelationships, verifyInput
- 
Field Details- 
DEFAULT_SPRING_ITERATIONSpublic static final int DEFAULT_SPRING_ITERATIONSDeprecated, for removal: This API element is subject to removal in a future version.The default value for the spring layout number of interations.- See Also:
 
- 
MAX_SPRING_TIMEpublic static final long MAX_SPRING_TIMEDeprecated, for removal: This API element is subject to removal in a future version.the default value for the time algorithm runs.- See Also:
 
- 
DEFAULT_SPRING_RANDOMpublic static final boolean DEFAULT_SPRING_RANDOMDeprecated, for removal: This API element is subject to removal in a future version.The default value for positioning nodes randomly.- See Also:
 
- 
DEFAULT_SPRING_IGNORE_UNCONpublic static final boolean DEFAULT_SPRING_IGNORE_UNCONDeprecated, for removal: This API element is subject to removal in a future version.The default value for ignoring unconnected nodes.- See Also:
 
- 
DEFAULT_SPRING_SEPARATE_COMPONENTSpublic static final boolean DEFAULT_SPRING_SEPARATE_COMPONENTSDeprecated, for removal: This API element is subject to removal in a future version.The default value for separating connected components.- See Also:
 
- 
DEFAULT_SPRING_MOVEpublic static final double DEFAULT_SPRING_MOVEDeprecated, for removal: This API element is subject to removal in a future version.The default value for the spring layout move-control.- See Also:
 
- 
DEFAULT_SPRING_STRAINpublic static final double DEFAULT_SPRING_STRAINDeprecated, for removal: This API element is subject to removal in a future version.The default value for the spring layout strain-control.- See Also:
 
- 
DEFAULT_SPRING_LENGTHpublic static final double DEFAULT_SPRING_LENGTHDeprecated, for removal: This API element is subject to removal in a future version.The default value for the spring layout length-control.- See Also:
 
- 
DEFAULT_SPRING_GRAVITATIONpublic static final double DEFAULT_SPRING_GRAVITATIONDeprecated, for removal: This API element is subject to removal in a future version.The default value for the spring layout gravitation-control.- See Also:
 
- 
MIN_DISTANCEprotected static final double MIN_DISTANCEDeprecated, for removal: This API element is subject to removal in a future version.Minimum distance considered between nodes- See Also:
 
- 
EPSILONprotected static final double EPSILONDeprecated, for removal: This API element is subject to removal in a future version.An arbitrarily small value in mathematics.- See Also:
 
 
- 
- 
Constructor Details- 
Zest1public Zest1(int styles) Deprecated, for removal: This API element is subject to removal in a future version.Constructor.
- 
Zest1public Zest1()Deprecated, for removal: This API element is subject to removal in a future version.Creates a sprint layout algoirthm with no style
 
- 
- 
Method Details- 
setLayoutAreapublic void setLayoutArea(double x, double y, double width, double height) Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
- setLayoutAreain class- ContinuousLayoutAlgorithm
 
- 
setSpringMovepublic void setSpringMove(double move) Deprecated, for removal: This API element is subject to removal in a future version.Sets the spring layout move-control.- Parameters:
- move- The move-control value.
 
- 
getSpringMovepublic double getSpringMove()Deprecated, for removal: This API element is subject to removal in a future version.Returns the move-control value of this SpringLayoutAlgorithm in double presion.- Returns:
- The move-control value.
 
- 
setSpringStrainpublic void setSpringStrain(double strain) Deprecated, for removal: This API element is subject to removal in a future version.Sets the spring layout strain-control.- Parameters:
- strain- The strain-control value.
 
- 
getSpringStrainpublic double getSpringStrain()Deprecated, for removal: This API element is subject to removal in a future version.Returns the strain-control value of this SpringLayoutAlgorithm in double presion.- Returns:
- The strain-control value.
 
- 
setSpringLengthpublic void setSpringLength(double length) Deprecated, for removal: This API element is subject to removal in a future version.Sets the spring layout length-control.- Parameters:
- length- The length-control value.
 
- 
getSpringTimeoutpublic long getSpringTimeout()Deprecated, for removal: This API element is subject to removal in a future version.Gets the max time this algorithm will run for
- 
setSpringTimeoutpublic void setSpringTimeout(long timeout) Deprecated, for removal: This API element is subject to removal in a future version.Sets the spring timeout- Parameters:
- timeout-
 
- 
getSpringLengthpublic double getSpringLength()Deprecated, for removal: This API element is subject to removal in a future version.Returns the length-control value of this SpringLayoutAlgorithm in double presion.- Returns:
- The length-control value.
 
- 
setSpringGravitationpublic void setSpringGravitation(double gravitation) Deprecated, for removal: This API element is subject to removal in a future version.Sets the spring layout gravitation-control.- Parameters:
- gravitation- The gravitation-control value.
 
- 
getSpringGravitationpublic double getSpringGravitation()Deprecated, for removal: This API element is subject to removal in a future version.Returns the gravitation-control value of this SpringLayoutAlgorithm in double presion.- Returns:
- The gravitation-control value.
 
- 
setIterationspublic void setIterations(int iterations) Deprecated, for removal: This API element is subject to removal in a future version.Sets the number of iterations to be used.- Parameters:
- iterations- The number of iterations.
 
- 
getIterationspublic int getIterations()Deprecated, for removal: This API element is subject to removal in a future version.Returns the number of iterations to be used.- Returns:
- The number of iterations.
 
- 
setRandompublic void setRandom(boolean random) Deprecated, for removal: This API element is subject to removal in a future version.Sets whether or not this SpringLayoutAlgorithm will layout the nodes randomly before beginning iterations.- Parameters:
- random- The random placement value.
 
- 
getRandompublic boolean getRandom()Deprecated, for removal: This API element is subject to removal in a future version.Returns whether or not this SpringLayoutAlgorithm will layout the nodes randomly before beginning iterations.
- 
setWeightDeprecated, for removal: This API element is subject to removal in a future version.
- 
getWeightDeprecated, for removal: This API element is subject to removal in a future version.
- 
setDefaultConditionspublic void setDefaultConditions()Deprecated, for removal: This API element is subject to removal in a future version.Sets the default conditions.
- 
preLayoutAlgorithmprotected void preLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider, double x, double y, double width, double height) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractLayoutAlgorithm.Zest1Code called before the layout algorithm starts- Specified by:
- preLayoutAlgorithmin class- AbstractLayoutAlgorithm.Zest1
 
- 
postLayoutAlgorithmprotected void postLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractLayoutAlgorithm.Zest1Code called after the layout algorithm ends- Specified by:
- postLayoutAlgorithmin class- AbstractLayoutAlgorithm.Zest1
 
- 
getLayoutBoundsTempprotected DisplayIndependentRectangle getLayoutBoundsTemp(InternalNode[] entitiesToLayout, boolean includeNodeSize) Deprecated, for removal: This API element is subject to removal in a future version.
- 
convertNodePositionsBackprotected void convertNodePositionsBack(int i, InternalNode entityToConvert, double px, double py, double screenWidth, double screenHeight, DisplayIndependentRectangle layoutBounds) Deprecated, for removal: This API element is subject to removal in a future version.
- 
performAnotherNonContinuousIterationprotected boolean performAnotherNonContinuousIteration()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContinuousLayoutAlgorithmThe logic to determine if a layout should continue running or not- Specified by:
- performAnotherNonContinuousIterationin class- ContinuousLayoutAlgorithm
 
- 
getCurrentLayoutStepprotected int getCurrentLayoutStep()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractLayoutAlgorithm.Zest1Gets the current layout step- Specified by:
- getCurrentLayoutStepin class- AbstractLayoutAlgorithm.Zest1
 
- 
getTotalNumberOfLayoutStepsprotected int getTotalNumberOfLayoutSteps()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractLayoutAlgorithm.Zest1Gets the total number of steps in this layout- Specified by:
- getTotalNumberOfLayoutStepsin class- AbstractLayoutAlgorithm.Zest1
 
- 
computeOneIterationprotected void computeOneIteration(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider, double x, double y, double width, double height) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ContinuousLayoutAlgorithmComputes a single iteration of the layout algorithm- Specified by:
- computeOneIterationin class- ContinuousLayoutAlgorithm
 
- 
placeRandomlyDeprecated, for removal: This API element is subject to removal in a future version.Puts vertices in random places, all between (0,0) and (1,1).
- 
computeForcesDeprecated, for removal: This API element is subject to removal in a future version.Computes the force for each node in this SpringLayoutAlgorithm. The computed force will be stored in the data repository
- 
computePositionsDeprecated, for removal: This API element is subject to removal in a future version.Computes the position for each node in this SpringLayoutAlgorithm. The computed position will be stored in the data repository. position = position + sprMove * force
- 
convertToUnitCoordinatesDeprecated, for removal: This API element is subject to removal in a future version.Converts the position for each node in this SpringLayoutAlgorithm to unit coordinates in double precision. The computed positions will be still stored in the data repository.
- 
isValidConfigurationprotected boolean isValidConfiguration(boolean asynchronous, boolean continueous) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:AbstractLayoutAlgorithm.Zest1Determines if the configuration is valid for this layout- Specified by:
- isValidConfigurationin class- AbstractLayoutAlgorithm.Zest1
- Parameters:
- asynchronous-
- continueous-
 
 
- 
SpringLayoutAlgorithminstead. This class will be removed in a future release.