forked from Crazydiamonde/WooGLE2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add working undo/redo for drag actions
- Loading branch information
Showing
3 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/com/WooGLEFX/Structures/UserActions/HierarchyDragAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.WooGLEFX.Structures.UserActions; | ||
|
||
import com.WooGLEFX.Structures.EditorObject; | ||
|
||
public class HierarchyDragAction extends UserAction { | ||
|
||
private int toPosition; | ||
private int fromPosition; | ||
|
||
public int getToPosition() { | ||
return toPosition; | ||
} | ||
|
||
public int getFromPosition() { | ||
return fromPosition; | ||
} | ||
|
||
public void setToPosition(int toPosition) { | ||
this.toPosition = toPosition; | ||
} | ||
|
||
public void setFromPosition(int fromPosition) { | ||
this.fromPosition = fromPosition; | ||
} | ||
|
||
public HierarchyDragAction(EditorObject object, int fromPosition, int toPosition) { | ||
super(object); | ||
this.fromPosition = fromPosition; | ||
this.toPosition = toPosition; | ||
} | ||
|
||
} |