Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Filter Row Search Icon(Filtering)
Filter Row Search Icon [message #1255606] Mon, 24 February 2014 16:24 Go to next message
prototyp 144 is currently offline prototyp 144Friend
Messages: 6
Registered: January 2014
Junior Member
Hey there,

i want to implement a painter within the filter row so that a little icon is displayed in the rightmost position of the cell.

The intent is to have a Button(Image)Painter which grabs a click event when in edit state and on click performs the action to filter the column.

My code looks like this:

natTable.addConfiguration(new DefaultFilterRowConfiguration() {
			@Override
			public void configureRegistry(IConfigRegistry configRegistry) {
				super.configureRegistry(configRegistry);

				ImagePainter iPainter = new ImagePainter(IImageConstants.ICON_MAGNIFIER);
				ButtonCellPainter painter = new ButtonCellPainter(iPainter);
				painter.addClickListener(new IMouseAction() {
					
					@Override
					public void run(NatTable paramNatTable, MouseEvent paramMouseEvent) {
						System.err.println("action!");
					}
				});
				
				CellPainterDecorator decorator = new CellPainterDecorator(cellPainter, CellEdgeEnum.RIGHT, painter);
				configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, decorator, DisplayMode.EDIT, GridRegion.FILTER_ROW);
			}
		});


Unfortunatly nothing happens. Maybe I miss something so i'd be very pleased for some advice.

I already registered some filter configuration on normal state so I hope they do not interfere each other.

Thanks in advance.

Greetings, P
Re: Filter Row Search Icon [message #1255695 is a reply to message #1255606] Mon, 24 February 2014 18:22 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2751
Registered: July 2012
Senior Member
In edit mode you are talking about the SWT Text Control. You need to check how to do this there and create a custom editor.
Previous Topic:update/refresh NatTable after updating the POJO
Next Topic:Migrate ILayerCell from underlying layer to top-level
Goto Forum:
  


Current Time: Wed Dec 11 20:40:44 GMT 2019

Powered by FUDForum. Page generated in 0.02098 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top