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
clipboard
Fields inherited from class org.eclipse.nebula.widgets.nattable.copy.command.CopyDataCommandHandler
selectionLayer
-
Constructor Summary
ConstructorDescriptionHierarchicalTreeCopyDataCommandHandler
(SelectionLayer selectionLayer, HierarchicalTreeLayer treeLayer, InternalCellClipboard clipboard) Creates an instance that only checks theSelectionLayer
for data to add to the clipboard.HierarchicalTreeCopyDataCommandHandler
(SelectionLayer selectionLayer, HierarchicalTreeLayer treeLayer, ILayer columnHeaderLayer, InternalCellClipboard clipboard) Creates an instance that checks theSelectionLayer
and the column header layer if given for data to add to the clipboard. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isCopyAllowed
(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, preInternalCopy
Methods inherited from class org.eclipse.nebula.widgets.nattable.copy.command.CopyDataCommandHandler
assembleColumnHeaders, assembleCopiedDataStructure, doCommand, getColumnHeaderLayer, getCommandClass, getCopyLayer, getRowHeaderLayer, getSelectedColumnPositions, isEmpty, setCopyFormattedText, setCopyLayer
Methods 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 theSelectionLayer
for data to add to the clipboard.- Parameters:
selectionLayer
- TheSelectionLayer
within the NatTable. Can not benull
.treeLayer
- TheHierarchicalTreeLayer
that will be used as copyLayer from which the cells are identified to copy.clipboard
- TheInternalCellClipboard
that 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 theSelectionLayer
and the column header layer if given for data to add to the clipboard.- Parameters:
selectionLayer
- TheSelectionLayer
within the NatTable. Can not benull
.treeLayer
- TheHierarchicalTreeLayer
that 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
- TheInternalCellClipboard
that should be used for copy/paste operations within a NatTable instance.
-
-
Method Details
-
isCopyAllowed
Description copied from class:CopyDataCommandHandler
Checks if the given cell can be copied.- Overrides:
isCopyAllowed
in classCopyDataCommandHandler
- Parameters:
cellToCopy
- TheILayerCell
that should be copied.- Returns:
true
if the cell can be copied,false
if a copy operation for that cell should be avoided.
-