java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp2d.layout.Layout
de.grogra.imp2d.layout.ForceBasedLayout2
- All Implemented Interfaces:
Manageable,Shareable
A second
ForceBasedLayout computes a graph layout based on a
force model. The concrete force model has to be implemented in subclasses.
(e. g. FruchtermanReingold, Eades, DavidsonHarel)- Author:
- Birka Fonkeng
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class de.grogra.imp2d.layout.Layout
Layout.Algorithm, Layout.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected floatprotected floatprotected floatintintFields inherited from class de.grogra.imp2d.layout.Layout
$TYPE, fit$FIELD, transformationSteps$FIELD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Layout.AlgorithmCreates an algorithm for this layout.protected abstract doublegetting the fDeltaFactorprotected abstract Point2drepellingForce(Node firstNode, Node secondNode) Calculating the repelling force of two nodesprotected abstract voidsetRandomPosition(Node nodeTemp, Random rnd) Calculating the inital positions of the nodesprotected abstract Point2dspringForce(Node firstNode, Node secondNode) Calculating the spring force of two nodesMethods inherited from class de.grogra.imp2d.layout.Layout
getParam, invoke, setParam, setRedraw, setTransformationStepsMethods inherited from class de.grogra.persistence.ShareableBase
addReference, appendReferencesTo, fieldModified, getProvider, getStamp, initProvider, manageableReadResolve, manageableWriteReplace, removeReferenceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.grogra.persistence.Manageable
getManageableType
-
Field Details
-
fMaxIterations
public int fMaxIterations -
fMaxIterationsTemp
public int fMaxIterationsTemp -
fDistanceMultiplierMin
protected float fDistanceMultiplierMin -
fDistanceMultiplierMax
protected float fDistanceMultiplierMax -
fDistanceMultiplier
protected float fDistanceMultiplier
-
-
Constructor Details
-
ForceBasedLayout2
public ForceBasedLayout2()
-
-
Method Details
-
createAlgorithm
Description copied from class:LayoutCreates an algorithm for this layout.- Specified by:
createAlgorithmin classLayout- Returns:
- a new
Algorithminstance
-
repellingForce
Calculating the repelling force of two nodes -
springForce
Calculating the spring force of two nodes -
getFDeltaFactor
protected abstract double getFDeltaFactor()getting the fDeltaFactor -
setRandomPosition
Calculating the inital positions of the nodes
-