Project

General

Profile

Revision 92ec40db

ID92ec40dbc4757c0bf272b0d4f6bfb26357871807
Parent bbed9d01
Child 6fd99a64

Added by Patrick Plitzner about 3 years ago

Refactor character matrix

  • code cleanup

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrix.java
64 64
import org.eclipse.nebula.widgets.nattable.tree.ITreeRowModel;
65 65
import org.eclipse.nebula.widgets.nattable.tree.TreeLayer;
66 66
import org.eclipse.nebula.widgets.nattable.util.GUIHelper;
67
import org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer;
68 67
import org.eclipse.swt.SWT;
69 68
import org.eclipse.swt.layout.GridData;
70 69
import org.eclipse.swt.layout.GridLayout;
......
129 128

  
130 129
    private FreezeLayer freezeLayer;
131 130

  
132
    private ViewportLayer viewportLayer;
133

  
134 131
    private List<Feature> features;
135 132

  
136 133
    private CharacterMatrixPart part;
......
330 327
        GlazedListTreeData treeData = new GlazedListTreeData<>(treeList);
331 328
        ITreeRowModel treeRowModel = new GlazedListTreeRowModel<>(treeData);
332 329

  
333
        bodyLayer = new DefaultBodyLayerStack(
334
                eventLayer);
335
        viewportLayer = bodyLayer.getViewportLayer();
330
        bodyLayer = new DefaultBodyLayerStack(eventLayer);
336 331
        final SelectionLayer selectionLayer = bodyLayer.getSelectionLayer();
337 332
        freezeLayer = new FreezeLayer(selectionLayer);
338 333
        final CompositeFreezeLayer compositeFreezeLayer = new CompositeFreezeLayer(
......
459 454

  
460 455
    void freezeSupplementalColumns(boolean freeze){
461 456
        if(freeze){
462
            FreezeHelper.freeze(freezeLayer, viewportLayer,
463
                    new PositionCoordinate(viewportLayer, 0, 0),
464
                    new PositionCoordinate(viewportLayer, LEADING_COLUMN_COUNT-1, -1));
457
            FreezeHelper.freeze(freezeLayer, bodyLayer.getViewportLayer(),
458
                    new PositionCoordinate(bodyLayer.getViewportLayer(), 0, 0),
459
                    new PositionCoordinate(bodyLayer.getViewportLayer(), LEADING_COLUMN_COUNT-1, -1));
465 460
        }
466 461
        else{
467
            FreezeHelper.unfreeze(freezeLayer, viewportLayer);
462
            FreezeHelper.unfreeze(freezeLayer, bodyLayer.getViewportLayer());
468 463
        }
469 464
    }
470 465

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)