Revision bcc1d18a
Added by Patrick Plitzner over 5 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorE4Composite.java | ||
---|---|---|
91 | 91 |
|
92 | 92 |
public static final String TYPE_PROPERTY = Messages.BulkEditorE4_TYPE; |
93 | 93 |
|
94 |
public static final String ID_PROPERTY = "Id"; |
|
94 |
public static final String ID_PROPERTY = "Id"; //$NON-NLS-1$
|
|
95 | 95 |
|
96 |
public static final String UUID_PROPERTY = "Uuid"; |
|
96 |
public static final String UUID_PROPERTY = "Uuid"; //$NON-NLS-1$
|
|
97 | 97 |
|
98 |
public static final String CANDIDATE_LABEL = "candidate"; |
|
98 |
public static final String CANDIDATE_LABEL = "candidate"; //$NON-NLS-1$
|
|
99 | 99 |
|
100 |
public static final String TARGET_LABEL = "target"; |
|
100 |
public static final String TARGET_LABEL = "target"; //$NON-NLS-1$
|
|
101 | 101 |
|
102 |
public static final List<String> columnList = new ArrayList<>();
|
|
102 |
private final List<String> columnList = new ArrayList<>();
|
|
103 | 103 |
|
104 | 104 |
private Composite topComposite; |
105 | 105 |
|
... | ... | |
183 | 183 |
//sorted list |
184 | 184 |
SortedList<CdmBase> sortedList = new SortedList<>(bulkEditor.getEditorInput().getModel(), bulkEditor.getEditorInput().getTitleComparator()); |
185 | 185 |
//data provider |
186 |
BulkEditorPropertyAccessor columnPropertyAccessor = new BulkEditorPropertyAccessor(bulkEditor.getEditorInput()); |
|
186 |
BulkEditorPropertyAccessor columnPropertyAccessor = new BulkEditorPropertyAccessor(this, bulkEditor.getEditorInput());
|
|
187 | 187 |
bodyDataProvider = new ListDataProvider<CdmBase>(sortedList, |
188 | 188 |
columnPropertyAccessor); |
189 | 189 |
DefaultColumnHeaderDataProvider colHeaderDataProvider = new DefaultColumnHeaderDataProvider( |
... | ... | |
295 | 295 |
public void configureUiBindings( |
296 | 296 |
UiBindingRegistry uiBindingRegistry) { |
297 | 297 |
// add e4 menu to NatTable |
298 |
new PopupMenuBuilder(natTable, e4Menu) |
|
299 |
.build(); |
|
298 |
new PopupMenuBuilder(natTable, e4Menu) |
|
299 |
.withHideColumnMenuItem() |
|
300 |
.withShowAllColumnsMenuItem() |
|
301 |
.build(); |
|
300 | 302 |
|
301 | 303 |
// register the UI binding for header, corner and body region |
302 | 304 |
uiBindingRegistry.registerMouseDownBinding( |
... | ... | |
352 | 354 |
natTable.doCommand(new VisualRefreshCommand()); |
353 | 355 |
} |
354 | 356 |
|
357 |
public List<String> getColumnList() { |
|
358 |
return columnList; |
|
359 |
} |
|
360 |
|
|
355 | 361 |
public IStructuredSelection getSelection(){ |
356 | 362 |
List<CdmBase> selection = new ArrayList<>(); |
357 | 363 |
int[] fullySelectedRowPositions = bodyLayer.getSelectionLayer().getFullySelectedRowPositions(); |
... | ... | |
378 | 384 |
} |
379 | 385 |
|
380 | 386 |
public void copyDataToClipboard() { |
381 |
String textData = ""; |
|
387 |
String textData = ""; //$NON-NLS-1$
|
|
382 | 388 |
IStructuredSelection selection = getSelection(); |
383 | 389 |
Object[] objects = selection.toArray(); |
384 | 390 |
for (Object object : objects) { |
Also available in: Unified diff
ref #7502 Add option to hide and show columns