Class GraphVizTokens
- java.lang.Object
-
- org.processmining.plugins.inductiveVisualMiner.animation.GraphVizTokens
-
- All Implemented Interfaces:
GraphVizTokensIterator
public class GraphVizTokens extends java.lang.Object implements GraphVizTokensIterator
Keeps a collection of tokens. If performance lacks, the implementation could be replaced by an interval tree.- Author:
- sleemans
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGraphVizTokens.EvalScratch
-
Constructor Summary
Constructors Constructor Description GraphVizTokens()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(double startTime, double endTime, java.lang.String path, boolean fadeIn, boolean fadeOut, java.awt.geom.AffineTransform transform, int traceIndex)voidcleanUp()booleanequals(java.lang.Object obj)voideval(int tokenIndex, double time, GraphVizTokens.EvalScratch result)intgetBezierIndex(int tokenIndex)BezierListgetBeziers()doublegetEndTime(int tokenIndex)doublegetStartTime(int tokenIndex)IteratorWithPosition<java.lang.Integer>getTokensAtTime(double time)intgetTraceIndex(int tokenIndex)inthashCode()voiditEval()Evaluate the bezier last returned by itNext()doubleitGetOpacity()intitGetPosition()intitGetTraceIndex()doubleitGetX()doubleitGetY()booleanitHasNext()Default iterator.hasNext()voiditInit(double time)Initialises the iterator on a particular time.intitNext()Default iterator.next()static org.processmining.plugins.InductiveMiner.Pair<java.util.List<com.kitfox.svg.animation.Bezier>,java.lang.Double>processPath(java.lang.String path, java.awt.geom.AffineTransform transform)intsize()java.lang.StringtoString()
-
-
-
Method Detail
-
add
public void add(double startTime, double endTime, java.lang.String path, boolean fadeIn, boolean fadeOut, java.awt.geom.AffineTransform transform, int traceIndex)
-
cleanUp
public void cleanUp()
-
getTokensAtTime
public IteratorWithPosition<java.lang.Integer> getTokensAtTime(double time)
- Parameters:
time-- Returns:
- Walks over the tokens that span the time
-
getStartTime
public double getStartTime(int tokenIndex)
-
getEndTime
public double getEndTime(int tokenIndex)
-
getTraceIndex
public int getTraceIndex(int tokenIndex)
-
getBezierIndex
public int getBezierIndex(int tokenIndex)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
processPath
public static org.processmining.plugins.InductiveMiner.Pair<java.util.List<com.kitfox.svg.animation.Bezier>,java.lang.Double> processPath(java.lang.String path, java.awt.geom.AffineTransform transform)- Parameters:
path-transform-- Returns:
- a list of bezier segments and the total length of the curve. Each point of every bezier will be transformed using transform.
-
eval
public void eval(int tokenIndex, double time, GraphVizTokens.EvalScratch result)- Parameters:
tokenIndex-time-
-
size
public int size()
-
itInit
public void itInit(double time)
Description copied from interface:GraphVizTokensIteratorInitialises the iterator on a particular time.- Specified by:
itInitin interfaceGraphVizTokensIterator
-
itNext
public int itNext()
Description copied from interface:GraphVizTokensIteratorDefault iterator.next()- Specified by:
itNextin interfaceGraphVizTokensIterator- Returns:
-
itHasNext
public boolean itHasNext()
Description copied from interface:GraphVizTokensIteratorDefault iterator.hasNext()- Specified by:
itHasNextin interfaceGraphVizTokensIterator- Returns:
-
itGetPosition
public int itGetPosition()
- Specified by:
itGetPositionin interfaceGraphVizTokensIterator- Returns:
- the index of the bezier last returned by itNext()
-
itEval
public void itEval()
Description copied from interface:GraphVizTokensIteratorEvaluate the bezier last returned by itNext()- Specified by:
itEvalin interfaceGraphVizTokensIterator
-
itGetOpacity
public double itGetOpacity()
- Specified by:
itGetOpacityin interfaceGraphVizTokensIterator- Returns:
- the opacity of the last bezier itEval() was called on.
-
itGetX
public double itGetX()
- Specified by:
itGetXin interfaceGraphVizTokensIterator- Returns:
- the x of the last bezier itEval() was called on.
-
itGetY
public double itGetY()
- Specified by:
itGetYin interfaceGraphVizTokensIterator- Returns:
- the y of the last bezier itEval() was called on.
-
itGetTraceIndex
public int itGetTraceIndex()
- Specified by:
itGetTraceIndexin interfaceGraphVizTokensIterator- Returns:
- the current trace index.
-
getBeziers
public BezierList getBeziers()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-