Class VersionManager

java.lang.Object
net.mcreator.ui.views.editor.image.versioning.VersionManager

public class VersionManager extends Object
  • Constructor Details

    • VersionManager

      public VersionManager(ImageMakerView imageMakerView)
  • Method Details

    • setLayerPanel

      public void setLayerPanel(LayerPanel layerPanel)
    • setRevisionListener

      public void setRevisionListener(VersionManager.RevisionListener listener)
    • addRevision

      public void addRevision(Change change)
    • refreshPreview

      public void refreshPreview()
    • firstRevision

      public boolean firstRevision()
      Determines if the currently active revision is the initial full revision of the image that should not be undone. This method handles two different cases: 1. Elementary changes (without a group UUID): Returns true if this is the very first change (index = 0) 2. Complex changes (with a group UUID): Returns true if the first element of the group change is the first overall change, making the group the initial full version.
      Returns:
      true if the current revision is the first atomic revision that cannot be undone, false otherwise
    • lastRevision

      public boolean lastRevision()
    • undo

      public void undo()
    • redo

      public void redo()