Class 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.
Use SpringLayoutAlgorithm instead. This class will be removed in a future release.
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 Summary

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

    LayoutAlgorithm.Zest1
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
    Deprecated, for removal: This API element is subject to removal in a future version.
    The default value for the spring layout gravitation-control.
    static final boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    The default value for ignoring unconnected nodes.
    static final int
    Deprecated, 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 double
    Deprecated, for removal: This API element is subject to removal in a future version.
    The default value for the spring layout length-control.
    static final double
    Deprecated, for removal: This API element is subject to removal in a future version.
    The default value for the spring layout move-control.
    static final boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    The default value for positioning nodes randomly.
    static final boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    The default value for separating connected components.
    static final double
    Deprecated, 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 double
    Deprecated, for removal: This API element is subject to removal in a future version.
    An arbitrarily small value in mathematics.
    static final long
    Deprecated, for removal: This API element is subject to removal in a future version.
    the default value for the time algorithm runs.
    protected static final double
    Deprecated, for removal: This API element is subject to removal in a future version.
    Minimum distance considered between nodes
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates a sprint layout algoirthm with no style
    Zest1(int styles)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    computeForces(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 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.
    Computes a single iteration of the layout algorithm
    protected void
    computePositions(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 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.
     
    protected void
    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 int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the current layout step
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the number of iterations to be used.
    getLayoutBoundsTemp(InternalNode[] entitiesToLayout, boolean includeNodeSize)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    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.
    double
    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.
    double
    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.
    double
    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.
    double
    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.
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the max time this algorithm will run for
    protected int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the total number of steps in this layout
    double
    getWeight(String relType)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected boolean
    isValidConfiguration(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 layout
    protected boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    The logic to determine if a layout should continue running or not
    void
    placeRandomly(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 void
    postLayoutAlgorithm(InternalNode[] entitiesToLayout, InternalRelationship[] relationshipsToConsider)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Code called after the layout algorithm ends
    protected 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.
    Code called before the layout algorithm starts
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the default conditions.
    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.
    void
    setLayoutArea(double x, double y, double width, double height)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    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.
    void
    setSpringGravitation(double gravitation)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the spring layout gravitation-control.
    void
    setSpringLength(double length)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the spring layout length-control.
    void
    setSpringMove(double move)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the spring layout move-control.
    void
    setSpringStrain(double strain)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the spring layout strain-control.
    void
    setSpringTimeout(long timeout)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Sets the spring timeout
    void
    setWeight(String relType, double weight)
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class org.eclipse.zest.layouts.algorithms.ContinuousLayoutAlgorithm

    applyLayoutInternal, getBounds, setBounds

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_SPRING_ITERATIONS

      public static final int DEFAULT_SPRING_ITERATIONS
      Deprecated, 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_TIME

      public static final long MAX_SPRING_TIME
      Deprecated, 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_RANDOM

      public static final boolean DEFAULT_SPRING_RANDOM
      Deprecated, 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_UNCON

      public static final boolean DEFAULT_SPRING_IGNORE_UNCON
      Deprecated, 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_COMPONENTS

      public static final boolean DEFAULT_SPRING_SEPARATE_COMPONENTS
      Deprecated, for removal: This API element is subject to removal in a future version.
      The default value for separating connected components.
      See Also:
    • DEFAULT_SPRING_MOVE

      public static final double DEFAULT_SPRING_MOVE
      Deprecated, 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_STRAIN

      public static final double DEFAULT_SPRING_STRAIN
      Deprecated, 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_LENGTH

      public static final double DEFAULT_SPRING_LENGTH
      Deprecated, 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_GRAVITATION

      public static final double DEFAULT_SPRING_GRAVITATION
      Deprecated, 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_DISTANCE

      protected static final double MIN_DISTANCE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Minimum distance considered between nodes
      See Also:
    • EPSILON

      protected static final double EPSILON
      Deprecated, for removal: This API element is subject to removal in a future version.
      An arbitrarily small value in mathematics.
      See Also:
  • Constructor Details

    • Zest1

      public Zest1(int styles)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructor.
    • Zest1

      public 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

    • setLayoutArea

      public 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:
      setLayoutArea in class ContinuousLayoutAlgorithm
    • setSpringMove

      public 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.
    • getSpringMove

      public 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.
    • setSpringStrain

      public 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.
    • getSpringStrain

      public 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.
    • setSpringLength

      public 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.
    • getSpringTimeout

      public 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
    • setSpringTimeout

      public void setSpringTimeout(long timeout)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the spring timeout
      Parameters:
      timeout -
    • getSpringLength

      public 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.
    • setSpringGravitation

      public 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.
    • getSpringGravitation

      public 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.
    • setIterations

      public 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.
    • getIterations

      public 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.
    • setRandom

      public 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.
    • getRandom

      public 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.
    • setWeight

      public void setWeight(String relType, double weight)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getWeight

      public double getWeight(String relType)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setDefaultConditions

      public void setDefaultConditions()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the default conditions.
    • preLayoutAlgorithm

      protected 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.Zest1
      Code called before the layout algorithm starts
      Specified by:
      preLayoutAlgorithm in class AbstractLayoutAlgorithm.Zest1
    • postLayoutAlgorithm

      protected 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.Zest1
      Code called after the layout algorithm ends
      Specified by:
      postLayoutAlgorithm in class AbstractLayoutAlgorithm.Zest1
    • getLayoutBoundsTemp

      protected DisplayIndependentRectangle getLayoutBoundsTemp(InternalNode[] entitiesToLayout, boolean includeNodeSize)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • convertNodePositionsBack

      protected 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.
    • performAnotherNonContinuousIteration

      protected boolean performAnotherNonContinuousIteration()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: ContinuousLayoutAlgorithm
      The logic to determine if a layout should continue running or not
      Specified by:
      performAnotherNonContinuousIteration in class ContinuousLayoutAlgorithm
    • getCurrentLayoutStep

      protected int getCurrentLayoutStep()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: AbstractLayoutAlgorithm.Zest1
      Gets the current layout step
      Specified by:
      getCurrentLayoutStep in class AbstractLayoutAlgorithm.Zest1
    • getTotalNumberOfLayoutSteps

      protected int getTotalNumberOfLayoutSteps()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: AbstractLayoutAlgorithm.Zest1
      Gets the total number of steps in this layout
      Specified by:
      getTotalNumberOfLayoutSteps in class AbstractLayoutAlgorithm.Zest1
    • computeOneIteration

      protected 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: ContinuousLayoutAlgorithm
      Computes a single iteration of the layout algorithm
      Specified by:
      computeOneIteration in class ContinuousLayoutAlgorithm
    • placeRandomly

      public void placeRandomly(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).
    • computeForces

      protected void computeForces(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. The computed force will be stored in the data repository
    • computePositions

      protected void computePositions(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. The computed position will be stored in the data repository. position = position + sprMove * force
    • convertToUnitCoordinates

      protected void convertToUnitCoordinates(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. The computed positions will be still stored in the data repository.
    • isValidConfiguration

      protected 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.Zest1
      Determines if the configuration is valid for this layout
      Specified by:
      isValidConfiguration in class AbstractLayoutAlgorithm.Zest1
      Parameters:
      asynchronous -
      continueous -