如何在 eclipse 插件中向 nattable 添加过滤器?
how to add filter to nattable in an eclipse plugin?
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR,
new ComboBoxCellEditor(Arrays.asList("200536", "200538")),
DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 2);
//
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR,
new ComboBoxCellEditor(Arrays.asList("07")),
DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 3);
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);
我尝试在 nattable 中添加过滤器,但 ComboBox 尚未出现..
您需要创建一个包含过滤行的图层组合。查看我们的示例应用程序,了解如何在各种情况下完成此操作。
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR,
new ComboBoxCellEditor(Arrays.asList("200536", "200538")),
DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 2);
//
configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR,
new ComboBoxCellEditor(Arrays.asList("07")),
DisplayMode.NORMAL,
FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 3);
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);
我尝试在 nattable 中添加过滤器,但 ComboBox 尚未出现..
您需要创建一个包含过滤行的图层组合。查看我们的示例应用程序,了解如何在各种情况下完成此操作。