Class SetAutoWidthCalculationOperation

  • All Implemented Interfaces:
    org.eclipse.core.commands.operations.IUndoableOperation

    public class SetAutoWidthCalculationOperation
    extends BaseOperation
    Operation for setting automatic width calculation mode for range of columns.
    • Field Summary

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.eclipse.core.runtime.IStatus execute​(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info)  
      org.eclipse.core.runtime.IStatus redo​(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info)  
      org.eclipse.core.runtime.IStatus undo​(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info)  
      • Methods inherited from class org.eclipse.core.commands.operations.AbstractOperation

        addContext, canExecute, canRedo, canUndo, dispose, getContexts, getLabel, hasContext, removeContext, setLabel, toString
    • Constructor Detail

      • SetAutoWidthCalculationOperation

        public SetAutoWidthCalculationOperation​(String label,
                                                org.eclipse.core.commands.operations.IUndoContext undoContext,
                                                SheetAccessor sheet,
                                                int beginColumnIndex,
                                                int endColumnIndex,
                                                Columns columns,
                                                Boolean autoWidthCalculation)
        Creates new instance of SetAutoWidthCalculationOperation
        Parameters:
        label - operation label, must not be null
        undoContext - undo context, may be null
        sheet - SheetAccessor representing target sheet, must not be null
        beginColumnIndex - begin column index
        endColumnIndex - end column index
        columns - Columns, must not be null
        autoWidthCalculation - auto width calculation value, may be null. In case of null value automatic width calculation will be unset.
    • Method Detail

      • execute

        public org.eclipse.core.runtime.IStatus execute​(org.eclipse.core.runtime.IProgressMonitor monitor,
                                                        org.eclipse.core.runtime.IAdaptable info)
                                                 throws org.eclipse.core.commands.ExecutionException
        Specified by:
        execute in interface org.eclipse.core.commands.operations.IUndoableOperation
        Specified by:
        execute in class org.eclipse.core.commands.operations.AbstractOperation
        Throws:
        org.eclipse.core.commands.ExecutionException
      • redo

        public org.eclipse.core.runtime.IStatus redo​(org.eclipse.core.runtime.IProgressMonitor monitor,
                                                     org.eclipse.core.runtime.IAdaptable info)
                                              throws org.eclipse.core.commands.ExecutionException
        Specified by:
        redo in interface org.eclipse.core.commands.operations.IUndoableOperation
        Specified by:
        redo in class org.eclipse.core.commands.operations.AbstractOperation
        Throws:
        org.eclipse.core.commands.ExecutionException
      • undo

        public org.eclipse.core.runtime.IStatus undo​(org.eclipse.core.runtime.IProgressMonitor monitor,
                                                     org.eclipse.core.runtime.IAdaptable info)
                                              throws org.eclipse.core.commands.ExecutionException
        Specified by:
        undo in interface org.eclipse.core.commands.operations.IUndoableOperation
        Specified by:
        undo in class org.eclipse.core.commands.operations.AbstractOperation
        Throws:
        org.eclipse.core.commands.ExecutionException