Package org.exbin.bined.operation.undo
Interface BinaryDataUndoHandler
-
@ParametersAreNonnullByDefault public interface BinaryDataUndoHandler
Code area undo support handler.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addCommand(BinaryDataCommand command)
Adds new step into command list without executing it.void
addUndoUpdateListener(BinaryDataUndoUpdateListener listener)
boolean
canRedo()
boolean
canUndo()
void
clear()
void
doSync()
Performs revert to sync point.void
execute(BinaryDataCommand command)
Adds new step into command list.java.util.List<BinaryDataCommand>
getCommandList()
long
getCommandPosition()
long
getMaximumUndo()
long
getSyncPoint()
long
getUndoMaximumSize()
long
getUsedSize()
void
performRedo()
Performs single redo step.void
performRedo(int count)
Performs multiple redo step.void
performUndo()
Performs single undo step.void
performUndo(int count)
Performs multiple undo step.void
removeUndoUpdateListener(BinaryDataUndoUpdateListener listener)
void
setCommandPosition(long targetPosition)
Performs undo or redo operation to reach given position.void
setSyncPoint()
void
setSyncPoint(long syncPoint)
-
-
-
Method Detail
-
canRedo
boolean canRedo()
-
canUndo
boolean canUndo()
-
clear
void clear()
-
doSync
void doSync() throws BinaryDataOperationException
Performs revert to sync point.- Throws:
BinaryDataOperationException
- for operation handling issues
-
execute
void execute(BinaryDataCommand command) throws BinaryDataOperationException
Adds new step into command list.- Parameters:
command
- command- Throws:
BinaryDataOperationException
- for operation handling issues
-
addCommand
void addCommand(BinaryDataCommand command)
Adds new step into command list without executing it.- Parameters:
command
- command
-
getCommandList
@Nonnull java.util.List<BinaryDataCommand> getCommandList()
-
getCommandPosition
long getCommandPosition()
-
getMaximumUndo
long getMaximumUndo()
-
getSyncPoint
long getSyncPoint()
-
getUndoMaximumSize
long getUndoMaximumSize()
-
getUsedSize
long getUsedSize()
-
performRedo
void performRedo() throws BinaryDataOperationException
Performs single redo step.- Throws:
BinaryDataOperationException
- for operation handling issues
-
performRedo
void performRedo(int count) throws BinaryDataOperationException
Performs multiple redo step.- Parameters:
count
- count of steps- Throws:
BinaryDataOperationException
- for operation handling issues
-
performUndo
void performUndo() throws BinaryDataOperationException
Performs single undo step.- Throws:
BinaryDataOperationException
- for operation handling issues
-
performUndo
void performUndo(int count) throws BinaryDataOperationException
Performs multiple undo step.- Parameters:
count
- count of steps- Throws:
BinaryDataOperationException
- for operation handling issues
-
setCommandPosition
void setCommandPosition(long targetPosition) throws BinaryDataOperationException
Performs undo or redo operation to reach given position.- Parameters:
targetPosition
- desired position- Throws:
BinaryDataOperationException
- for operation handling issues
-
setSyncPoint
void setSyncPoint(long syncPoint)
-
setSyncPoint
void setSyncPoint()
-
addUndoUpdateListener
void addUndoUpdateListener(BinaryDataUndoUpdateListener listener)
-
removeUndoUpdateListener
void removeUndoUpdateListener(BinaryDataUndoUpdateListener listener)
-
-