Class Physics.Builder

  • Enclosing class:
    Physics

    public static class Physics.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • withEnabled

        public Physics.Builder withEnabled​(java.lang.Boolean enabled)
        Enables physics system. Default value is true.
      • withBarnesHut

        public Physics.Builder withBarnesHut​(BarnesHut barnesHut)
        It's a quadtree based gravity model. It's default and recommended model for non-hierarchical layout.
      • withForceAtlas2Based

        public Physics.Builder withForceAtlas2Based​(ForceAtlas2Based forceAtlas2Based)
        Represents physics model similar to BarnesHut. The main difference is that repulsion is linear instead of quadratic. Moreover, weight of node is multiplied by number of edges plus one.
      • withRepulsion

        public Physics.Builder withRepulsion​(Repulsion repulsion)
        Repulsion model used in Physics. It assumes that node has repulsion value and the value is decreased from 1 to 0.
      • withHierarchicalRepulsion

        public Physics.Builder withHierarchicalRepulsion​(HierarchicalRepulsion hierarchicalRepulsion)
        Hierarchical Repulsion model used in Physics. In this model levels are taken into account and forces are normalized.
      • withMaxVelocity

        public Physics.Builder withMaxVelocity​(java.lang.Double maxVelocity)
        Maximum velocity of nodes set in order to increasing time to stabilization. Default value is 50.
      • withMinVelocity

        public Physics.Builder withMinVelocity​(java.lang.Double minVelocity)
        Minimum velocity of nodes. The simulation stops and network is stabilized when minimum value is reached. Default value is 0.1
      • withSolver

        public Physics.Builder withSolver​(java.lang.String solver)
        Indicates which solver should be used. Possible values are: 'barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'. Default value is barnesHut.
      • withStabilization

        public Physics.Builder withStabilization​(Stabilization stabilization)
        Indicates whether network should be stabilized on load using default settings
      • withTimestep

        public Physics.Builder withTimestep​(java.lang.Double timestep)
        Because a simulation is discrete, each iteration is done in particular interval. Default value is 0.5
      • withAdaptiveTimestep

        public Physics.Builder withAdaptiveTimestep​(java.lang.Boolean adaptiveTimestep)
        If set to true then timestep will be adapted intelligently. Default value is true.