prefuse.action.layout.graph
Class EdgePositioningLayout

java.lang.Object
  extended by prefuse.activity.Activity
      extended by prefuse.action.Action
          extended by prefuse.action.GroupAction
              extended by prefuse.action.layout.Layout
                  extended by prefuse.action.layout.graph.EdgePositioningLayout

public class EdgePositioningLayout
extends Layout

Positions edges at the centroid of their nodes - should be run after a node layout algorithm has positioned the nodes. Some renderers require prefuse.visual.EdgeItem.getX() and prefuse.visual.EdgeItem.getY() to be set up correctly, and most layouts don't position the edges.

Author:
Anton Marsden
See Also:
LabelRenderer

Field Summary
protected  java.lang.String m_edgeGroup
           
protected  Alignment m_xAlign1
           
protected  Alignment m_xAlign2
           
protected  Alignment m_yAlign1
           
protected  Alignment m_yAlign2
           
 
Fields inherited from class prefuse.action.layout.Layout
m_anchor, m_bounds, m_bpts, m_insets, m_margin, m_tmpa, m_tmpb
 
Fields inherited from class prefuse.action.GroupAction
m_group
 
Fields inherited from class prefuse.action.Action
m_vis
 
Fields inherited from class prefuse.activity.Activity
DEFAULT_STEP_TIME, INFINITY
 
Constructor Summary
EdgePositioningLayout(java.lang.String graph)
           
 
Method Summary
 Alignment getHorizontalAlignment1()
          Get the horizontal aligment of the edge mount point with the first node.
 Alignment getHorizontalAlignment2()
          Get the horizontal alignment of the edge mount point with the second node.
 Alignment getVerticalAlignment1()
          Get the vertical alignment of the edge mount point with the first node.
 Alignment getVerticalAlignment2()
          Get the vertical aligment of the edge mount point with the second node.
 void run(double frac)
          Runs this Action, triggering whatever processing this Action performs.
 void setHorizontalAlignment1(Alignment align)
          Set the horizontal alignment of the edge mount point with the first node.
 void setHorizontalAlignment2(Alignment align)
          Set the horizontal alignment of the edge mount point with the second node.
 void setVerticalAlignment1(Alignment align)
          Set the vertical alignment of the edge mount point with the first node.
 void setVerticalAlignment2(Alignment align)
          Set the vertical alignment of the edge mount point with the second node.
 
Methods inherited from class prefuse.action.layout.Layout
getLayoutAnchor, getLayoutBounds, setLayoutAnchor, setLayoutBounds, setMargin, setX, setY
 
Methods inherited from class prefuse.action.GroupAction
getGroup, setGroup
 
Methods inherited from class prefuse.action.Action
getVisualization, run, setVisualization
 
Methods inherited from class prefuse.activity.Activity
addActivityListener, alwaysRunAfter, cancel, fireActivityCancelled, fireActivityFinished, fireActivityScheduled, fireActivityStarted, fireActivityStepped, getDuration, getNextTime, getPace, getPacingFunction, getStartTime, getStepTime, getStopTime, isEnabled, isRunning, isScheduled, removeActivityListener, run, runAfter, runAt, setDuration, setEnabled, setPacingFunction, setStartTime, setStepTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_edgeGroup

protected java.lang.String m_edgeGroup

m_xAlign1

protected Alignment m_xAlign1

m_yAlign1

protected Alignment m_yAlign1

m_xAlign2

protected Alignment m_xAlign2

m_yAlign2

protected Alignment m_yAlign2
Constructor Detail

EdgePositioningLayout

public EdgePositioningLayout(java.lang.String graph)
Method Detail

getHorizontalAlignment1

public Alignment getHorizontalAlignment1()
Get the horizontal aligment of the edge mount point with the first node.

Returns:
the horizontal alignment

getVerticalAlignment1

public Alignment getVerticalAlignment1()
Get the vertical alignment of the edge mount point with the first node.

Returns:
the vertical alignment

getHorizontalAlignment2

public Alignment getHorizontalAlignment2()
Get the horizontal alignment of the edge mount point with the second node.

Returns:
the horizontal alignment

getVerticalAlignment2

public Alignment getVerticalAlignment2()
Get the vertical aligment of the edge mount point with the second node.

Returns:
the vertical alignment

setHorizontalAlignment1

public void setHorizontalAlignment1(Alignment align)
Set the horizontal alignment of the edge mount point with the first node.

Parameters:
align - the horizontal alignment

setVerticalAlignment1

public void setVerticalAlignment1(Alignment align)
Set the vertical alignment of the edge mount point with the first node.

Parameters:
align - the vertical alignment

setHorizontalAlignment2

public void setHorizontalAlignment2(Alignment align)
Set the horizontal alignment of the edge mount point with the second node.

Parameters:
align - the horizontal alignment

setVerticalAlignment2

public void setVerticalAlignment2(Alignment align)
Set the vertical alignment of the edge mount point with the second node.

Parameters:
align - the vertical alignment

run

public void run(double frac)
Description copied from class: Action
Runs this Action, triggering whatever processing this Action performs. Subclass this method to create custom Actions.

Specified by:
run in class GroupAction
Parameters:
frac - the fraction of this Action's duration that has elapsed.
See Also:
Action.run(double)


Copyright © 2008 Regents of the University of California