Class SetWidthWeightFactorOperation

  • All Implemented Interfaces:
    org.eclipse.core.commands.operations.IUndoableOperation
    Direct Known Subclasses:
    UnsetWidthWeightFactorOperation

    public class SetWidthWeightFactorOperation
    extends BaseOperation
    Operation for setting width weight factor for range of columns.
    • Constructor Detail

      • SetWidthWeightFactorOperation

        public SetWidthWeightFactorOperation​(String label,
                                             org.eclipse.core.commands.operations.IUndoContext undoContext,
                                             SheetAccessor sheet,
                                             int beginColumnIndex,
                                             int endColumnIndex,
                                             Columns columns,
                                             int widthWeightFactor)
        Creates new instance of SetWidthWeightFactorOperation.
        Parameters:
        label - operation label, must not be null
        undoContext - undo context, may be null
        sheet - SheetAccessor representing targer sheet. Must not be null
        beginColumnIndex - begin column index
        endColumnIndex - end column index
        columns - Columns, must not be null
        widthWeightFactor - width weight factor to be set
      • SetWidthWeightFactorOperation

        public SetWidthWeightFactorOperation​(String label,
                                             org.eclipse.core.commands.operations.IUndoContext undoContext,
                                             SheetAccessor sheet,
                                             int beginColumnIndex,
                                             int endColumnIndex,
                                             Columns columns,
                                             List<Integer> widthWeightFactors)
        Creates new instance of SetWidthWeightFactorOperation.
        Parameters:
        label - operation label, must not be null
        undoContext - undo context, may be null
        sheet - SheetAccessor representing targer sheet. Must not be null
        beginColumnIndex - begin column index
        endColumnIndex - end column index
        columns - Columns, must not be null
        widthWeightFactors - list of weight factors to be set
      • SetWidthWeightFactorOperation

        protected SetWidthWeightFactorOperation​(String label,
                                                org.eclipse.core.commands.operations.IUndoContext undoContext,
                                                SheetAccessor sheet,
                                                int beginColumnIndex,
                                                int endColumnIndex,
                                                Columns columns)
        Creates new instance of SetWidthWeightFactorOperation.
        Parameters:
        label - operation label, must not be null
        undoContext - undo context, may be null
        sheet - SheetAccessor representing targer sheet. Must not be null
        beginColumnIndex - begin column index
        endColumnIndex - end column index
        columns - Columns, must not be null
    • 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