Project

General

Profile

Revision 16725f1e

ID16725f1e3ba4a2e318a1525d6ef646d8e0e29647
Parent 62b85f1d
Child 38c05df2

Added by Patrick Plitzner almost 4 years ago

ref #7095 Disable sorting

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/workingSet/matrix/CharacterMatrix.java
55 55
import org.eclipse.nebula.widgets.nattable.export.command.ExportCommand;
56 56
import org.eclipse.nebula.widgets.nattable.export.command.ExportCommandHandler;
57 57
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsEventLayer;
58
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsSortModel;
59 58
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.tree.GlazedListTreeData;
60 59
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.tree.GlazedListTreeRowModel;
61 60
import org.eclipse.nebula.widgets.nattable.grid.GridRegion;
......
86 85
import org.eclipse.nebula.widgets.nattable.reorder.RowReorderLayer;
87 86
import org.eclipse.nebula.widgets.nattable.selection.SelectionLayer;
88 87
import org.eclipse.nebula.widgets.nattable.selection.event.CellSelectionEvent;
89
import org.eclipse.nebula.widgets.nattable.sort.SortHeaderLayer;
90
import org.eclipse.nebula.widgets.nattable.sort.config.SingleClickSortConfiguration;
91 88
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
92 89
import org.eclipse.nebula.widgets.nattable.summaryrow.FixedSummaryRowLayer;
93
import org.eclipse.nebula.widgets.nattable.summaryrow.ISummaryProvider;
94
import org.eclipse.nebula.widgets.nattable.summaryrow.SummaryRowConfigAttributes;
95 90
import org.eclipse.nebula.widgets.nattable.summaryrow.SummaryRowLayer;
96 91
import org.eclipse.nebula.widgets.nattable.tree.ITreeRowModel;
97 92
import org.eclipse.nebula.widgets.nattable.tree.TreeLayer;
......
260 255
        ViewportLayer
261 256

  
262 257
             ^
258
        TreeLayer
259

  
260
             ^
263 261
        SelectionLayer
264 262

  
265 263
             ^
......
311 309
        TreeLayer treeLayer = new TreeLayer(selectionLayer, treeRowModel);
312 310
        ViewportLayer viewportLayer = new ViewportLayer(treeLayer);
313 311

  
314
        configRegistry.registerConfigAttribute(
315
                SummaryRowConfigAttributes.SUMMARY_PROVIDER,
316
                new ISummaryProvider() {
317

  
318
                    @Override
319
                    public Object summarize(int columnIndex) {
320
                        // TODO Auto-generated method stub
321
                        return null;
322
                    }
323
                },
324
                DisplayMode.NORMAL,
325
                COUNTRY_COLUMN);
326

  
327

  
328 312
        // create a standalone FixedSummaryRowLayer
329 313
        // since the summary row should be fixed at the top of the body
330 314
        // region the horizontal dependency of the FixedSummaryRowLayer
......
349 333
        composite.setChildLayer(GridRegion.BODY, viewportLayer, 0, 1);
350 334

  
351 335

  
352

  
353

  
354 336
        /**
355 337
         * column header layer
356 338
         */
......
362 344
        // add the SortHeaderLayer to the column header layer stack
363 345
        // as we use GlazedLists, we use the GlazedListsSortModel which
364 346
        // delegates the sorting to the SortedList
365
        final SortHeaderLayer<SpecimenDescription> sortHeaderLayer = new SortHeaderLayer<>(
366
                columnHeaderLayer,
367
                new GlazedListsSortModel<>(
368
                        sortedList,
369
                        columnPropertyAccessor,
370
                        configRegistry,
371
                        columnHeaderDataLayer));
347
        //TODO currently disabled sorting because of tree list
348
//        final SortHeaderLayer<SpecimenDescription> sortHeaderLayer = new SortHeaderLayer<>(
349
//                columnHeaderLayer,
350
//                new GlazedListsSortModel<>(
351
//                        sortedList,
352
//                        columnPropertyAccessor,
353
//                        configRegistry,
354
//                        columnHeaderDataLayer));
372 355

  
373 356

  
374 357
        /**
......
386 369
         */
387 370
        ILayer cornerLayer = new CornerLayer(
388 371
                new DataLayer(new DefaultCornerDataProvider(columnHeaderDataProvider, rowHeaderDataProvider)),
389
                fixedSummaryRowHeaderLayer, sortHeaderLayer);
372
                fixedSummaryRowHeaderLayer, columnHeaderLayer);
390 373

  
391 374

  
392 375
        /**
393 376
         * GRID layer (composition of all other layers)
394 377
         */
395
        GridLayer gridLayer = new GridLayer(composite, sortHeaderLayer, fixedSummaryRowHeaderLayer, cornerLayer);
378
        GridLayer gridLayer = new GridLayer(composite, columnHeaderLayer, fixedSummaryRowHeaderLayer, cornerLayer);
396 379

  
397 380

  
398 381

  
......
413 396

  
414 397
        // override the default sort configuration and change the mouse bindings
415 398
        // to sort on a single click
416
        natTable.addConfiguration(new SingleClickSortConfiguration());
399
        //currently removed sorting because of using the TreeConfiguration
400
//        natTable.addConfiguration(new SingleClickSortConfiguration());
417 401

  
418 402

  
419 403
        // add the header menu configuration for adding the column header menu

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)