Revision f9df6d49
Added by Patrick Plitzner about 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrix.java | ||
---|---|---|
68 | 68 |
import org.eclipse.nebula.widgets.nattable.summaryrow.SummaryRowLayer; |
69 | 69 |
import org.eclipse.nebula.widgets.nattable.tree.ITreeRowModel; |
70 | 70 |
import org.eclipse.nebula.widgets.nattable.tree.TreeLayer; |
71 |
import org.eclipse.nebula.widgets.nattable.ui.menu.AbstractHeaderMenuConfiguration; |
|
72 |
import org.eclipse.nebula.widgets.nattable.ui.menu.PopupMenuBuilder; |
|
73 | 71 |
import org.eclipse.nebula.widgets.nattable.util.GUIHelper; |
74 | 72 |
import org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer; |
75 | 73 |
import org.eclipse.swt.SWT; |
... | ... | |
506 | 504 |
|
507 | 505 |
// add the header menu configuration for adding the column header menu |
508 | 506 |
// with hide/show actions |
509 |
natTable.addConfiguration(new AbstractHeaderMenuConfiguration(natTable) { |
|
510 |
|
|
511 |
@Override |
|
512 |
protected PopupMenuBuilder createColumnHeaderMenu(NatTable natTable) { |
|
513 |
return super.createColumnHeaderMenu(natTable) |
|
514 |
.withHideColumnMenuItem() |
|
515 |
.withShowAllColumnsMenuItem(); |
|
516 |
} |
|
517 |
|
|
518 |
}); |
|
507 |
natTable.addConfiguration(new CharacterMatrixHeaderMenuConfiguration(natTable)); |
|
519 | 508 |
|
520 | 509 |
// add custom configuration for data conversion and add column labels to viewport layer |
521 | 510 |
topMostLayer.addConfiguration(new DataConversionConfiguration(this)); |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixHeaderMenuConfiguration.java | ||
---|---|---|
1 |
// $Id$ |
|
2 |
/** |
|
3 |
* Copyright (C) 2018 EDIT |
|
4 |
* European Distributed Institute of Taxonomy |
|
5 |
* http://www.e-taxonomy.eu |
|
6 |
* |
|
7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
|
9 |
*/ |
|
10 |
package eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix; |
|
11 |
|
|
12 |
import org.eclipse.nebula.widgets.nattable.NatTable; |
|
13 |
import org.eclipse.nebula.widgets.nattable.ui.menu.AbstractHeaderMenuConfiguration; |
|
14 |
import org.eclipse.nebula.widgets.nattable.ui.menu.PopupMenuBuilder; |
|
15 |
|
|
16 |
/** |
|
17 |
* @author pplitzner |
|
18 |
* @date 09.07.2018 |
|
19 |
* |
|
20 |
*/ |
|
21 |
final class CharacterMatrixHeaderMenuConfiguration extends AbstractHeaderMenuConfiguration { |
|
22 |
|
|
23 |
public CharacterMatrixHeaderMenuConfiguration(NatTable natTable) { |
|
24 |
super(natTable); |
|
25 |
} |
|
26 |
|
|
27 |
@Override |
|
28 |
protected PopupMenuBuilder createColumnHeaderMenu(NatTable natTable) { |
|
29 |
return super.createColumnHeaderMenu(natTable) |
|
30 |
.withHideColumnMenuItem() |
|
31 |
.withShowAllColumnsMenuItem(); |
|
32 |
} |
|
33 |
} |
Also available in: Unified diff
Refactor character matrix