Copies data from this table to the system clipboard. @param asFormatted true to retain table formatting @param header the table header
(boolean asFormatted, String header)
| 2716 | * @param header the table header |
| 2717 | */ |
| 2718 | public void copyTable(boolean asFormatted, String header) { |
| 2719 | StringBuffer buf = getData(asFormatted); |
| 2720 | // replace spaces with underscores in header (must be single string) |
| 2721 | header = header.replace(' ', '_'); |
| 2722 | if (!header.endsWith(XML.NEW_LINE)) |
| 2723 | header += XML.NEW_LINE; |
| 2724 | if (includeHeadersInCopiedData) |
| 2725 | OSPRuntime.copy(header + buf, null); |
| 2726 | else |
| 2727 | OSPRuntime.copy(buf.toString(), null); |
| 2728 | } |
| 2729 | |
| 2730 | /** |
| 2731 | * subclass should return the modelIndex of the first column name (comma-quoted |