logic
Class Visualization

java.lang.Object
  extended by java.lang.Thread
      extended by logic.Visualization
All Implemented Interfaces:
java.lang.Runnable

public class Visualization
extends java.lang.Thread

class, that performs the animation by setting the euclidian coordinates of the nodes of the radial layout and defines ring styles

Author:
Fennes

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Visualization()
           
 
Method Summary
static long getAnimationTiming()
          time of animation in nanoseconds
static Node getFocusNode()
          returns the focus node
static GraphProcessing getGraphProcessing()
          returns the GraphProcessing of the Visualization
static Node getNodeAt(Vector2 pos)
          returns the node at a given euclidian position if one is there and run() is not running, otherwise returns null
static double getRadiusOfRing(int Ring)
          gets the radius of a particular ring taking ringScaling and ringDisort into account
static float getRingDisort()
          the rings are disorted according to their number and ringDisort (outer rings have less distance)
static float getRingScaling()
          ring scaling
 void run()
          performs the animation
static void setAnimationTiming(long animationTiming)
          time of animation in nanoseconds
static void setFocusNode(Node focusNode)
          sets the focus node of the radial layout
static void setNodesInstantlyToNewPos()
          sets the position of the node instantly to the new one
static void setRingDisort(float ringDisort)
          the rings are disorted according to their number and ringDisort (outer rings have less distance)
static void setRingScaling(float ringScaling)
          ring scaling
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Visualization

public Visualization()
Method Detail

run

public void run()
performs the animation

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getAnimationTiming

public static long getAnimationTiming()
time of animation in nanoseconds

Returns:
time of animation in nanoseconds

setAnimationTiming

public static void setAnimationTiming(long animationTiming)
time of animation in nanoseconds

Parameters:
animationTiming - time of animation in nanoseconds

getRingScaling

public static float getRingScaling()
ring scaling

Returns:
ring scaling

setRingScaling

public static void setRingScaling(float ringScaling)
ring scaling

Parameters:
ringScaling - ring scaling

getRingDisort

public static float getRingDisort()
the rings are disorted according to their number and ringDisort (outer rings have less distance)

Returns:
ringDisort

setRingDisort

public static void setRingDisort(float ringDisort)
the rings are disorted according to their number and ringDisort (outer rings have less distance)

Parameters:
ringDisort - the rings are disorted according to their number and ringDisort

getRadiusOfRing

public static double getRadiusOfRing(int Ring)
gets the radius of a particular ring taking ringScaling and ringDisort into account

Parameters:
Ring - to get radius of
Returns:
radius

getFocusNode

public static Node getFocusNode()
returns the focus node

Returns:
focus node

setFocusNode

public static void setFocusNode(Node focusNode)
sets the focus node of the radial layout

Parameters:
focusNode -

getNodeAt

public static Node getNodeAt(Vector2 pos)
returns the node at a given euclidian position if one is there and run() is not running, otherwise returns null

Parameters:
pos - position to search
Returns:
node at the position, otherwise null

getGraphProcessing

public static GraphProcessing getGraphProcessing()
returns the GraphProcessing of the Visualization

Returns:
graphProcessing

setNodesInstantlyToNewPos

public static void setNodesInstantlyToNewPos()
sets the position of the node instantly to the new one