Class HierarchicalTreeCopyDataCommandHandler
java.lang.Object
org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler<CopyDataToClipboardCommand>
org.eclipse.nebula.widgets.nattable.copy.command.CopyDataCommandHandler
org.eclipse.nebula.widgets.nattable.copy.command.RowSpanningCopyDataCommandHandler
org.eclipse.nebula.widgets.nattable.hierarchical.command.HierarchicalTreeCopyDataCommandHandler
- All Implemented Interfaces:
ILayerCommandHandler<CopyDataToClipboardCommand>
Handler class for copying selected data on a
HierarchicalTreeLayer to
the clipboard. Will treat cells with row spanning as a single cell and will
not create gaps for rows with no cell to copy. Will also not copy cells of
collapsed nodes if the labels HierarchicalTreeLayer.COLLAPSED_CHILD
or HierarchicalTreeLayer.NO_OBJECT_IN_LEVEL are applied.- Since:
- 1.6
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.nebula.widgets.nattable.copy.command.RowSpanningCopyDataCommandHandler
clipboardFields inherited from class org.eclipse.nebula.widgets.nattable.copy.command.CopyDataCommandHandler
selectionLayer -
Constructor Summary
ConstructorsConstructorDescriptionHierarchicalTreeCopyDataCommandHandler(SelectionLayer selectionLayer, HierarchicalTreeLayer treeLayer, InternalCellClipboard clipboard) Creates an instance that only checks theSelectionLayerfor data to add to the clipboard.HierarchicalTreeCopyDataCommandHandler(SelectionLayer selectionLayer, HierarchicalTreeLayer treeLayer, ILayer columnHeaderLayer, InternalCellClipboard clipboard) Creates an instance that checks theSelectionLayerand the column header layer if given for data to add to the clipboard. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisCopyAllowed(ILayerCell cellToCopy) Checks if the given cell can be copied.Methods inherited from class org.eclipse.nebula.widgets.nattable.copy.command.RowSpanningCopyDataCommandHandler
assembleBody, internalDoCommand, postInternalCopy, preInternalCopyMethods inherited from class org.eclipse.nebula.widgets.nattable.copy.command.CopyDataCommandHandler
assembleColumnHeaders, assembleCopiedDataStructure, doCommand, getColumnHeaderLayer, getCommandClass, getCopyLayer, getRowHeaderLayer, getSelectedColumnPositions, isEmpty, setCopyFormattedText, setCopyLayerMethods inherited from class org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler
doCommand
-
Constructor Details
-
HierarchicalTreeCopyDataCommandHandler
public HierarchicalTreeCopyDataCommandHandler(SelectionLayer selectionLayer, HierarchicalTreeLayer treeLayer, InternalCellClipboard clipboard) Creates an instance that only checks theSelectionLayerfor data to add to the clipboard.- Parameters:
selectionLayer- TheSelectionLayerwithin the NatTable. Can not benull.treeLayer- TheHierarchicalTreeLayerthat will be used as copyLayer from which the cells are identified to copy.clipboard- TheInternalCellClipboardthat should be used for copy/paste operations within a NatTable instance.
-
HierarchicalTreeCopyDataCommandHandler
public HierarchicalTreeCopyDataCommandHandler(SelectionLayer selectionLayer, HierarchicalTreeLayer treeLayer, ILayer columnHeaderLayer, InternalCellClipboard clipboard) Creates an instance that checks theSelectionLayerand the column header layer if given for data to add to the clipboard.- Parameters:
selectionLayer- TheSelectionLayerwithin the NatTable. Can not benull.treeLayer- TheHierarchicalTreeLayerthat will be used as copyLayer from which the cells are identified to copy.columnHeaderLayer- The column header layer within the NatTable grid. Can benull.clipboard- TheInternalCellClipboardthat should be used for copy/paste operations within a NatTable instance.
-
-
Method Details
-
isCopyAllowed
Description copied from class:CopyDataCommandHandlerChecks if the given cell can be copied.- Overrides:
isCopyAllowedin classCopyDataCommandHandler- Parameters:
cellToCopy- TheILayerCellthat should be copied.- Returns:
trueif the cell can be copied,falseif a copy operation for that cell should be avoided.
-