info.aduna.linkmap.layout
Class AdaptiveSpringLayoutManager

java.lang.Object
  extended by info.aduna.linkmap.layout.GraphLayoutManager
      extended by info.aduna.linkmap.layout.IteratingLayoutManager
          extended by info.aduna.linkmap.layout.SpringLayoutManager
              extended by info.aduna.linkmap.layout.AdaptiveSpringLayoutManager
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
LinkSubgraphLayoutManager

public class AdaptiveSpringLayoutManager
extends SpringLayoutManager

AdaptiveSpringLayoutManager extends the layout algorithm of the SpringLayoutManager by using a separate adaptation parameter for every vertex. This adaptation parameter initially has the value of the global adaptation parameter, and is adapted in consecutive iterations according to the behaviour of the node.


Nested Class Summary
static class AdaptiveSpringLayoutManager.AdaptiveVertexAttribute
           
 
Nested classes/interfaces inherited from class info.aduna.linkmap.layout.SpringLayoutManager
SpringLayoutManager.EdgeAttribute, SpringLayoutManager.VertexAttribute
 
Field Summary
static double DEFAULT_ADAPTATION
          The default adaptation used for all the AdaptiveSpringVertexAttribute.
static double DEFAULT_DECREASE_FACTOR
          The default value of the decrease factor property.
static double DEFAULT_DECREASE_THRESHOLD
          The default value of the decrease threshold property.
static double DEFAULT_INCREASE_FACTOR
          The default value of the increase factor property.
static double DEFAULT_INCREASE_THRESHOLD
          The default value of the increase threshold property.
 
Fields inherited from class info.aduna.linkmap.layout.SpringLayoutManager
DEFAULT_ATTRACTION, DEFAULT_AVERAGE_MOVEMENT_THRESHOLD, DEFAULT_CHARGE, DEFAULT_MASS, DEFAULT_MAXIMUM_ALLOWED_MOVEMENT, DEFAULT_MAXIMUM_OBSERVED_MOVEMENT_THRESHOLD, DEFAULT_MOMENTUM, DEFAULT_REPULSION, DEFAULT_SPRING_CONSTANT, DEFAULT_SPRING_LENGTH, DEFAULT_TRANSLATION_INTERVAL
 
Fields inherited from class info.aduna.linkmap.layout.IteratingLayoutManager
UNDEFINED_MAX_ITERATION
 
Constructor Summary
AdaptiveSpringLayoutManager()
           
 
Method Summary
 SpringLayoutManager.VertexAttribute createVertexAttribute(Vertex vertex)
          Overrides SpringLayoutManager and returns an AdaptiveVertexAttribute.
 double getDecreaseFactor()
           
 double getDecreaseThreshold()
           
 double getIncreaseFactor()
           
 double getIncreaseThreshold()
           
 void initLayoutParameters()
          Overrides and extends SpringLayoutManager.
 void move(SpringLayoutManager.VertexAttribute attribute)
          Overrides SpringLayoutManager and first calculates the local adaptation of the specified VertexAttribute (which must be an AdaptiveVertexAttribute) before it is moved.
 void reset(SpringLayoutManager.VertexAttribute attribute)
          Overrides SpringLayoutManager and additionally copies the global adaptation in the specified VertexAttribute, which must therefore be an AdaptiveVertexAttribute.
 void setDecreaseFactor(double factor)
           
 void setDecreaseThreshold(double threshold)
           
 void setIncreaseFactor(double factor)
           
 void setIncreaseThreshold(double threshold)
           
 
Methods inherited from class info.aduna.linkmap.layout.SpringLayoutManager
createEdgeAttribute, createLayoutConverter, doLayout, doLayout, doLayout, getAdaptation, getAttraction, getAverageMovementThreshold, getCharge, getEdgeAttributes, getMass, getMaximumAllowedMovement, getMaximumObservedMovement, getMaximumObservedMovementThreshold, getMomentum, getRepulsion, getSpringConstant, getSpringLength, getSummedMovement, getTranslationInterval, getVertexAttributes, initialize, initThresholds, isAverageMovementThresholdEnabled, isMaximumObservedMovementThresholdEnabled, randomizeCoordinates, reset, resetAttributes, resetAttributes, setAdaptation, setAttraction, setAverageMovementThreshold, setCharge, setEdgeAttribute, setMass, setMaximumAllowedMovement, setMaximumObservedMovement, setMaximumObservedMovementThreshold, setMomentum, setRepulsion, setSpringConstant, setSpringLength, setSummedMovement, setTranslationInterval, setVertexAttribute
 
Methods inherited from class info.aduna.linkmap.layout.IteratingLayoutManager
continueLayout, getIteration, getMaxIteration, handlePauseLayout, increaseIteration, isMaxIterationReached, pauseLayout, pauseLayoutRequested, setIteration, setMaxIteration, setPauseLayout, setStopLayout, stopLayout, stopLayoutRequested
 
Methods inherited from class info.aduna.linkmap.layout.GraphLayoutManager
getGraph, run, setGraph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ADAPTATION

public static final double DEFAULT_ADAPTATION
The default adaptation used for all the AdaptiveSpringVertexAttribute. This overrides SpringLayoutManager's default adaptation.

See Also:
Constant Field Values

DEFAULT_INCREASE_THRESHOLD

public static final double DEFAULT_INCREASE_THRESHOLD
The default value of the increase threshold property.

See Also:
Constant Field Values

DEFAULT_DECREASE_THRESHOLD

public static final double DEFAULT_DECREASE_THRESHOLD
The default value of the decrease threshold property.

See Also:
Constant Field Values

DEFAULT_INCREASE_FACTOR

public static final double DEFAULT_INCREASE_FACTOR
The default value of the increase factor property.

See Also:
Constant Field Values

DEFAULT_DECREASE_FACTOR

public static final double DEFAULT_DECREASE_FACTOR
The default value of the decrease factor property.

See Also:
Constant Field Values
Constructor Detail

AdaptiveSpringLayoutManager

public AdaptiveSpringLayoutManager()
Method Detail

setIncreaseThreshold

public void setIncreaseThreshold(double threshold)

getIncreaseThreshold

public double getIncreaseThreshold()

setDecreaseThreshold

public void setDecreaseThreshold(double threshold)

getDecreaseThreshold

public double getDecreaseThreshold()

setIncreaseFactor

public void setIncreaseFactor(double factor)

getIncreaseFactor

public double getIncreaseFactor()

setDecreaseFactor

public void setDecreaseFactor(double factor)

getDecreaseFactor

public double getDecreaseFactor()

initLayoutParameters

public void initLayoutParameters()
Overrides and extends SpringLayoutManager.

Overrides:
initLayoutParameters in class SpringLayoutManager

createVertexAttribute

public SpringLayoutManager.VertexAttribute createVertexAttribute(Vertex vertex)
Overrides SpringLayoutManager and returns an AdaptiveVertexAttribute.

Overrides:
createVertexAttribute in class SpringLayoutManager

reset

public void reset(SpringLayoutManager.VertexAttribute attribute)
Overrides SpringLayoutManager and additionally copies the global adaptation in the specified VertexAttribute, which must therefore be an AdaptiveVertexAttribute.

Overrides:
reset in class SpringLayoutManager

move

public void move(SpringLayoutManager.VertexAttribute attribute)
Overrides SpringLayoutManager and first calculates the local adaptation of the specified VertexAttribute (which must be an AdaptiveVertexAttribute) before it is moved.

Overrides:
move in class SpringLayoutManager


Copyright © 1997-2008 Aduna. All Rights Reserved.