Class OperationsHelper
- java.lang.Object
-
- com._1c.g5.v8.dt.moxel.ui.operations.OperationsHelper
-
public class OperationsHelper extends Object
Helper for various operations
-
-
Constructor Summary
Constructors Constructor Description OperationsHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addDrawing(MoxelControl control, IEditingContext editingContext, Drawing drawingToInsert)
Add drawingstatic void
addPageBreak(MoxelControl control, IEditingContext editingContext)
Добавить разделитель страниц.static void
addRemovePageBreak(MoxelControl control, IEditingContext editingContext, boolean add)
Добавить / удалить разделитель страниц.static void
addToGroup(SheetAccessor sheet, IEditingContext editingContext, org.eclipse.core.commands.operations.IOperationHistory history, int begin, int end, Columns columns)
Add range of rows/columns to groupstatic void
applyDrawFontFormatting(MoxelControl control, IEditingContext editingContext, String operationName, Font fontToApply, int propertiesToApply)
Apply drawing font propertystatic void
applyDrawFormatting(MoxelControl control, IEditingContext editingContext, String operationName, ReadOnlyFormat format, long properties)
Apply formatting to drawingstatic void
applyFontFormatting(MoxelControl control, IEditingContext editingContext, String operationName, Font fontToApply, int propertiesToApply)
Apply font formattingstatic void
applyFormatting(MoxelControl control, IEditingContext editingContext, String operationName, ReadOnlyFormat format, long properties, Cell cellToApply, int cellProperties)
static void
applyParagraphProperty(MoxelControl control, IEditingContext editingContext, String operation_ChangeProperty, int paragraphProperty, int paragraphPropertyValue)
Применить свойства параграфа к текущему выделению.static void
changeBooleanFontProperty(MoxelControl moxelControl, IEditingContext editingContext, int fontProperty, boolean value)
Change boolean font propertystatic void
changeHeaderFooter(MoxelControl control, IEditingContext editingContext)
Change header/footerstatic void
changeSelectedDrawginsZOrder(MoxelControl control, IEditingContext editingContext, int shift)
Сдвинуть рисунки на указанное смещение.static void
clear(MoxelControl control, IEditingContext editingContext, boolean clearBorders, boolean clearFormat, boolean clearContent)
Очистить область.static void
createComment(MoxelControl control, IEditingContext editingContext, int y, int x)
Создать примечание в ячейке.static void
deleteSelectedDrawings(MoxelControl control, IEditingContext editingContext)
Удалить выделенные рисунки.static void
executeOperation(BaseOperation operation, IEditingContext editingContext)
static void
groupDrawings(MoxelControl control, IEditingContext editingContext)
Group drawingsstatic void
mergeOrUnmergeCells(MoxelControl control, IEditingContext editingContext)
Объединить ячейки или снять объединение с ячеек.static void
moveSelectedDrawings(MoxelControl control, IEditingContext editingContext, ViewPort viewPort, int horizontalShift, int verticalShift)
Сдвинуть рисунки на указанную позицию.static void
removeComments(MoxelControl control, IEditingContext editingContext)
Удалить примечания из выделенной области.static void
removeFromGroup(SheetAccessor sheet, IEditingContext editingContext, int begin, int end, Columns columns)
Remove range of rows/columns from groupstatic void
removePageBreak(MoxelControl control, IEditingContext editingContext)
Удалить разрыв страницы.static void
removePrintArea(MoxelControl control, IEditingContext editingContext)
Remove printing areastatic void
removeRepeatArea(MoxelControl control, IEditingContext editingContext)
Удалить область повторения печати.static void
renameDrawing(MoxelControl control, IEditingContext editingContext, Drawing drawing, String newName)
static void
renameDrawingInteractive(MoxelControl control, IEditingContext editingContext, Drawing drawing)
static void
renameSelection(MoxelControl control, IEditingContext editingContext, Selection selection, String newName, String oldName)
Rename selectionstatic void
renameSelectionInteractive(MoxelControl control, IEditingContext editingContext, Selection selection)
Запросить переименование выделения.static void
resizeSelectedDrawings(MoxelControl control, IEditingContext editingContext, ViewPort viewPort, int resizeX, int resizeY, DrawingResizeHandle resizeHandle)
Изменить размеры рисунков.static void
setColor(MoxelControl control, IEditingContext editingContext, Color color, long property)
Установить цвет.static void
setColumnsWidth(MoxelControl control, IEditingContext editingContext, int resizedColumn, Columns activeColumns, boolean autoWidth, Integer widthCharUnits)
Изменить ширину колонок.static void
setColumnsWidth__8_3_10(MoxelControl control, IEditingContext editingContext, int beginColumnIndex, int endColumnIndex, int changeRow, int width)
Set column width for range of columns, taking automatic width calculation mode into account.static void
setHorizontalAlign(MoxelControl control, IEditingContext editingContext, HorizontalAlignment horizontalAlign)
static void
setPrintArea(MoxelControl control, IEditingContext editingContext)
Set printing area, absed on current selectionstatic void
setRepeatArea(MoxelControl control, IEditingContext editingContext)
Set repeated area for printingstatic void
setRowHeight(MoxelControl control, IEditingContext editingContext, int resizeRowIndex, Integer heightUnit)
Set up row height.static void
setText(MoxelControl control, IEditingContext editingContext, String text)
Установить текст ячейке.static void
showHideRowsColumns(MoxelControl control, IEditingContext editingContext, boolean show)
Отобразить/скрыть строки/колонки.static void
ungroupDrawings(MoxelControl control, IEditingContext editingContext)
Ungroup drawings
-
-
-
Method Detail
-
addToGroup
public static void addToGroup(SheetAccessor sheet, IEditingContext editingContext, org.eclipse.core.commands.operations.IOperationHistory history, int begin, int end, Columns columns)
Add range of rows/columns to group- Parameters:
sheet
- -SheetAccessor
undoContext
- - undo contexthistory
- - operations historybegin
- - begin row\column indexend
- - end row\column indexcolumns
- - columns type
-
removeFromGroup
public static void removeFromGroup(SheetAccessor sheet, IEditingContext editingContext, int begin, int end, Columns columns)
Remove range of rows/columns from group- Parameters:
sheet
- -SheetAccessor
undoContext
- - undo contexthistory
- - operations historybegin
- - begin row\column indexend
- - end row\column indexcolumns
- - columns type
-
renameSelectionInteractive
public static void renameSelectionInteractive(MoxelControl control, IEditingContext editingContext, Selection selection)
Запросить переименование выделения.
-
renameSelection
public static void renameSelection(MoxelControl control, IEditingContext editingContext, Selection selection, String newName, String oldName)
Rename selection- Parameters:
control
- -MoxelControl
selection
- - selectionnewName
- - new name for selectionoldName
- - old selection name
-
renameDrawingInteractive
public static void renameDrawingInteractive(MoxelControl control, IEditingContext editingContext, Drawing drawing)
-
renameDrawing
public static void renameDrawing(MoxelControl control, IEditingContext editingContext, Drawing drawing, String newName)
-
setColumnsWidth__8_3_10
public static void setColumnsWidth__8_3_10(MoxelControl control, IEditingContext editingContext, int beginColumnIndex, int endColumnIndex, int changeRow, int width)
Set column width for range of columns, taking automatic width calculation mode into account.- Parameters:
control
-MoxelControl
, must not benull
beginColumnIndex
- begin column indexendColumnIndex
- end column indexchangeRow
- row index, which columns are being resizedwidth
- desired width in char units
-
setColumnsWidth
public static void setColumnsWidth(MoxelControl control, IEditingContext editingContext, int resizedColumn, Columns activeColumns, boolean autoWidth, Integer widthCharUnits)
Изменить ширину колонок.- Parameters:
resizedColumn
- - номер колонки, ширину которой нужно изменить. -1 - нужно изменить ширину всех колонок выделения.autoWidth
- - нужно рассчиать автоматическую щирину.widthCharUnits
- - ширина, которую нужно установить.
-
setRowHeight
public static void setRowHeight(MoxelControl control, IEditingContext editingContext, int resizeRowIndex, Integer heightUnit)
Set up row height.- Parameters:
control
-MoxelControl
, must not benull
resizeRowIndex
- row indexheightUnit
- row height in units.- In case of non-negative value the concrete row height will be set up.
- In case on negative value row will have automatically-calculated height, maximum row height will be set up.
- In case of
null
value row height will be unset.
-
showHideRowsColumns
public static void showHideRowsColumns(MoxelControl control, IEditingContext editingContext, boolean show)
Отобразить/скрыть строки/колонки.
-
clear
public static void clear(MoxelControl control, IEditingContext editingContext, boolean clearBorders, boolean clearFormat, boolean clearContent)
Очистить область.
-
applyFormatting
public static void applyFormatting(MoxelControl control, IEditingContext editingContext, String operationName, ReadOnlyFormat format, long properties, Cell cellToApply, int cellProperties)
-
applyDrawFormatting
public static void applyDrawFormatting(MoxelControl control, IEditingContext editingContext, String operationName, ReadOnlyFormat format, long properties)
Apply formatting to drawing- Parameters:
control
-MoxelControl
operationName
- operation nameformat
-ReadOnlyFormat
properties
- properties to apply
-
setHorizontalAlign
public static void setHorizontalAlign(MoxelControl control, IEditingContext editingContext, HorizontalAlignment horizontalAlign)
-
setColor
public static void setColor(MoxelControl control, IEditingContext editingContext, Color color, long property)
Установить цвет.
-
setText
public static void setText(MoxelControl control, IEditingContext editingContext, String text)
Установить текст ячейке.
-
mergeOrUnmergeCells
public static void mergeOrUnmergeCells(MoxelControl control, IEditingContext editingContext)
Объединить ячейки или снять объединение с ячеек.
-
resizeSelectedDrawings
public static void resizeSelectedDrawings(MoxelControl control, IEditingContext editingContext, ViewPort viewPort, int resizeX, int resizeY, DrawingResizeHandle resizeHandle)
Изменить размеры рисунков.
-
moveSelectedDrawings
public static void moveSelectedDrawings(MoxelControl control, IEditingContext editingContext, ViewPort viewPort, int horizontalShift, int verticalShift)
Сдвинуть рисунки на указанную позицию.
-
deleteSelectedDrawings
public static void deleteSelectedDrawings(MoxelControl control, IEditingContext editingContext)
Удалить выделенные рисунки.
-
changeSelectedDrawginsZOrder
public static void changeSelectedDrawginsZOrder(MoxelControl control, IEditingContext editingContext, int shift)
Сдвинуть рисунки на указанное смещение.
-
groupDrawings
public static void groupDrawings(MoxelControl control, IEditingContext editingContext)
Group drawings- Parameters:
control
- -MoxelControl
-
ungroupDrawings
public static void ungroupDrawings(MoxelControl control, IEditingContext editingContext)
Ungroup drawings- Parameters:
control
- -MoxelControl
-
addDrawing
public static void addDrawing(MoxelControl control, IEditingContext editingContext, Drawing drawingToInsert)
Add drawing- Parameters:
control
- -MoxelControl
drawingToInsert
- - drawing to insert
-
changeHeaderFooter
public static void changeHeaderFooter(MoxelControl control, IEditingContext editingContext)
Change header/footer- Parameters:
control
- -MoxelControl
-
setPrintArea
public static void setPrintArea(MoxelControl control, IEditingContext editingContext)
Set printing area, absed on current selection- Parameters:
control
- -MoxelControl
-
removePrintArea
public static void removePrintArea(MoxelControl control, IEditingContext editingContext)
Remove printing area- Parameters:
control
- -MoxelControl
-
setRepeatArea
public static void setRepeatArea(MoxelControl control, IEditingContext editingContext)
Set repeated area for printing- Parameters:
control
- -MoxelControl
-
removeRepeatArea
public static void removeRepeatArea(MoxelControl control, IEditingContext editingContext)
Удалить область повторения печати.
-
addRemovePageBreak
public static void addRemovePageBreak(MoxelControl control, IEditingContext editingContext, boolean add)
Добавить / удалить разделитель страниц.
-
addPageBreak
public static void addPageBreak(MoxelControl control, IEditingContext editingContext)
Добавить разделитель страниц.
-
removePageBreak
public static void removePageBreak(MoxelControl control, IEditingContext editingContext)
Удалить разрыв страницы.
-
applyParagraphProperty
public static void applyParagraphProperty(MoxelControl control, IEditingContext editingContext, String operation_ChangeProperty, int paragraphProperty, int paragraphPropertyValue)
Применить свойства параграфа к текущему выделению.
-
removeComments
public static void removeComments(MoxelControl control, IEditingContext editingContext)
Удалить примечания из выделенной области.
-
createComment
public static void createComment(MoxelControl control, IEditingContext editingContext, int y, int x)
Создать примечание в ячейке.
-
changeBooleanFontProperty
public static void changeBooleanFontProperty(MoxelControl moxelControl, IEditingContext editingContext, int fontProperty, boolean value)
Change boolean font property- Parameters:
moxelControl
-MoxelControl
fontProperty
- font propertyvalue
- property value to be set
-
applyFontFormatting
public static void applyFontFormatting(MoxelControl control, IEditingContext editingContext, String operationName, Font fontToApply, int propertiesToApply)
Apply font formatting- Parameters:
control
-MoxelControl
operationName
- operation namefontToApply
-propertiesToApply
-
-
applyDrawFontFormatting
public static void applyDrawFontFormatting(MoxelControl control, IEditingContext editingContext, String operationName, Font fontToApply, int propertiesToApply)
Apply drawing font property- Parameters:
control
-MoxelControl
operationName
- operation namefontToApply
-propertiesToApply
- properties to apply
-
executeOperation
public static void executeOperation(BaseOperation operation, IEditingContext editingContext)
-
-