Package org.exbin.bined.operation.undo
Interface BinaryDataUndoHandler
-
@ParametersAreNonnullByDefault public interface BinaryDataUndoHandlerCode area undo support handler.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCommand(BinaryDataCommand command)Adds new step into command list without executing it.voidaddUndoUpdateListener(BinaryDataUndoUpdateListener listener)booleancanRedo()booleancanUndo()voidclear()voiddoSync()Performs revert to sync point.voidexecute(BinaryDataCommand command)Adds new step into command list.java.util.List<BinaryDataCommand>getCommandList()longgetCommandPosition()longgetMaximumUndo()longgetSyncPoint()longgetUndoMaximumSize()longgetUsedSize()voidperformRedo()Performs single redo step.voidperformRedo(int count)Performs multiple redo step.voidperformUndo()Performs single undo step.voidperformUndo(int count)Performs multiple undo step.voidremoveUndoUpdateListener(BinaryDataUndoUpdateListener listener)voidsetCommandPosition(long targetPosition)Performs undo or redo operation to reach given position.voidsetSyncPoint()voidsetSyncPoint(long syncPoint)
-
-
-
Method Detail
-
canRedo
boolean canRedo()
-
canUndo
boolean canUndo()
-
clear
void clear()
-
doSync
void doSync() throws BinaryDataOperationExceptionPerforms 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 BinaryDataOperationExceptionPerforms single redo step.- Throws:
BinaryDataOperationException- for operation handling issues
-
performRedo
void performRedo(int count) throws BinaryDataOperationExceptionPerforms multiple redo step.- Parameters:
count- count of steps- Throws:
BinaryDataOperationException- for operation handling issues
-
performUndo
void performUndo() throws BinaryDataOperationExceptionPerforms single undo step.- Throws:
BinaryDataOperationException- for operation handling issues
-
performUndo
void performUndo(int count) throws BinaryDataOperationExceptionPerforms multiple undo step.- Parameters:
count- count of steps- Throws:
BinaryDataOperationException- for operation handling issues
-
setCommandPosition
void setCommandPosition(long targetPosition) throws BinaryDataOperationExceptionPerforms 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)
-
-