Project

General

Profile

Revision e3492ca9

IDe3492ca9cf6617f0ec95be91c3d46d12f6cfe1be
Parent 8dc339f5
Child 91b9bc97

Added by Patrick Plitzner over 3 years ago

ref #7439 Make cells editabel to allow selecting text

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorE4.java
36 36
import org.eclipse.nebula.widgets.nattable.NatTable;
37 37
import org.eclipse.nebula.widgets.nattable.command.VisualRefreshCommand;
38 38
import org.eclipse.nebula.widgets.nattable.command.VisualRefreshCommandHandler;
39
import org.eclipse.nebula.widgets.nattable.config.AbstractRegistryConfiguration;
39 40
import org.eclipse.nebula.widgets.nattable.config.AbstractUiBindingConfiguration;
40 41
import org.eclipse.nebula.widgets.nattable.config.ConfigRegistry;
41 42
import org.eclipse.nebula.widgets.nattable.config.DefaultNatTableStyleConfiguration;
43
import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
44
import org.eclipse.nebula.widgets.nattable.config.IEditableRule;
42 45
import org.eclipse.nebula.widgets.nattable.data.IRowIdAccessor;
43 46
import org.eclipse.nebula.widgets.nattable.data.ListDataProvider;
47
import org.eclipse.nebula.widgets.nattable.edit.EditConfigAttributes;
44 48
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsEventLayer;
45 49
import org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsSortModel;
46 50
import org.eclipse.nebula.widgets.nattable.grid.GridRegion;
......
58 62
import org.eclipse.nebula.widgets.nattable.selection.command.SelectRowsCommand;
59 63
import org.eclipse.nebula.widgets.nattable.sort.SortHeaderLayer;
60 64
import org.eclipse.nebula.widgets.nattable.sort.config.SingleClickSortConfiguration;
65
import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
61 66
import org.eclipse.nebula.widgets.nattable.style.theme.ModernNatTableThemeConfiguration;
62 67
import org.eclipse.nebula.widgets.nattable.ui.binding.UiBindingRegistry;
63 68
import org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher;
......
277 282
            }
278 283
        });
279 284

  
285
        //make cells editable to allow selecting the text
286
        natTable.addConfiguration(new AbstractRegistryConfiguration() {
287
            @Override
288
            public void configureRegistry(IConfigRegistry configRegistry) {
289
              //make cell editable
290
                configRegistry.registerConfigAttribute(
291
                        EditConfigAttributes.CELL_EDITABLE_RULE,
292
                        IEditableRule.ALWAYS_EDITABLE,
293
                        DisplayMode.EDIT);
294
            }
295
        });
296

  
280 297
        //enable sorting
281 298
        natTable.addConfiguration(new SingleClickSortConfiguration());
282 299
        //add default configuration because autoconfigure is set to false in constructor

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)