Class VersionManager
java.lang.Object
net.mcreator.ui.views.editor.image.versioning.VersionManager
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRevision(Change change) booleanDetermines if the currently active revision is the initial full revision of the image that should not be undone.booleanvoidredo()voidvoidsetLayerPanel(LayerPanel layerPanel) voidvoidundo()
-
Constructor Details
-
VersionManager
-
-
Method Details
-
setLayerPanel
-
setRevisionListener
-
addRevision
-
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()
-