samples.preview_new_graphdraw.iterablelayouts
Class InterpolatingIterableLayout
java.lang.Object
samples.preview_new_graphdraw.iter.IterableLayout
samples.preview_new_graphdraw.iterablelayouts.InterpolatingIterableLayout
- All Implemented Interfaces:
- LayoutEmitter
- Direct Known Subclasses:
- LinearInterpolatingLayout
public abstract class InterpolatingIterableLayout
- extends IterableLayout
This abstract iterable layout interpolates between two different
emitted layouts over K frames. Override by defining:
What to do with vertices in start, but not end (at step i of K)
What to do with vertices in end, but not start (...)
What to do with edges in start, but not end (...)
What to do with edges in end, but not start (...)
Where to put a vertex in both start and end at step i (...)
- Author:
- danyelf
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
start
protected EmittedLayout start
end
protected EmittedLayout end
numFrames
protected final int numFrames
InterpolatingIterableLayout
public InterpolatingIterableLayout(EmittedLayout end,
int numFrames)
iterationsAreDone
public boolean iterationsAreDone()
- Description copied from class:
IterableLayout
- Gives the outlining algorithm a sense of how long to run. The algorithm
is responsible for setting its own thresholds. Note that this should return
a meaningful value (probably "false") even before initialize
has been called.
- Specified by:
iterationsAreDone
in class IterableLayout
isFinite
public boolean isFinite()
- Description copied from class:
IterableLayout
- Says whether this algorthms' iterations will ever end. (If not, there's
no real use to waiting.)
- Specified by:
isFinite
in class IterableLayout
calculate
protected void calculate()
- Description copied from class:
IterableLayout
- Transforms currentLayout according to current layout algorithm. This may
change the state of the currentLayout object.
- Specified by:
calculate
in class IterableLayout
initializeLocationsFromLayout
public void initializeLocationsFromLayout(EmittedLayout inputLayout)
- Description copied from class:
IterableLayout
- Starts up this layout based on a previous layout. It is reasonable
to assume that this method will be called only once. After this
method is complete, a CURRENT LAYOUT should be defined with the
current states of the vertices, and a RETURNABLE LAYOUT should be
defined for emit() to return. In general, emit() will just return
this copy of the layout stored in returnableLayout, so this
method and advance() are both respon sible for advancing
correctly.
- Overrides:
initializeLocationsFromLayout
in class IterableLayout
interpolateE
protected abstract VisEdge interpolateE(VisEdge startE,
VisEdge endE,
VisVertex f,
VisVertex s,
int thisFrame2,
int numFrames2)
- Parameters:
startE
- endE
- thisFrame2
- numFrames2
-
- Returns:
interpolateV
protected abstract VisVertex interpolateV(VisVertex startV,
VisVertex endV,
int thisFrame2,
int numFrames2)
- Parameters:
startV
- endV
- thisFrame2
- numFrames2
-
- Returns: