diff --git a/res/icons/fast_forwarding_co.png b/res/icons/fast_forwarding_co.png index 608d941..5e994bf 100644 --- a/res/icons/fast_forwarding_co.png +++ b/res/icons/fast_forwarding_co.png Binary files differ diff --git a/res/icons/resume_co.png b/res/icons/resume_co.png index 67c1611..e8e1292 100644 --- a/res/icons/resume_co.png +++ b/res/icons/resume_co.png Binary files differ diff --git a/res/icons/skip_back_co.png b/res/icons/skip_back_co.png new file mode 100644 index 0000000..d5f2309 --- /dev/null +++ b/res/icons/skip_back_co.png Binary files differ diff --git a/src/org/ntlab/actions/SkipBackAnimationAction.java b/src/org/ntlab/actions/SkipBackAnimationAction.java new file mode 100644 index 0000000..68d7617 --- /dev/null +++ b/src/org/ntlab/actions/SkipBackAnimationAction.java @@ -0,0 +1,28 @@ +package org.ntlab.actions; + +import java.awt.event.ActionEvent; + +import org.ntlab.deltaViewer.IMagnetRON; +import org.ntlab.deltaViewer.MagnetRONFrame; + +public class SkipBackAnimationAction extends AbstractMagnetRONAction { + + private static final long serialVersionUID = -7485589008525481164L; + + public SkipBackAnimationAction(IMagnetRON magnetRON) { + super("Skip Back", magnetRON); + } + + public SkipBackAnimationAction(String name, IMagnetRON magnetRON) { + super(name, magnetRON); + } + + @Override + public void actionPerformed(ActionEvent e) { + if (super.magnetRON instanceof MagnetRONFrame) { + MagnetRONFrame magnetRONFrame = (MagnetRONFrame) super.magnetRON; + magnetRONFrame.skipBackAnimation(); + } + } + +} diff --git a/src/org/ntlab/deltaViewer/CollaborationViewer.java b/src/org/ntlab/deltaViewer/CollaborationViewer.java index ac07b74..8e238d4 100644 --- a/src/org/ntlab/deltaViewer/CollaborationViewer.java +++ b/src/org/ntlab/deltaViewer/CollaborationViewer.java @@ -34,9 +34,6 @@ private static final String TAG = CollaborationViewer.class.getSimpleName(); private IObjectCallGraph objectCallGraph; - - private Dimension graphMaxSize; - private double viwerScale = 1.0; public CollaborationViewer() { super(); @@ -60,18 +57,9 @@ * Initialize animation.�@(�Đ��{�^���������Ƃ�) */ public void initAnimation() { -// reflectCoordinates(mxgraph); // objectVertex��mxGraph�̍��W�𔽉f������(���[�U���w�肵�����W�ʒu�𔽉f) - - // Fit graph size in visible JFrame. - mxGraphView mxGraphView = getGraphComponent().getGraph().getView(); -// int componentWidth = getGraphComponent().getWidth() - 25; -// double viewWidth = (double) mxGraphView.getGraphBounds().getWidth(); -// scale = (double) componentWidth/viewWidth; - mxGraphView.setScale(viwerScale); - update(); - graphMaxSize = new Dimension(); + Dimension graphMaxSize = new Dimension(); for (ObjectVertex objVx: objectToVertexMap.values()) { double objVxInitMaxX = objVx.getInitialX() + DEFAULT_OBJECT_VERTEX_SIZE.getWidth(); double objVxInitMaxY = objVx.getInitialY() + DEFAULT_OBJECT_VERTEX_SIZE.getHeight(); @@ -104,7 +92,6 @@ * @param numFrame: current animation frame */ public void stepToAnimation(int numFrame) { - // TODO: Implement doLastAnimation() to support multiple delta. // TODO: Fix bug in curFrame. System.out.println(TAG + ": Frame=" + curFrame + "->" + numFrame); // if (numFrame - curFrame == 1) { @@ -611,5 +598,4 @@ } } } - } diff --git a/src/org/ntlab/deltaViewer/DeltaGraphAdapter.java b/src/org/ntlab/deltaViewer/DeltaGraphAdapter.java index ae7841d..71f0024 100644 --- a/src/org/ntlab/deltaViewer/DeltaGraphAdapter.java +++ b/src/org/ntlab/deltaViewer/DeltaGraphAdapter.java @@ -163,6 +163,14 @@ return cell; } + public void resetParentCell(mxICell cell, mxICell parentCell) { + if (cell.getParent() != null && !cell.getParent().equals(parentCell)) { + // If parent of cell isn't mxDefaltParent, reset parent. + cell.getParent().remove(cell); + cell.setParent(parentCell); + } + } + @Override public void refresh() { // long curTime = System.currentTimeMillis(); diff --git a/src/org/ntlab/deltaViewer/MagnetRONFrame.java b/src/org/ntlab/deltaViewer/MagnetRONFrame.java index 8dbfd69..7bcaad9 100644 --- a/src/org/ntlab/deltaViewer/MagnetRONFrame.java +++ b/src/org/ntlab/deltaViewer/MagnetRONFrame.java @@ -21,10 +21,12 @@ import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; +import javax.swing.JSlider; import javax.swing.JToolBar; import org.ntlab.actions.FastForwardAnimationAction; import org.ntlab.actions.PauseAnimationAction; +import org.ntlab.actions.SkipBackAnimationAction; import org.ntlab.actions.StartAnimationAction; import org.ntlab.actions.StopAnimationAction; import org.ntlab.deltaExtractor.Alias; @@ -69,13 +71,17 @@ private CollaborationViewer viewer = null; private MagnetRONMenuBar menuBar; + private JToolBar frameToolBar; + private JSlider slider; private Map argsMap = new HashMap<>(); private IObjectCallGraph objectCallGraph; private IAliasCollector aliasCollector; + private boolean fFeatureChanged = false; + private volatile Thread animationThread; - private boolean threadSuspended = false; + private boolean fThreadSuspended = false; public MagnetRONFrame() throws HeadlessException { super(FRAME_TITLE); @@ -87,17 +93,22 @@ menuBar = new MagnetRONMenuBar(this); setJMenuBar(menuBar); - + JToolBar toolBar = new JToolBar(); + + JToolBar animationToolBar = new JToolBar(); Image startImage = null; Image fastForwardImage = null; + Image skipBackImage = null; Image pauseImage = null; Image stopImage = null; + URL skipBackUrl = this.getClass().getResource("/icons/skip_back_co.png"); URL startUrl = this.getClass().getResource("/icons/resume_co.png"); URL fastForwardUrl = this.getClass().getResource("/icons/fast_forwarding_co.png"); URL pauseUrl = this.getClass().getResource("/icons/suspend_co.png"); URL stopUrl = this.getClass().getResource("/icons/terminate_co.png"); try { + skipBackImage = this.createImage((ImageProducer) skipBackUrl.getContent()); startImage = this.createImage((ImageProducer) startUrl.getContent()); fastForwardImage = this.createImage((ImageProducer) fastForwardUrl.getContent()); pauseImage = this.createImage((ImageProducer) pauseUrl.getContent()); @@ -106,19 +117,31 @@ System.out.println("Load resource error!"); } + JButton skipBackButton = new JButton(new ImageIcon(skipBackImage, "Skip Back")); + skipBackButton.addActionListener(new SkipBackAnimationAction(this)); + animationToolBar.add(skipBackButton); JButton startButton = new JButton(new ImageIcon(startImage, "Start")); startButton.addActionListener(new StartAnimationAction(this)); - toolBar.add(startButton); + animationToolBar.add(startButton); JButton fastForwardButton = new JButton(new ImageIcon(fastForwardImage, "Fast-Forward")); fastForwardButton.addActionListener(new FastForwardAnimationAction(this)); - toolBar.add(fastForwardButton); + animationToolBar.add(fastForwardButton); JButton suspendButton = new JButton(new ImageIcon(pauseImage, "Pause")); suspendButton.addActionListener(new PauseAnimationAction(this)); - toolBar.add(suspendButton); + animationToolBar.add(suspendButton); JButton terminateButton = new JButton(new ImageIcon(stopImage, "Stop")); terminateButton.addActionListener(new StopAnimationAction(this)); - toolBar.add(terminateButton); - add(toolBar, BorderLayout.NORTH); + animationToolBar.add(terminateButton); + + frameToolBar = new JToolBar(); + slider = new JSlider(); + frameToolBar.add(slider); + frameToolBar.setVisible(false); + + toolBar.add(animationToolBar); + toolBar.add(frameToolBar); + + add(toolBar, BorderLayout.NORTH); pack(); } @@ -130,44 +153,44 @@ return trace; } - public void startAll() { - // Change Here! - setArgmentsForDeltaExtract(argsMap); - //���o�������f���^�̈������i�[����Map��key -// String argsKey1 = "ArgoUMLSelect"; -// String argsKey1 = "ArgoUMLDelete1"; -// String argsKey2 = "ArgoUMLDelete2"; -// String argsKey1 = "JHotDrawTransform"; - String argsKey1 = "JHotDrawSelect1,1"; - String argsKey2 = "JHotDrawSelect2"; - String argsKey3 = "JHotDrawSelect3,1"; - String argsKey4 = "JHotDrawSelect4"; -// String argsKey = "sampleArray"; -// String argsKey = "sampleCollection"; -// String argsKey = "sampleCreate"; -// String argsKey = "sampleStatic"; -// String argsKey = "delta_eg1"; -// String argsKey = "pre_Exp1"; -// String argsKey1 = "getterOverlap1"; -// String argsKey2 = "getterOverlap2"; -// String argsKey = "setterOverlap1"; -// String argsKey = "worstCase"; -// String argsKey = "sample1"; -// String argsKey = "objTrace5"; - List keys = new ArrayList(); - keys.add(argsKey1); - keys.add(argsKey2); - keys.add(argsKey3); - keys.add(argsKey4); - Map.Entry extracted = extractMulti(keys); - objectCallGraph = extracted.getKey(); - aliasCollector = extracted.getValue(); -// new Thread() { -// public void run() { -// startDeltaViewer(extracted.getKey(), extracted.getValue()); -// } -// }.start(); - } +// public void startAll() { +// // Change Here! +// setArgmentsForDeltaExtract(argsMap); +// //���o�������f���^�̈������i�[����Map��key +//// String argsKey1 = "ArgoUMLSelect"; +//// String argsKey1 = "ArgoUMLDelete1"; +//// String argsKey2 = "ArgoUMLDelete2"; +//// String argsKey1 = "JHotDrawTransform"; +// String argsKey1 = "JHotDrawSelect1,1"; +// String argsKey2 = "JHotDrawSelect2"; +// String argsKey3 = "JHotDrawSelect3,1"; +// String argsKey4 = "JHotDrawSelect4"; +//// String argsKey = "sampleArray"; +//// String argsKey = "sampleCollection"; +//// String argsKey = "sampleCreate"; +//// String argsKey = "sampleStatic"; +//// String argsKey = "delta_eg1"; +//// String argsKey = "pre_Exp1"; +//// String argsKey1 = "getterOverlap1"; +//// String argsKey2 = "getterOverlap2"; +//// String argsKey = "setterOverlap1"; +//// String argsKey = "worstCase"; +//// String argsKey = "sample1"; +//// String argsKey = "objTrace5"; +// List keys = new ArrayList(); +// keys.add(argsKey1); +// keys.add(argsKey2); +// keys.add(argsKey3); +// keys.add(argsKey4); +// Map.Entry extracted = extractMulti(keys); +// objectCallGraph = extracted.getKey(); +// aliasCollector = extracted.getValue(); +//// new Thread() { +//// public void run() { +//// startDeltaViewer(extracted.getKey(), extracted.getValue()); +//// } +//// }.start(); +// } @Override public List open(File file) { @@ -198,6 +221,7 @@ @Override public void doExtract(Feature feature) { + viewer.clear(); Map.Entry extracted = extractMulti(feature); if (feature.getName() != null) { FRAME_TITLE = feature.getName() + " "; @@ -205,6 +229,12 @@ } objectCallGraph = extracted.getKey(); aliasCollector = extracted.getValue(); + + fFeatureChanged = true; + if (objectCallGraph != null && aliasCollector != null) { + viewer.init(objectCallGraph, aliasCollector, new CollaborationLayout()); + viewer.initAnimation(); + } } private Entry extractMulti(Feature feature) { @@ -575,26 +605,53 @@ public void run() { // Build a frame, create a graph, and add the graph to the frame so you can actually see the graph. if (objectCallGraph != null && aliasCollector != null) { - List relatedPoints = objectCallGraph.getRelatedPoints(); - TracePoint lastRP = relatedPoints.get(relatedPoints.size() - 1); - Map.Entry rpInf = MagnetRONViewer.getRelatedInformation(lastRP, aliasCollector); - if (FRAME_TITLE.contains("extract delta of")) { - String[] splits = FRAME_TITLE.split("extract delta of"); - String featureName = splits[0]; - FRAME_TITLE = featureName; - } - FRAME_TITLE += "extract delta of:" + rpInf.getKey().getSrcClassName() + "(" + rpInf.getKey().getSrcObjectId() + ")" + " -> " + rpInf.getKey().getDstClassName()+ "(" + rpInf.getKey().getDstObjectId()+ ")"; - setTitle(FRAME_TITLE); - - viewer.clear(); - viewer.setAnimationSpeed(1.0); - viewer.init(objectCallGraph, aliasCollector, new CollaborationLayout()); - viewer.initAnimation(); List aliasList = new ArrayList<>(aliasCollector.getAliasList()); + + if (!fFeatureChanged) { + viewer.clear(); + viewer.init(objectCallGraph, aliasCollector, new CollaborationLayout()); + viewer.initAnimation(); + } + + if (fFeatureChanged) { + // Set frame title. + List relatedPoints = objectCallGraph.getRelatedPoints(); + TracePoint lastRp = relatedPoints.get(relatedPoints.size() - 1); + Map.Entry rpInf = MagnetRONViewer.getRelatedInformation(lastRp, aliasCollector); + if (FRAME_TITLE.contains("extract delta of")) { + String[] splits = FRAME_TITLE.split("extract delta of"); + String featureName = splits[0]; + FRAME_TITLE = featureName; + } + FRAME_TITLE += "extract delta of:" + rpInf.getKey().getSrcClassName() + "(" + rpInf.getKey().getSrcObjectId() + ")" + " -> " + rpInf.getKey().getDstClassName()+ "(" + rpInf.getKey().getDstObjectId()+ ")"; + setTitle(FRAME_TITLE); + + // Initialize slider. + slider.setMinimum(0); + slider.setMaximum(aliasList.size()); + slider.setPaintTicks(true); + slider.setMajorTickSpacing(1); + slider.setPaintLabels(true); + + fFeatureChanged = false; + } + + frameToolBar.setVisible(true); for (int i = 0; i <= aliasList.size(); i++) { + if (!viewer.isSkipBackAnimation()) { + slider.setValue(i); + } + if (viewer.isSkipBackAnimation() && viewer.getSkipBackFrame() <= viewer.getCurrentFrame()) { + viewer.setAnimationSpeed(1.0); + viewer.setVisible(true); + viewer.setSkipBackAnimation(false); + slider.setValue(i); + if (fThreadSuspended) { + pauseAnimation(); + } + } viewer.stepToAnimation(i); } - } animationThread = null; } @@ -605,12 +662,11 @@ resumeAnimation(); } } - + public void fastForwardAnimation() { if (animationThread != null) { - System.out.println(TAG + ": animationTreadisInterrupted=" + animationThread.isInterrupted()); double animationSpeed = viewer.getAnimationSpeed(); - if (!threadSuspended) { + if (!fThreadSuspended) { if (animationSpeed < 2.0) { viewer.setAnimationSpeed(animationSpeed + 0.25); } else if (animationSpeed < 10.0) { @@ -623,32 +679,23 @@ } } - @Override - public synchronized void pauseAnimation() { + public void skipBackAnimation() { if (animationThread != null) { + stopAnimation(); + viewer.setVisible(false); + int skipBackFrame = viewer.getCurrentFrame() > 0 ? viewer.getCurrentFrame() - 1 : 0; + viewer.setSkipBackFrame(skipBackFrame); + viewer.setSkipBackAnimation(true); + viewer.setAnimationSpeed(10.0); + startAnimation(); + } + } + + @Override + public void pauseAnimation() { + if (animationThread != null) { + fThreadSuspended = true; animationThread.suspend(); -// while(true) { -// try { -// animationThread.wait(); -// } catch (InterruptedException e) { -// e.printStackTrace(); -// } -// } -// -// Thread thisThread = Thread.currentThread(); - threadSuspended = true; -// while (animationThread == thisThread) { -// try { -// Thread.sleep(1L); -// synchronized(this) { -// while (threadSuspended && animationThread == thisThread) -// wait(); -// } -// } catch (InterruptedException e){ -// e.printStackTrace(); -// } -// repaint(); -// } } } @@ -656,8 +703,7 @@ public synchronized void resumeAnimation() { if (animationThread != null) { animationThread.resume(); - threadSuspended = false; -// notify(); + fThreadSuspended = false; } } @@ -666,7 +712,6 @@ if (animationThread != null) { animationThread.stop(); animationThread = null; -// notify(); } } @@ -758,4 +803,5 @@ String[] JHotDrawSelect3 = {"599587451", "758826749", "org.jhotdraw.draw.tool.DelegationSelectionTool", "org.jhotdraw.draw.tool.DefaultDragTracker", "traces\\jHotDrawBenchmarkWithMoreStandardClasses.trace", Extract.CONTAINER_COMPONENT}; map.put("JHotDrawSelect3", JHotDrawSelect3); // JHotDraw �I���@�\3 (collection) String[] JHotDrawSelect4 = {"1787265837", "1952912699", "java.util.LinkedHashSet", "org.jhotdraw.draw.RectangleFigure", "traces\\jHotDrawBenchmarkWithMoreStandardClasses.trace", Extract.CONTAINER_COMPONENT_COLLECTION}; map.put("JHotDrawSelect4", JHotDrawSelect4); // JHotDraw �I���@�\4 (collection) } + } diff --git a/src/org/ntlab/deltaViewer/MagnetRONViewer.java b/src/org/ntlab/deltaViewer/MagnetRONViewer.java index fa60be8..44fd99b 100644 --- a/src/org/ntlab/deltaViewer/MagnetRONViewer.java +++ b/src/org/ntlab/deltaViewer/MagnetRONViewer.java @@ -75,9 +75,11 @@ protected mxGraphComponent mxgraphComponent; protected DeltaGraphAdapter mxgraph; - protected mxICell mxDefaultParent; + protected mxICell defaultParent; protected int curFrame = 0; + protected int prevFrame = 0; + protected int skipBackFrame = 0; // Use assigned value, when skip back animation. protected double animationSpeed = DEFAULT_ANIMATION_SPEED; protected static final double DEFAULT_ANIMATION_SPEED = 1.0; @@ -90,12 +92,13 @@ protected long magnetRONAnimationDelayMillis = DEFAULT_MAGNETRON_ANIMATION_DELAY_MILLIS; protected static final long DEFAULT_MAGNETRON_ANIMATION_DELAY_MILLIS = 100L; + private boolean fSkipBackAnimation = false; private boolean fAutoTracking = false; - + public MagnetRONViewer() { - mxgraph = new DeltaGraphAdapter(new DirectedWeightedPseudograph(DefaultEdge.class)); - mxDefaultParent = (mxCell)mxgraph.getDefaultParent(); - mxgraphComponent = new mxGraphComponent(mxgraph) { + this.mxgraph = new DeltaGraphAdapter(new DirectedWeightedPseudograph<>(DefaultEdge.class)); + this.defaultParent = (mxCell) mxgraph.getDefaultParent(); + this.mxgraphComponent = new mxGraphComponent(mxgraph) { public mxInteractiveCanvas createCanvas() { return new CurvedCanvas(this); } @@ -104,7 +107,7 @@ this.setLayout(new BorderLayout()); this.add(mxgraphComponent, BorderLayout.CENTER); - threadPoolExecutor = new MagnetRONScheduledThreadPoolExecutor(2); + this.threadPoolExecutor = new MagnetRONScheduledThreadPoolExecutor(2); } public mxGraphComponent getGraphComponent() { @@ -112,28 +115,13 @@ } protected mxICell getMxDefaultParent() { - return mxDefaultParent; + return defaultParent; } public void clear() { - mxgraph.getModel().beginUpdate(); - synchronized (mxgraph.getModel()) { - try { - for (ObjectVertex ov: objectToVertexMap.values()) { - mxICell ovCell = (mxICell)ov.getCell(); - if (ovCell != null) { - if (!ovCell.getParent().equals(getMxDefaultParent())) { - // If parent of ObjectVertex cell isn't mxDefaltParent, reset parent. - ovCell.getParent().remove(ovCell); - ovCell.setParent(getMxDefaultParent()); - } - } - } - mxgraph.removeCells(mxgraph.getChildVertices(getMxDefaultParent())); - } finally { - mxgraph.getModel().endUpdate(); - } - } + this.mxgraph = new DeltaGraphAdapter(new DirectedWeightedPseudograph<>(DefaultEdge.class)); + this.defaultParent = (mxCell) mxgraph.getDefaultParent(); + mxgraphComponent.setGraph(mxgraph); curFrame = 0; objectToVertexMap.clear(); methodExecToVertexMap.clear(); @@ -164,6 +152,7 @@ */ protected void doAnimation(int fromFrame, int toFrame) { for (int i = fromFrame; i <= toFrame; i++) { + List aliasList = new ArrayList<>(aliasCollector.getAliasList()); Alias alias = aliasList.get(i); @@ -171,15 +160,18 @@ System.out.println("\r\n" + TAG + ": Frame=" + i + ", aliasType=" + alias.getAliasType().toString() + ", objectId=" + alias.getObjectId() + ", methodSignature=" + alias.getMethodSignature() + ", l." + alias.getLineNo()); switch(alias.getAliasType()) { case RETURN_VALUE: + prevFrame = curFrame; moveObjectVertex(alias); update(); break; case METHOD_INVOCATION: + prevFrame = curFrame; removeMethodExecutionVertex(alias); moveObjectVertex(alias); update(); break; case CONSTRACTOR_INVOCATION: + prevFrame = curFrame; // TODO: Confirm the program behavior when called after RECEIVER. if (!objectToVertexMap.containsKey(alias.getObjectId()) || objectToVertexMap.get(alias.getObjectId()).getCell() == null) { createObjectVertexOnConstractor(alias); @@ -192,14 +184,17 @@ update(); break; case FORMAL_PARAMETER: + prevFrame = curFrame; moveObjectVertex(alias); update(); break; case ACTUAL_ARGUMENT: + prevFrame = curFrame; moveObjectVertex(alias); update(); break; case THIS: + prevFrame = curFrame; if (curFrame == 0 || alias.getObjectId().startsWith("0:")) { createMethodExecutionVertex(alias); update(); @@ -210,6 +205,7 @@ MethodExecution calledMethodExec = ((MethodInvocation) alias.getOccurrencePoint().getStatement()).getCalledMethodExecution(); if (calledMethodExec.isConstructor() && (!objectToVertexMap.containsKey(alias.getObjectId()) || objectToVertexMap.get(alias.getObjectId()).getCell() == null)) { + prevFrame = curFrame; createObjectVertexOnConstractor(alias); } if (!methodExecToVertexMap.containsKey(calledMethodExec)) { @@ -219,6 +215,7 @@ && objectToVertexMap.containsKey(methodExec.getThisObjId())) { createMethodExecutionVertex(methodExec.getThisObjId(), methodExec.getSignature(), methodExec); } + prevFrame = curFrame; createMethodExecutionVertex(alias.getObjectId(), calledMethodExec.getSignature(), calledMethodExec); update(); } @@ -1385,7 +1382,7 @@ } } } - + /** * Styles all cells on the graph. */ @@ -1478,8 +1475,8 @@ Point2D p2 = getAbsolutePointforCell(cell.getParent()); return new Point2D.Double(p1.getX() + p2.getX(), p1.getY() + p2.getY()); } - - /** + + /** * Update the graph on the JFrame by styling the cells and refreshing the mxgraphComponent. */ protected void update() { @@ -1489,7 +1486,7 @@ setCellsStyle(); getGraphComponent().refresh(); } - + protected void scrollCellToVisible(mxICell cell, boolean center) { if (isAutoTracking()) { getGraphComponent().scrollCellToVisible(cell, center); @@ -1658,10 +1655,18 @@ } } + public boolean isSkipBackAnimation() { + return this.fSkipBackAnimation; + } + private boolean isAutoTracking() { return this.fAutoTracking; } + public void setSkipBackAnimation(boolean fSkipBackAnimation) { + this.fSkipBackAnimation = fSkipBackAnimation; + } + public void setAutoTracking(boolean fAutoTracking) { if (fAutoTracking != isAutoTracking()) { this.fAutoTracking = fAutoTracking; @@ -1672,24 +1677,40 @@ this.curFrame = numberFrame; } + protected void setSkipBackFrame(int numberFrame) { + this.skipBackFrame = numberFrame; + } + public void setAnimationSpeed(double animationSpeed) { this.animationSpeed = animationSpeed; } + protected int getCurrentFrame() { + return this.curFrame; + } + + protected int getPreviousFrame() { + return this.prevFrame; + } + + public int getSkipBackFrame() { + return this.skipBackFrame; + } + public double getAnimationSpeed() { - return animationSpeed; + return this.animationSpeed; } protected long getAnimationDelayMillis() { - return (long) (animationDelayMillis / getAnimationSpeed()); + return (long) (this.animationDelayMillis / getAnimationSpeed()); } protected int getMagnetRONAnimationTotalCycleCount() { - return (int) (magnetRONAnimationTotalCycleCount / getAnimationSpeed()); + return (int) (this.magnetRONAnimationTotalCycleCount / getAnimationSpeed()); } protected long getMagnetRONAnimationDelayMillis() { - return (long) (magnetRONAnimationDelayMillis / getAnimationSpeed()); + return (long) (this.magnetRONAnimationDelayMillis / getAnimationSpeed()); } protected static String[] formatFieldName(String fieldName) { @@ -1804,10 +1825,6 @@ } return isParent(srcParentCell, destinationCell); } - - protected void reflectCoordinates(DeltaGraphAdapter mxgraph) { - // TODO Auto-generated method stub - } public static Map.Entry getRelatedInformation(TracePoint relatedPoint, IAliasCollector ac) { Statement rpStatement = relatedPoint.getStatement();