use of com.revolsys.swing.dnd.transferable.RecordReaderTransferable in project com.revolsys.open by revolsys.
the class AbstractRecordLayer method copyRecordsToClipboard.
public void copyRecordsToClipboard(final List<LayerRecord> records) {
if (!records.isEmpty()) {
final RecordDefinition recordDefinition = getRecordDefinition();
final List<Record> copies = new ArrayList<>();
for (final LayerRecord record : records) {
final ArrayRecord recordCopy = new ArrayRecord(recordDefinition, record);
copies.add(recordCopy);
}
final RecordReader reader = new ListRecordReader(recordDefinition, copies);
final RecordReaderTransferable transferable = new RecordReaderTransferable(reader);
ClipboardUtil.setContents(transferable);
}
}
Aggregations