Class AbstractAnimatorJob

java.lang.Object
ghidra.graph.job.AbstractAnimatorJob
All Implemented Interfaces:
GraphJob
Direct Known Subclasses:
AbstractGraphVisibilityTransitionJob, MoveViewAnimatorFunctionGraphJob

public abstract class AbstractAnimatorJob extends Object implements GraphJob
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.jdesktop.animation.timing.Animator
     
    protected boolean
     
    protected org.apache.logging.log4j.Logger
     
    static final int
    A somewhat arbitrary vertex count past which not to animate actions that are intensive.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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.Animator
     
    void
    Call to immediately stop this job, ignoring any exceptions or state issues that arise.
    void
    Tells this job to do its work.
    protected abstract void
    A callback given when this animator has run to completion.
    boolean
    Returns true if this job has finished its work
    void
     
    void
    Tells this job to stop running, but to still perform any final work before being done.
    protected void
     
     
    protected void
    trace(String message)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • 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:
    • log

      protected org.apache.logging.log4j.Logger log
    • animator

      protected org.jdesktop.animation.timing.Animator animator
    • isShortcut

      protected boolean isShortcut
  • Constructor Details

    • AbstractAnimatorJob

      public AbstractAnimatorJob()
  • Method Details

    • 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: GraphJob
      Returns true if the job can be told to stop running, but to still perform any final work before being done.
      Specified by:
      canShortcut in interface GraphJob
      Returns:
      true if the job can be shortcut
    • shortcut

      public void shortcut()
      Description copied from interface: GraphJob
      Tells 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.

      Specified by:
      shortcut in interface GraphJob
    • execute

      public void execute(GraphJobListener listener)
      Description copied from interface: GraphJob
      Tells 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.
      Specified by:
      execute in interface GraphJob
      Parameters:
      listener - the listener this job is expected to call when its work is finished
    • isFinished

      public boolean isFinished()
      Description copied from interface: GraphJob
      Returns true if this job has finished its work
      Specified by:
      isFinished in interface GraphJob
      Returns:
      true if this job has finished its work
    • dispose

      public void dispose()
      Description copied from interface: GraphJob
      Call to immediately stop this job, ignoring any exceptions or state issues that arise.
      Specified by:
      dispose in interface GraphJob
    • trace

      protected void trace(String message)
    • stop

      protected void stop()
    • toString

      public String toString()
      Overrides:
      toString in class Object