Home » Eclipse Projects » NatTable » when scroling horizontally, nattable filter stop working
when scroling horizontally, nattable filter stop working [message #1225810] |
Mon, 30 December 2013 16:41  |
Eclipse User |
|
|
|
I have 14 columns in my nattable example, to see the value of the lasts column (11 to 14) i should scroll horizontally.
When i filter my table without scrolling horizontally, every think work fine, but when i scroll to other columns and try filter, the inserted value (in the filter) is inserted in the the above column and the filter doesn't work.
19:57:12,880 ERROR [DefaultGlazedListsFilterStrategy] Error on applying a filter
java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.Arrays$ArrayList.get(Arrays.java:3381)
at org.eclipse.nebula.widgets.nattable.data.ReflectiveColumnPropertyAccessor.getColumnProperty(ReflectiveColumnPropertyAccessor.java:79)
at org.eclipse.nebula.widgets.nattable.data.ExtendedReflectiveColumnPropertyAccessor.getDataValue(ExtendedReflectiveColumnPropertyAccessor.java:25)
at org.eclipse.nebula.widgets.nattable.extension.glazedlists.filterrow.DefaultGlazedListsFilterStrategy$2.getFilterStrings(DefaultGlazedListsFilterStrategy.java:227)
at ca.odell.glazedlists.impl.filter.TextMatchers.matches(TextMatchers.java:82)
at ca.odell.glazedlists.impl.filter.TextMatcher.matches(TextMatcher.java:110)
at ca.odell.glazedlists.impl.matchers.OrMatcher.matches(OrMatcher.java:23)
at ca.odell.glazedlists.impl.matchers.AndMatcher.matches(AndMatcher.java:23)
at ca.odell.glazedlists.FilterList.constrained(FilterList.java:391)
at ca.odell.glazedlists.FilterList.changeMatcher(FilterList.java:295)
at ca.odell.glazedlists.FilterList.changeMatcherWithLocks(FilterList.java:276)
at ca.odell.glazedlists.FilterList.access$100(FilterList.java:51)
at ca.odell.glazedlists.FilterList$PrivateMatcherEditorListener.changedMatcher(FilterList.java:453)
at ca.odell.glazedlists.matchers.AbstractMatcherEditorListenerSupport.fireChangedMatcher(AbstractMatcherEditorListenerSupport.java:41)
at ca.odell.glazedlists.matchers.AbstractMatcherEditor.fireConstrained(AbstractMatcherEditor.java:59)
at ca.odell.glazedlists.matchers.CompositeMatcherEditor$MatcherEditorsListListener.listChanged(CompositeMatcherEditor.java:132)
at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:424)
at ca.odell.glazedlists.event.ListEventAssembler$ListEventFormat.fire(ListEventAssembler.java:421)
at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher$SubjectAndListener.firePendingEvent(SequenceDependenciesEventPublisher.java:445)
at ca.odell.glazedlists.event.SequenceDependenciesEventPublisher.fireEvent(SequenceDependenciesEventPublisher.java:344)
at ca.odell.glazedlists.event.ListEventAssembler.commitEvent(ListEventAssembler.java:317)
at ca.odell.glazedlists.BasicEventList.addAll(BasicEventList.java:167)
at ca.odell.glazedlists.BasicEventList.addAll(BasicEventList.java:149)
at org.eclipse.nebula.widgets.nattable.extension.glazedlists.filterrow.DefaultGlazedListsFilterStrategy.applyFilter(DefaultGlazedListsFilterStrategy.java:157)
at org.eclipse.nebula.widgets.nattable.filterrow.FilterRowDataProvider.setDataValue(FilterRowDataProvider.java:168)
at org.eclipse.nebula.widgets.nattable.layer.DataLayer.setDataValue(DataLayer.java:144)
at org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommandHandler.doCommand(UpdateDataCommandHandler.java:54)
at org.eclipse.nebula.widgets.nattable.edit.command.UpdateDataCommandHandler.doCommand(UpdateDataCommandHandler.java:1)
at org.eclipse.nebula.widgets.nattable.command.AbstractLayerCommandHandler.doCommand(AbstractLayerCommandHandler.java:19)
at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.doCommand(AbstractLayer.java:162)
at org.eclipse.nebula.widgets.nattable.layer.DataLayer.doCommand(DataLayer.java:422)
at org.eclipse.nebula.widgets.nattable.filterrow.FilterRowDataLayer.doCommand(FilterRowDataLayer.java:68)
at org.eclipse.nebula.widgets.nattable.grid.layer.DimensionallyDependentLayer.doCommand(DimensionallyDependentLayer.java:149)
at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer.doCommandOnChildLayers(CompositeLayer.java:140)
|
|
| |
Re: when scroling horizontally, nattable filter stop working [message #1225982 is a reply to message #1225945] |
Tue, 31 December 2013 05:18   |
Eclipse User |
|
|
|
Hello Dirk Fauth, thank you for your fast reply, i use the last version of nattable (1.0.1).
The first think that come to my mind was the size of the array and the map but the size size is the same.
Here is my code :
propertyNames = new String[] { "numero_facture", "date_facture",
"date_echeance", "montant_facture", "montant_ttc", "remise",
"montant_remise", "montant_regle", "montant_non_regle",
"client.nom_prenom", "timbre", "montantTva", "etat",
"mode_paiement" };
propertyToLabels = new HashMap<String, String>();
propertyToLabels.put("numero_facture", "numero");
propertyToLabels.put("date_facture", "date");
propertyToLabels.put("date_echeance", "date_echeance");
propertyToLabels.put("montant_facture", "montant_facture");
propertyToLabels.put("montant_ttc", "montant_ttc");
propertyToLabels.put("remise", "remise");
propertyToLabels.put("montant_remise", "montant_remise");
propertyToLabels.put("montant_regle", "montant_regle");
propertyToLabels.put("montant_non_regle", "montant_non_regle");
propertyToLabels.put("client.nom_prenom", "client");
propertyToLabels.put("timbre", "timbre");
propertyToLabels.put("montantTva", "montantTva");
propertyToLabels.put("etat", "etat");
propertyToLabels.put("mode_paiement", "mode_paiement");
derivedColumnPropertyAccessor = new ExtendedReflectiveColumnPropertyAccessor<Facture>(
propertyNames);
EventList<Facture> model = GlazedLists.eventList(DataManager
.chargerFactureVente());
filterList = new FilterList<Facture>(model);
provider = new ListDataProvider<Facture>(filterList,
derivedColumnPropertyAccessor);
DefaultColumnHeaderDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
propertyNames, propertyToLabels);
// Creation de la pile de layers centrale
IConfigRegistry configRegistry = new ConfigRegistry();
// Modele de groupement des donnees
GroupByModel groupByModel = new GroupByModel();
GroupByDataLayer<Facture> bodyDataLayer = new GroupByDataLayer(
groupByModel, filterList, derivedColumnPropertyAccessor);
// Creation de la ligne "sommaire" au travers d'un layer
bodyDataLayer.setConfigLabelAccumulator(new ColumnLabelAccumulator());
ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
bodyDataLayer);
ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(
columnReorderLayer);
SelectionLayer selectionLayer = new SelectionLayer(columnHideShowLayer);
// SelectionLayer selectionLayer = new SelectionLayer(summaryRowLayer);
TreeLayer treeLayer = new TreeLayer(selectionLayer,
bodyDataLayer.getTreeRowModel());
ViewportLayer bodyLayer = new ViewportLayer(treeLayer);
// Creation des colonnes
DefaultColumnHeaderDataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
columnHeaderDataProvider);
ColumnHeaderLayer columnHeaderLayer = new ColumnHeaderLayer(
columnHeaderDataLayer, bodyLayer, selectionLayer);
// Ajout des filtres
DefaultGlazedListsFilterStrategy<Facture> filterStrategy = new DefaultGlazedListsFilterStrategy<Facture>(
filterList, derivedColumnPropertyAccessor, configRegistry);
FilterRowHeaderComposite<Facture> filterHeaderLayer = new FilterRowHeaderComposite(
filterStrategy, columnHeaderLayer, columnHeaderDataProvider,
configRegistry);
// Creation des lignes
DefaultRowHeaderDataProvider rowHeaderDataProvider = new DefaultRowHeaderDataProvider(
provider);
RowHeaderLayer rowHeaderLayer = new RowHeaderLayer(
new DefaultRowHeaderDataLayer(rowHeaderDataProvider),
bodyLayer, selectionLayer);
// Creation du coin superieur
DefaultCornerDataProvider cornerDataProvider = new DefaultCornerDataProvider(
columnHeaderDataProvider, rowHeaderDataProvider);
CornerLayer cornerLayer = new CornerLayer(new DataLayer(
cornerDataProvider), rowHeaderLayer, filterHeaderLayer);
// Creation du layer global
GridLayer gridLayer = new GridLayer(bodyLayer, filterHeaderLayer,
rowHeaderLayer, cornerLayer, true);
CompositeLayer compositeGridLayer = new CompositeLayer(1, 2);
final GroupByHeaderLayer groupByHeaderLayer = new GroupByHeaderLayer(
groupByModel, gridLayer, columnHeaderDataProvider);
compositeGridLayer.setChildLayer(GroupByHeaderLayer.GROUP_BY_REGION,
groupByHeaderLayer, 0, 0);
compositeGridLayer.setChildLayer("Grid", gridLayer, 0, 1);
final NatTable natTable = new NatTable(parent, compositeGridLayer,
false);
natTable.setConfigRegistry(configRegistry);
natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
// Configuration de la ligne "sommaire"
// natTable.addConfiguration(new LandingsSummaryRowConfig(provider));
// Configuration du tri sur les lignes
natTable.addConfiguration(new HeaderMenuConfiguration(natTable));
// Configuration des filtres
natTable.addConfiguration(new LandingsFilterConfiguration());
// Configuration du groupement de donnees
natTable.addConfiguration(new GroupByHeaderMenuConfiguration(natTable,
groupByHeaderLayer));
natTable.addConfiguration(new HeaderMenuConfiguration(natTable) {
@Override
protected PopupMenuBuilder createCornerMenu(NatTable natTable) {
return super.createCornerMenu(natTable)
.withStateManagerMenuItemProvider();
}
});
natTable.configure();
natTable.registerCommandHandler(new DisplayPersistenceDialogCommandHandler(
natTable));
// Creation des evenements de selection
ISelectionProvider selectionProvider = new RowSelectionProvider(
selectionLayer, provider, false);
selectionProvider
.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection = (IStructuredSelection) event
.getSelection();
Iterator<?> it = selection.iterator();
while (it.hasNext()) {
Facture data = (Facture) it.next();
System.out.println("Selection of data: "
+ data.getNumero_facture()
+ data.getDate_facture() + " client"
+ data.getClient().getNom_prenom());
}
}
});
return natTable;
thank you in advance
|
|
| | | | | |
Re: when scroling horizontally, nattable filter stop working [message #1226345 is a reply to message #1226277] |
Wed, 01 January 2014 08:04   |
Eclipse User |
|
|
|
Hello , after a very deep code analyse, i realise when adding the FreezeLayer to the nattable, the problem has gone. But without adding the freezeLayer, the problem appear when the grouping is active. Here is the code of an example that work fine with and without grouping :
protected NatTable createNatTable(Composite parent) {
propertyAndMapperDefinition();
final NatTable natTable = filterWithGroupByExample(parent);
// final NatTable natTable = filterWithoutGroupByExample(parent);
return natTable;
}
protected NatTable filterWithGroupByExample(Composite parent) {
// create a new ConfigRegistry which will be needed for GlazedLists
// handling
List<Facture> factureList = DataManager
.chargerFactureVente();
EventList<Facture> eventList = GlazedLists.eventList(factureList);
filterList = new FilterList<Facture>(eventList);
GroupByModel groupByModel = new GroupByModel();
ConfigRegistry configRegistry = new ConfigRegistry();
derivedColumnPropertyAccessor = new ExtendedReflectiveColumnPropertyAccessor<Facture>(
propertyNames);
configRegistry.registerConfigAttribute(
GroupByConfigAttributes.GROUP_BY_SUMMARY_PROVIDER,
new SummationGroupBySummaryProvider<Facture>(
derivedColumnPropertyAccessor), DisplayMode.NORMAL,
GroupByDataLayer.GROUP_BY_COLUMN_PREFIX + "3");
configRegistry.registerConfigAttribute(
GroupByConfigAttributes.GROUP_BY_SUMMARY_PROVIDER,
new SummationGroupBySummaryProvider<Facture>(
derivedColumnPropertyAccessor), DisplayMode.NORMAL,
GroupByDataLayer.GROUP_BY_COLUMN_PREFIX + "4");
GroupByDataLayer<Facture> bodyDataLayer = new GroupByDataLayer<Facture>(
groupByModel, filterList, derivedColumnPropertyAccessor,
configRegistry);
// Body layer
ColumnReorderLayer columnReorderLayer = new ColumnReorderLayer(
bodyDataLayer);
ColumnHideShowLayer columnHideShowLayer = new ColumnHideShowLayer(
columnReorderLayer);
SelectionLayer selectionLayer = new SelectionLayer(columnHideShowLayer);
TreeLayer treeLayer = new TreeLayer(selectionLayer,
bodyDataLayer.getTreeRowModel());
/*
FreezeLayer freeze = new FreezeLayer(treeLayer);
*/
ViewportLayer viewportLayer = new ViewportLayer(treeLayer);
/*
CompositeFreezeLayer compFreeze = new CompositeFreezeLayer(freeze, viewportLayer, selectionLayer);
*/
provider = new ListDataProvider<Facture>(filterList,
derivedColumnPropertyAccessor);
// Column header layer
IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
propertyNames, propertyToLabels);
DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
columnHeaderDataProvider);
ColumnHeaderLayer columnHeaderLayer = new ColumnHeaderLayer(
columnHeaderDataLayer, /*compFreeze*/ viewportLayer, selectionLayer);
// Note: The column header layer is wrapped in a filter row composite.
// This plugs in the filter row functionality
DefaultGlazedListsFilterStrategy<Facture> filterStrategy = new DefaultGlazedListsFilterStrategy<Facture>(
filterList, derivedColumnPropertyAccessor, configRegistry);
FilterRowHeaderComposite<Facture> filterHeaderLayer = new FilterRowHeaderComposite<Facture>(
filterStrategy, columnHeaderLayer,
columnHeaderDataLayer.getDataProvider(), configRegistry);
ColumnOverrideLabelAccumulator bodyLabelAccumulator = new ColumnOverrideLabelAccumulator(
columnHeaderDataLayer);
bodyDataLayer.setConfigLabelAccumulator(bodyLabelAccumulator);
// Row header layer
IDataProvider rowHeaderDataProvider = new DefaultRowHeaderDataProvider(
provider);
DefaultRowHeaderDataLayer rowHeaderDataLayer = new DefaultRowHeaderDataLayer(rowHeaderDataProvider);
RowHeaderLayer rowHeaderLayer = new RowHeaderLayer(
rowHeaderDataLayer,
viewportLayer, selectionLayer);
// Corner layer
DefaultCornerDataProvider cornerDataProvider = new DefaultCornerDataProvider(
columnHeaderDataProvider, rowHeaderDataProvider);
DataLayer cornerDataLayer = new DataLayer(
cornerDataProvider);
CornerLayer cornerLayer = new CornerLayer(cornerDataLayer, rowHeaderLayer, filterHeaderLayer);
// Grid
GridLayer gridLayer = new GridLayer(/*compFreeze*/viewportLayer, filterHeaderLayer,
rowHeaderLayer, cornerLayer,true);
CompositeLayer compositeGridLayer = new CompositeLayer(1, 2);
final GroupByHeaderLayer groupByHeaderLayer = new GroupByHeaderLayer(
groupByModel, gridLayer, columnHeaderDataProvider);
compositeGridLayer.setChildLayer(GroupByHeaderLayer.GROUP_BY_REGION,
groupByHeaderLayer, 0, 0);
compositeGridLayer.setChildLayer("Grid", gridLayer, 0, 1);
final NatTable natTable = new NatTable(parent, compositeGridLayer,
false);
natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
natTable.addConfiguration(new GroupByHeaderMenuConfiguration(natTable,
groupByHeaderLayer));
natTable.addConfiguration(new HeaderMenuConfiguration(natTable));
natTable.addConfiguration(new HoverAndHeaderStyleConfiguration());
natTable.addConfiguration(new LandingsFilterConfiguration());
natTable.setConfigRegistry(configRegistry);
natTable.configure();
natTable.registerCommandHandler(new DisplayPersistenceDialogCommandHandler(
natTable));
// Creation des evenements de selection
ISelectionProvider selectionProvider = new RowSelectionProvider<Facture>(
selectionLayer, provider, false);
selectionProvider
.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection = (IStructuredSelection) event
.getSelection();
Iterator<?> it = selection.iterator();
while (it.hasNext()) {
Facture data = (Facture) it.next();
System.out.println("Selection of data: "
+ data.getNumero_facture()
+ data.getDate_facture() + " client"
+ data.getClient().getNom_prenom());
}
}
});
return natTable;
}
protected NatTable filterWithoutGroupByExample(Composite parent) {
// create a new ConfigRegistry which will be needed for GlazedLists
// handling
ConfigRegistry configRegistry = new ConfigRegistry();
derivedColumnPropertyAccessor = new ExtendedReflectiveColumnPropertyAccessor<Facture>(
propertyNames);
List<Facture> facturesList = DataManager.chargerFactureVente();
BodyLayerStack<Facture> bodyDataLayer = new BodyLayerStack<Facture>(
facturesList, derivedColumnPropertyAccessor);
// build the column header layer
IDataProvider columnHeaderDataProvider = new DefaultColumnHeaderDataProvider(
propertyNames, propertyToLabels);
DataLayer columnHeaderDataLayer = new DefaultColumnHeaderDataLayer(
columnHeaderDataProvider);
ILayer columnHeaderLayer = new ColumnHeaderLayer(columnHeaderDataLayer,
bodyDataLayer, bodyDataLayer.getSelectionLayer());
// Note: The column header layer is wrapped in a filter row composite.
// This plugs in the filter row functionality
DefaultGlazedListsFilterStrategy<Facture> filterStrategy = new DefaultGlazedListsFilterStrategy<Facture>(
bodyDataLayer.getFilterList(), derivedColumnPropertyAccessor,
configRegistry);
FilterRowHeaderComposite<Facture> filterHeaderLayer = new FilterRowHeaderComposite<Facture>(
filterStrategy, columnHeaderLayer,
columnHeaderDataLayer.getDataProvider(), configRegistry);
// build the row header layer
IDataProvider rowHeaderDataProvider = new DefaultRowHeaderDataProvider(
bodyDataLayer.getBodyDataProvider());
ILayer rowHeaderLayer = new RowHeaderLayer(
new DefaultRowHeaderDataLayer(rowHeaderDataProvider),
bodyDataLayer, bodyDataLayer.getSelectionLayer());
// build the corner layer
IDataProvider cornerDataProvider = new DefaultCornerDataProvider(
columnHeaderDataProvider, rowHeaderDataProvider);
DataLayer cornerDataLayer = new DataLayer(cornerDataProvider);
ILayer cornerLayer = new CornerLayer(cornerDataLayer, rowHeaderLayer,
filterHeaderLayer);
// build the grid layer
GridLayer gridLayer = new GridLayer(bodyDataLayer, filterHeaderLayer,
rowHeaderLayer, cornerLayer);
// turn the auto configuration off as we want to add our header menu
// configuration
final NatTable natTable = new NatTable(parent, gridLayer, false);
// as the autoconfiguration of the NatTable is turned off, we have to
// add the
// DefaultNatTableStyleConfiguration and the ConfigRegistry manually
natTable.setConfigRegistry(configRegistry);
// Configuration des filtres
natTable.addConfiguration(new HoverAndHeaderStyleConfiguration());
natTable.addConfiguration(new LandingsFilterConfiguration());
natTable.addConfiguration(new DefaultNatTableStyleConfiguration());
natTable.addConfiguration(new HeaderMenuConfiguration(natTable) {
@Override
protected PopupMenuBuilder createCornerMenu(NatTable natTable) {
return super.createCornerMenu(natTable)
.withStateManagerMenuItemProvider();
}
});
natTable.configure();
natTable.registerCommandHandler(new DisplayPersistenceDialogCommandHandler(
natTable));
return natTable;
}
protected void propertyAndMapperDefinition() {
propertyNames = new String[] { "numero_facture", "date_facture",
"date_echeance", "montant_facture", "montant_ttc",
"client.nom_prenom", "remise", "montant_remise",
"montant_regle", "montant_non_regle",
"timbre", "montantTva", "etat", "mode_paiement" };
propertyToLabels = new HashMap<String, String>();
propertyToLabels.put("numero_facture", "numero");
propertyToLabels.put("date_facture", "date");
propertyToLabels.put("date_echeance", "date_echeance");
propertyToLabels.put("montant_facture", "montant_facture");
propertyToLabels.put("montant_ttc", "montant_ttc");
propertyToLabels.put("client.nom_prenom", "client");
propertyToLabels.put("remise", "remise");
propertyToLabels.put("montant_remise", "montant_remise");
propertyToLabels.put("montant_regle", "montant_regle");
propertyToLabels.put("montant_non_regle", "montant_non_regle");
propertyToLabels.put("timbre", "timbre");
propertyToLabels.put("montantTva", "montantTva");
propertyToLabels.put("etat", "etat");
propertyToLabels.put("mode_paiement", "mode_paiement");
}
public class FilterConfiguration extends
AbstractRegistryConfiguration {
@Override
public void configureRegistry(IConfigRegistry configRegistry) {
// Affichage de l'icone de tri meme si inactif
// configRegistry.registerConfigAttribute(
// CellConfigAttributes.CELL_PAINTER,
// new FilterRowPainter(new FilterIconPainter(GUIHelper
// .getImage("filter"))), DisplayMode.NORMAL,
// GridRegion.FILTER_ROW);
/*
* "numero_facture", "date_facture", "date_echeance",
* "montant_facture", "montant_ttc", "remise", "montant_remise",
* "montant_regle", "montant_non_regle", "client", "timbre",
* "montantTva", "etat", "mode_paiement" };
*/
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_MATCHING_MODE,
TextMatchingMode.EXACT, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 0);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_MATCHING_MODE,
TextMatchingMode.EXACT, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 1);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_MATCHING_MODE,
TextMatchingMode.EXACT, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 2);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.FILTER_DISPLAY_CONVERTER,
doubleDisplayConverter, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 3);
ICellEditor textCell = new TextFilter();
configRegistry.registerConfigAttribute(
EditConfigAttributes.CELL_EDITOR, textCell,
DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 3);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_MATCHING_MODE,
TextMatchingMode.REGULAR_EXPRESSION, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 3);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_MATCHING_MODE,
TextMatchingMode.STARTS_WITH, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 4);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_MATCHING_MODE,
TextMatchingMode.EXACT, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 5);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_MATCHING_MODE,
TextMatchingMode.EXACT, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 6);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_MATCHING_MODE,
TextMatchingMode.EXACT, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 7);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_MATCHING_MODE,
TextMatchingMode.EXACT, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 8);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_MATCHING_MODE,
TextMatchingMode.CONTAINS, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 9);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_MATCHING_MODE,
TextMatchingMode.EXACT, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 10);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_MATCHING_MODE,
TextMatchingMode.EXACT, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 11);
ICellEditor comboBoxCellEditor = new ComboBoxCellEditor(
Arrays.asList(Messages.getString("factureReglee"),
Messages.getString("factureNonReglee")));
configRegistry.registerConfigAttribute(
EditConfigAttributes.CELL_EDITOR, comboBoxCellEditor,
DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 12);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_MATCHING_MODE,
TextMatchingMode.EXACT, DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 13);
// Application
// du
// style
// sur
// le
// background
// de
// la
// ligne
// de
// filtre
final Style rowStyle = new Style();
rowStyle.setAttributeValue(CellStyleAttributes.BACKGROUND_COLOR,
GUIHelper.getColor(197, 212, 231));
configRegistry.registerConfigAttribute(
CellConfigAttributes.CELL_STYLE, rowStyle,
DisplayMode.NORMAL, GridRegion.FILTER_ROW);
configRegistry.registerConfigAttribute(
FilterRowConfigAttributes.TEXT_DELIMITER, "et"); //$NON-NLS-1$
}
}
[Updated on: Thu, 02 January 2014 07:13] by Moderator
|
|
| | | | | | | | | |
Goto Forum:
Current Time: Wed Jul 23 19:15:33 EDT 2025
Powered by FUDForum. Page generated in 0.04568 seconds
|