Revision 44e7eed6
Added by Patrick Plitzner over 4 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/MatrixBodyLayerStack.java | ||
---|---|---|
20 | 20 |
import org.eclipse.nebula.widgets.nattable.hideshow.ColumnHideShowLayer; |
21 | 21 |
import org.eclipse.nebula.widgets.nattable.layer.AbstractIndexLayerTransform; |
22 | 22 |
import org.eclipse.nebula.widgets.nattable.layer.IUniqueIndexLayer; |
23 |
import org.eclipse.nebula.widgets.nattable.reorder.ColumnReorderLayer; |
|
24 | 23 |
import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer; |
25 | 24 |
import org.eclipse.nebula.widgets.nattable.util.IClientAreaProvider; |
26 | 25 |
import org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer; |
... | ... | |
32 | 31 |
*/ |
33 | 32 |
public class MatrixBodyLayerStack extends AbstractIndexLayerTransform { |
34 | 33 |
|
35 |
private final ColumnReorderLayer columnReorderLayer; |
|
36 | 34 |
private final ColumnHideShowLayer columnHideShowLayer; |
37 | 35 |
private final SelectionLayer selectionLayer; |
38 | 36 |
private final ViewportLayer viewportLayer; |
39 | 37 |
|
40 | 38 |
public MatrixBodyLayerStack(IUniqueIndexLayer underlyingLayer, LinkedList<ColumnGroupWrapper> columnGroups) { |
41 |
this.columnReorderLayer = new ColumnReorderLayer(underlyingLayer); |
|
42 | 39 |
if(columnGroups.isEmpty()){ |
43 |
this.columnHideShowLayer = new ColumnHideShowLayer(columnReorderLayer);
|
|
40 |
this.columnHideShowLayer = new ColumnHideShowLayer(underlyingLayer);
|
|
44 | 41 |
this.selectionLayer = new SelectionLayer(this.columnHideShowLayer); |
45 | 42 |
} |
46 | 43 |
else{ |
47 | 44 |
ColumnGroupModel bottomModel = columnGroups.getLast().getModel(); |
48 |
ColumnGroupReorderLayer columnGroupReorderLayer = new ColumnGroupReorderLayer(this.columnReorderLayer, bottomModel);
|
|
45 |
ColumnGroupReorderLayer columnGroupReorderLayer = new ColumnGroupReorderLayer(underlyingLayer, bottomModel);
|
|
49 | 46 |
this.columnHideShowLayer = new ColumnHideShowLayer(columnGroupReorderLayer); |
50 | 47 |
List<ColumnGroupModel> columnGroupModels = new ArrayList<>(); |
51 | 48 |
for(ColumnGroupWrapper columnGroup:columnGroups){ |
... | ... | |
66 | 63 |
super.setClientAreaProvider(clientAreaProvider); |
67 | 64 |
} |
68 | 65 |
|
69 |
public ColumnReorderLayer getColumnReorderLayer() { |
|
70 |
return this.columnReorderLayer; |
|
71 |
} |
|
72 |
|
|
73 | 66 |
public ColumnHideShowLayer getColumnHideShowLayer() { |
74 | 67 |
return this.columnHideShowLayer; |
75 | 68 |
} |
Also available in: Unified diff
ref #8450 Disable re-ordering of columns