]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.browsing.ui.nattable/src/org/simantics/browsing/ui/nattable/override/CopyFormattedTextToClipboardSerializer.java
Sync git svn branch with SVN repository r33144.
[simantics/platform.git] / bundles / org.simantics.browsing.ui.nattable / src / org / simantics / browsing / ui / nattable / override / CopyFormattedTextToClipboardSerializer.java
1 /*******************************************************************************
2  * Copyright (c) 2012 Original authors and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  *     Original authors and others - initial API and implementation
10  ******************************************************************************/
11 package org.simantics.browsing.ui.nattable.override;
12
13 import org.eclipse.nebula.widgets.nattable.copy.command.CopyDataToClipboardCommand;
14 import org.eclipse.nebula.widgets.nattable.layer.cell.CellDisplayConversionUtils;
15 import org.eclipse.nebula.widgets.nattable.layer.cell.ILayerCell;
16
17 public class CopyFormattedTextToClipboardSerializer extends
18         CopyDataToClipboardSerializer {
19
20     public CopyFormattedTextToClipboardSerializer(ILayerCell[][] copiedCells,
21             CopyDataToClipboardCommand command) {
22         super(copiedCells, command);
23     }
24
25     @Override
26     protected String getTextForCell(ILayerCell cell) {
27         return CellDisplayConversionUtils.convertDataType(cell, getCommand()
28                 .getConfigRegistry());
29     }
30 }