Class TransformHistory


  • public class TransformHistory
    extends java.lang.Object
    This class implements a transform history mechanism.
    Version:
    $Id: TransformHistory.java 1733416 2016-03-03 07:07:13Z gadams $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int position
      The current position in the stack.
      protected java.util.List transforms
      The transform stack.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void back()
      Goes back of one position in the history.
      boolean canGoBack()
      Whether it is possible to go back.
      boolean canGoForward()
      Whether it is possible to go forward.
      java.awt.geom.AffineTransform currentTransform()
      Returns the current transform.
      void forward()
      Goes forward of one position in the history.
      void update​(java.awt.geom.AffineTransform at)
      Adds a transform to the history.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • transforms

        protected java.util.List transforms
        The transform stack.
      • position

        protected int position
        The current position in the stack.
    • Constructor Detail

      • TransformHistory

        public TransformHistory()
    • Method Detail

      • back

        public void back()
        Goes back of one position in the history. Assumes that canGoBack() is true.
      • canGoBack

        public boolean canGoBack()
        Whether it is possible to go back.
      • forward

        public void forward()
        Goes forward of one position in the history. Assumes that canGoForward() is true.
      • canGoForward

        public boolean canGoForward()
        Whether it is possible to go forward.
      • currentTransform

        public java.awt.geom.AffineTransform currentTransform()
        Returns the current transform.
      • update

        public void update​(java.awt.geom.AffineTransform at)
        Adds a transform to the history.