Package ghidra.graph.job
Class AbstractAnimatorJob
- java.lang.Object
-
- ghidra.graph.job.AbstractAnimatorJob
-
- All Implemented Interfaces:
GraphJob
- Direct Known Subclasses:
AbstractGraphVisibilityTransitionJob,MoveViewAnimatorFunctionGraphJob
public abstract class AbstractAnimatorJob extends java.lang.Object implements GraphJob
-
-
Field Summary
Fields Modifier and Type Field Description protected org.jdesktop.animation.timing.Animatoranimatorprotected booleanisShortcutprotected org.apache.logging.log4j.Loggerlogstatic intTOO_BIG_TO_ANIMATEA somewhat arbitrary vertex count past which not to animate actions that are intensive.
-
Constructor Summary
Constructors Constructor Description AbstractAnimatorJob()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleancanShortcut()Returns true if the job can be told to stop running, but to still perform any final work before being done.protected abstract org.jdesktop.animation.timing.AnimatorcreateAnimator()voiddispose()Call to immediately stop this job, ignoring any exceptions or state issues that arise.voidexecute(GraphJobListener listener)Tells this job to do its work.protected abstract voidfinished()A callback given when this animator has run to completion.booleanisFinished()Returns true if this job has finished its workvoidsetBusyListener(BusyListener listener)voidshortcut()Tells this job to stop running, but to still perform any final work before being done.protected voidstop()java.lang.StringtoString()protected voidtrace(java.lang.String message)
-
-
-
Field Detail
-
TOO_BIG_TO_ANIMATE
public static final int TOO_BIG_TO_ANIMATE
A somewhat arbitrary vertex count past which not to animate actions that are intensive.- See Also:
- Constant Field Values
-
log
protected org.apache.logging.log4j.Logger log
-
animator
protected org.jdesktop.animation.timing.Animator animator
-
isShortcut
protected boolean isShortcut
-
-
Method Detail
-
createAnimator
protected abstract org.jdesktop.animation.timing.Animator createAnimator()
-
finished
protected abstract void finished()
A callback given when this animator has run to completion. This will be called whether the animator is stopped prematurely or ends naturally.
-
setBusyListener
public void setBusyListener(BusyListener listener)
-
canShortcut
public boolean canShortcut()
Description copied from interface:GraphJobReturns true if the job can be told to stop running, but to still perform any final work before being done.- Specified by:
canShortcutin interfaceGraphJob- Returns:
- true if the job can be shortcut
-
shortcut
public void shortcut()
Description copied from interface:GraphJobTells this job to stop running, but to still perform any final work before being done.Note: if your job is multi-threaded, then you must make sure to end your thread and work before returning from this method. If that cannot be done in a timely manner, then your
GraphJob.canShortcut()should return false.
-
execute
public void execute(GraphJobListener listener)
Description copied from interface:GraphJobTells this job to do its work. This call will be on the Swing thread. It is required that the given listener be called on the Swing thread when the job is finished.
-
isFinished
public boolean isFinished()
Description copied from interface:GraphJobReturns true if this job has finished its work- Specified by:
isFinishedin interfaceGraphJob- Returns:
- true if this job has finished its work
-
dispose
public void dispose()
Description copied from interface:GraphJobCall to immediately stop this job, ignoring any exceptions or state issues that arise.
-
trace
protected void trace(java.lang.String message)
-
stop
protected void stop()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-