Class CodeAreaOperation

    • Field Detail

      • codeArea

        @Nonnull
        protected final org.exbin.bined.swing.CodeAreaCore codeArea
      • backPosition

        @Nonnull
        protected final org.exbin.bined.DefaultCodeAreaCaretPosition backPosition
    • Constructor Detail

      • CodeAreaOperation

        public CodeAreaOperation​(org.exbin.bined.swing.CodeAreaCore codeArea)
      • CodeAreaOperation

        public CodeAreaOperation​(org.exbin.bined.swing.CodeAreaCore codeArea,
                                 @Nullable
                                 org.exbin.bined.CodeAreaCaretPosition backPosition)
    • Method Detail

      • getType

        @Nonnull
        public abstract CodeAreaOperationType getType()
        Returns type of the operation.
        Returns:
        operation type
      • getCodeArea

        @Nonnull
        public org.exbin.bined.swing.CodeAreaCore getCodeArea()
      • getCaption

        @Nonnull
        public java.lang.String getCaption()
        Returns caption as text.
        Specified by:
        getCaption in interface org.exbin.bined.operation.BinaryDataOperation
        Returns:
        text caption
      • getBackPosition

        @Nonnull
        public org.exbin.bined.CodeAreaCaretPosition getBackPosition()
      • setBackPosition

        public void setBackPosition​(org.exbin.bined.CodeAreaCaretPosition backPosition)
      • execute

        public void execute()
                     throws org.exbin.bined.operation.BinaryDataOperationException
        Performs operation on given document.
        Specified by:
        execute in interface org.exbin.bined.operation.BinaryDataOperation
        Throws:
        org.exbin.bined.operation.BinaryDataOperationException - for operation handling issues
      • executeWithUndo

        @Nullable
        public CodeAreaOperation executeWithUndo()
                                          throws org.exbin.bined.operation.BinaryDataOperationException
        Performs operation on given document and returns undo operation.
        Specified by:
        executeWithUndo in interface org.exbin.bined.operation.BinaryDataOperation
        Returns:
        undo operation or null if not available
        Throws:
        org.exbin.bined.operation.BinaryDataOperationException - for operation handling issues
      • execute

        @Nullable
        protected CodeAreaOperation execute​(CodeAreaOperation.ExecutionType executionType)
        Default empty execution method supporting both modes ready for override.
        Parameters:
        executionType - if undo should be included
        Returns:
        undo operation or null if not available
      • dispose

        public void dispose()
                     throws org.exbin.bined.operation.BinaryDataOperationException
        Performs dispose of the operation. Default dispose is empty.
        Specified by:
        dispose in interface org.exbin.bined.operation.BinaryDataOperation
        Throws:
        org.exbin.bined.operation.BinaryDataOperationException - for operation handling issues