Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Row Filter(Row Filter Synchronisation)
Row Filter [message #921991] Mon, 24 September 2012 16:22 Go to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 40
Registered: September 2012
Member
Hi I ve two nattable and they are just positioned adjacent to each other.


Table "A" has following fields:

itemnumber,val1,val2 and val3

Table "B" has following fields:
val4,val5, and val6.


the columns of table "A"(itemnumber,val1,val2 and val3) and columns of table "B"(val4,val5, and val6) makes a complete row , i.e the complete row cosists of itemnumber,val1,val2 ,val3,val4 ,val5 and val6.



Now when I filter rows of Table "A" with itemnumber,matched rows of Table "A" is filtered and shown correctly,but I want withthe matched rows of table "A" the corresponding rows of table "B" also shown to show the complete row ,i.e itemnumber,val1,val2 ,val3,val4 ,val5 and val6.

Image is attached.
Please guide.C:\Users\infodba\Desktop\tbl.jpgfile:///C:/Users/infodba/Desktop/tbl.jpg

[Updated on: Mon, 24 September 2012 16:24]

Report message to a moderator

Re: Row Filter [message #922623 is a reply to message #921991] Tue, 25 September 2012 07:17 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1434
Registered: July 2012
Senior Member
Well the answer to this is not that easy. Especially because it depends on the whole architecture you are using. You have to think about which criteria matches your filter logic for both tables. If they use different model objects it will become quite difficult to create a filter criteria for table B out of the filter criteria of table A.
Re: Row Filter [message #922681 is a reply to message #922623] Tue, 25 September 2012 08:21 Go to previous messageGo to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 40
Registered: September 2012
Member
Hi ,
columns of both tables creates a complete row and both tables have same no of rows. During filter is it possible to show only those row numbers of table "B" whose row numbers matches(or equal) to row numbers are shown in table "A".


Or u can pls tell the java file name(s) which acctually filter the data and in the table ,that will be also helpful.

[Updated on: Tue, 25 September 2012 08:26]

Report message to a moderator

Re: Row Filter [message #922701 is a reply to message #922681] Tue, 25 September 2012 08:48 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1434
Registered: July 2012
Senior Member
If you are using the FilterRow you are using the GlazedLists extension. And the filtering there is done within the FilterList. The FilterRow uses a IFilterStrategy to transform input from the filter row to the FilterList. If you haven't changed anything there, this is done in DefaultGlazedListsFilterStrategy.
Filtering in GlazedLists FilterList is done via Matcher, so you'll have to create a matcher and add it to the filter strategy of the other table.
Re: Row Filter [message #922807 is a reply to message #922701] Tue, 25 September 2012 11:03 Go to previous messageGo to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 40
Registered: September 2012
Member
Hi Dirk,

I am trying to do this in the following way:

leftbuilder is Left NatTableBuilder
rightbuilderis Right NatTableBuilder

Now :====

leftbuilder.getFilterList().addListEventListener(new ListEventListener(){

@Override
public void listChanged(ListEvent listEvent) {


//rightbuilder.getFilterList().;
EventList eList=listEvent.getSourceList();
//Collection colright=null;
for(Iterator it = eList.iterator(); it.hasNext()Wink
{
EPLLine nextobj=(EPLLine)it.next();
int filteridx= Integer.parseInt(nextobj.getEpllinerow());
System.out.println("LIST CHANGED:"+filteridx+":"+nextobj.getPartno()); EPLLineModel eplmodel=(EPLLineModel)rightbuilder.getEventList().get(filteridx);
System.out.println("LIST CHANGED1:"+eplmodel);
rightbuilder.getFilterList().add(eplmodel);

}
// if(colright!=null)
// rightbuilder.getFilterList().add(colright);

System.out.println("RightFilterSize::"+rightbuilder.getFilterList().size());
}

});

the Size RightFilterSize prints the proper size of FilterList,That matches with LeftTable, But this filter is not shown in rifgttable.

Re: Row Filter [message #922839 is a reply to message #922807] Tue, 25 September 2012 11:39 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1434
Registered: July 2012
Senior Member
Hm, not sure what you are doing there. But normally if the model is showing the correct data, but the NatTable isn't, try to do a refresh() on the NatTable instance.
Re: Row Filter [message #923754 is a reply to message #922839] Wed, 26 September 2012 06:59 Go to previous messageGo to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 40
Registered: September 2012
Member
Hi Dirk,
Can u please provide sample code for filtering the FilterList or the Matcher.
Re: Row Filter [message #923776 is a reply to message #923754] Wed, 26 September 2012 07:28 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1434
Registered: July 2012
Senior Member
You can have a look at the DefaultGlazedListsStaticFilterStrategy. This is an extension to DefaultGlazedListsFilterStrategy that allows to add additional filters to the ones created by the FilterRow.(@see addStaticFilter() / removeStaticFilter())

Creating a MatcherEditor or Matcher and adding it to a FilterList is something like this:
CompositeMatcherEditor<T> autoFilterMatcherEditor = new CompositeMatcherEditor<T>();
filterList.setMatcherEditor(autoFilterMatcherEditor);

autoFilterMatcherEditor.getMatcherEditors().add(new AbstractMatcherEditor<T>() {
	@Override
	public Matcher<T> getMatcher() {
		return new Matcher<T>() {
			@Override
			public boolean matches(T arg0) {
//				if (matches) { //add your filter condition here
//					return true;
//				}
				return false;
			}
		};
	}
});


You can also have a look for this here:
http://www.glazedlists.com/documentation/tutorial-100#TOC-FilterList-Matcher-and-MatcherEditor

I see we'll have to create the documentation on filtering in NatTable soon. Smile
Re: Row Filter [message #923898 is a reply to message #923776] Wed, 26 September 2012 09:42 Go to previous messageGo to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 40
Registered: September 2012
Member
Hi Dirk,
Thanx ,Thanx a lot now it is solved.
Re: Row Filter [message #923908 is a reply to message #923898] Wed, 26 September 2012 09:51 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1434
Registered: July 2012
Senior Member
Hi, glad to hear! Smile

Would you mind posting at least the general part of your solution here? Maybe there will be users in the future wanting to solve the same issue.
Re: Row Filter [message #923914 is a reply to message #923908] Wed, 26 September 2012 09:56 Go to previous messageGo to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 40
Registered: September 2012
Member
yes I'll post both the solution regarding vertical painter and the filtering of a table based on filtered data of another table
Re: Row Filter [message #924806 is a reply to message #923914] Thu, 27 September 2012 06:24 Go to previous messageGo to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 40
Registered: September 2012
Member
I am currently working in with a editor ,which consist of two nattables(I am very new to nattable and its compelling features attracted me) and they are positioned adjacent to each other and they behaves as if it is a BIG single table.

The left table(or Left Pane of the Big Single table) Consists of rowid(unique) ,column LA,Column LB ,Column LC ..etc and the right table (or Right Pane of the Big Single table) Consists of rowid(unique) ,column RA,Column RB , Column RC ...etc. This BIG table should process 100 columns and 100000 rows. Now the key features of table is:

1.FULLRow Selection:When any cell/row of a table selected ,the same row of another table is also selected and this selection gives feel of a full single row selection of the BIG table.

2.SCROLL:When we scroll the vertical scrollbar of a table ,the vertical scrollbar of another table is also scrolled automatically and it is synchronised .

3.FILTERING:If I filter left table ,the right table also be filterd based on filterlist of Left Table . The vice versa should happen also.

Now I am giving code snipplets of the above requirements(I ve used Nattable Builder for its relatively easy configuration):

1.FULLRow Selection:

//When a cell in left table is selected ,the full row of the left table and right table is also selected
leftnatTable.addLayerListener(new ILayerListener() {
public void handleLayerEvent(ILayerEvent event) {
if (event instanceof CellSelectionEvent) {
CellSelectionEvent cellEvent = (CellSelectionEvent) event;

SelectionLayer selectionlayer=rightbuilder.getBodyLayerStack().getSelectionLayer();


PositionCoordinate[] selectedCells =cellEvent.getSelectionLayer().getSelectedCellPositions();
PositionCoordinate[] selectedCells1=null;
SelectionLayer sellayer=rightbuilder.getBodyLayerStack().getSelectionLayer();

try{
if(sellayer!=null)
selectedCells1=sellayer.getSelectedCellPositions();
}
catch(Exception e)
{

}


if(selectedCells!=null&&selectedCells.length>0&&selectionlayer!=null)
{
if(selectedCells1==null ||selectedCells1.length<=0)
{
selectionlayer.clear();
selectionlayer.selectRow(selectedCells[0].getColumnPosition(), selectedCells[0].getRowPosition(), false, true);
}

else if(selectedCells[0].getRowPosition()!=selectedCells1[0].getRowPosition())
{
selectionlayer.clear();
selectionlayer.selectRow(selectedCells[0].getColumnPosition(), selectedCells[0].getRowPosition(), false, true);
}

}



}
}
});


//When a row in left table is selected ,the full row of the right table is also selected
leftnatTable.addLayerListener(new ILayerListener(){
public void handleLayerEvent(ILayerEvent event) {
if(event instanceof RowSelectionEvent){
RowSelectionEvent rowEvent = (RowSelectionEvent) event;
SelectionLayer selectionlayer=rightbuilder.getBodyLayerStack().getSelectionLayer();


PositionCoordinate[] selectedCells =rowEvent.getSelectionLayer().getSelectedCellPositions();
PositionCoordinate[] selectedCells1=rightbuilder.getBodyLayerStack().getSelectionLayer().getSelectedCellPositions();

if(selectedCells!=null&&selectedCells.length>0&&selectionlayer!=null)
{

if(selectedCells1==null ||selectedCells1.length<=0)
{
selectionlayer.clear();
selectionlayer.selectRow(selectedCells[0].getColumnPosition(), selectedCells[0].getRowPosition(), false, false);
}

else if(selectedCells[0].getRowPosition()!=selectedCells1[0].getRowPosition())
{
selectionlayer.clear();
selectionlayer.selectRow(selectedCells[0].getColumnPosition(), selectedCells[0].getRowPosition(), false, false);
}
}

}
}
});


//When a cell in right table is selected ,the full row of the right table and left table is also selected

rightnatTable.addLayerListener(new ILayerListener() {

public void handleLayerEvent(ILayerEvent event) {
if (event instanceof CellSelectionEvent) {
CellSelectionEvent cellEvent = (CellSelectionEvent) event;

SelectionLayer selectionlayer=leftbuilder.getBodyLayerStack().getSelectionLayer();


PositionCoordinate[] selectedCells =cellEvent.getSelectionLayer().getSelectedCellPositions();
PositionCoordinate[] selectedCells1=null;
SelectionLayer sellayer=leftbuilder.getBodyLayerStack().getSelectionLayer();

try{
if(sellayer!=null)
selectedCells1=sellayer.getSelectedCellPositions();
}
catch(Exception e)
{

}


if(selectedCells!=null&&selectedCells.length>0&&selectionlayer!=null)
{
if(selectedCells1==null ||selectedCells1.length<=0)
{
selectionlayer.clear();
selectionlayer.selectRow(selectedCells[0].getColumnPosition(), selectedCells[0].getRowPosition(), false, false);
}

else if(selectedCells[0].getRowPosition()!=selectedCells1[0].getRowPosition())
{
selectionlayer.clear();
selectionlayer.selectRow(selectedCells[0].getColumnPosition(), selectedCells[0].getRowPosition(), false, false);
}
}



}
}
});

//When a row in left table is selected ,the full row of the right table is also selected

rightnatTable.addLayerListener(new ILayerListener(){
public void handleLayerEvent(ILayerEvent event) {
if(event instanceof RowSelectionEvent){
RowSelectionEvent rowEvent = (RowSelectionEvent) event;
SelectionLayer selectionlayer=leftbuilder.getBodyLayerStack().getSelectionLayer();


PositionCoordinate[] selectedCells =rowEvent.getSelectionLayer().getSelectedCellPositions();
PositionCoordinate[] selectedCells1=leftbuilder.getBodyLayerStack().getSelectionLayer().getSelectedCellPositions();


if(selectedCells!=null&&selectedCells.length>0&&selectionlayer!=null)
{

if(selectedCells1==null ||selectedCells1.length<=0)
{
selectionlayer.clear();
selectionlayer.selectRow(selectedCells[0].getColumnPosition(), selectedCells[0].getRowPosition(), false, true);
}

else if(selectedCells[0].getRowPosition()!=selectedCells1[0].getRowPosition())
{
selectionlayer.clear();
selectionlayer.selectRow(selectedCells[0].getColumnPosition(), selectedCells[0].getRowPosition(), false, true);
}
}

}
}
});




2.SCROLL:

//When we scroll vertical scrollbar of left table ,right table is also scrolled automatically.
//and When we scroll vertical scrollbar of right table ,left table is also scrolled automatically

leftnatTable.addListener(SWT.Selection, new VerticalScrollBarHandler(leftbuilder.getBodyLayerStack().getViewportLayer(),leftnatTable.getVerticalBar())
{
public void handleEvent(Event event)
{
//Code to avoid repetative execution
if(leftnatTable.getVerticalBar().getSelection()!=rightnatTable.getVerticalBar().getSelection())
{
rightnatTable.getVerticalBar().setSelection(leftnatTable.getVerticalBar().getSelection());
rightnatTable.getVerticalBar().notifyListeners(SWT.Selection, new Event());

}
}
});



rightnatTable.addListener(SWT.Selection, new VerticalScrollBarHandler(rightbuilder.getBodyLayerStack().getViewportLayer(),rightnatTable.getVerticalBar())
{
public void handleEvent(Event event)
{
if(leftnatTable.getVerticalBar().getSelection()!=rightnatTable.getVerticalBar().getSelection())
{
leftnatTable.getVerticalBar().setSelection(rightnatTable.getVerticalBar().getSelection());
leftnatTable.getVerticalBar().notifyListeners(SWT.Selection, new Event());

}
}
});


3:Filtering:
leftbuilder.getFilterList().addListEventListener(new ListEventListener(){

@Override
public void listChanged(ListEvent listEvent) {



Set filtersetList=new HashSet();

//Get the Data of filtered row
EventList eList=listEvent.getSourceList();
for(Iterator it = eList.iterator(); it.hasNext()Wink
{

//the unique row number is extacted
EPLLine nextobj=(EPLLine)it.next();
String indx=nextobj.getEpllinerow();
int pos=Integer.parseInt(indx);

//the object of same row of anothe table is extacted
EPLLineModel eplmodel=(EPLLineModel)(rightbuilder.getEventList().get(pos));

filtersetList.add(eplmodel);



}
//The custom matcher to set the filter data to Right table
rightbuilder.getFilterList().setMatcher(new EPLTableMatcher(filtersetList));

rightbuilder.getNatTable().refresh();



}

});



The filtering of Left table based on filtered data of Right table is yet to be done.

Any advice for improvement will be appreciated.
Re: Row Filter [message #924822 is a reply to message #924806] Thu, 27 September 2012 06:42 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1434
Registered: July 2012
Senior Member
Hi,

thanks for sharing your efforts with us. One short question, what exactly is the reason for having two NatTable instances when the left and the right information is tightly coupled (as I understand one row in the left NatTable is tight connected to a row in the right NatTable)? The only use case I would find is that you want to scroll left-right in the tables independently. Is it because of this? Otherwise it would be much easier to create some wrapper object that contains of the two objects and delegates the access to them. But thats just an idea as I don't know what your requirements are.

Greez,
Dirk
Re: Row Filter [message #924831 is a reply to message #924822] Thu, 27 September 2012 06:50 Go to previous messageGo to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 40
Registered: September 2012
Member
yes requirement is two independant table that will be scrolled independantly.
Can please elaborate your idea "ome wrapper object that contains of the two objects and delegates the access to them" so that I can implement and check its merits and demerits over current implementation.
Re: Row Filter [message #924876 is a reply to message #924831] Thu, 27 September 2012 07:47 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1434
Registered: July 2012
Senior Member
This idea doesn't fit your requirements as it would result in really one big table that can't be scrolled independently. So forget about my idea. Smile
Re: Row Filter [message #924987 is a reply to message #924876] Thu, 27 September 2012 09:36 Go to previous messageGo to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 40
Registered: September 2012
Member
Hi Dirk,
In our last discussion we discussed about the filtering of data.
When I write some filter criteria in the filter row of Left Table and press "enter" The left table as well as right table is also filtered based on unique row id of filtered dtata of left table.
The "Clear Filter" is also working fine ,both the table rae synchronised.

the code snipplet is given below:



leftbuilder.getFilterList().addListEventListener(new ListEventListener(){

@Override
public void listChanged(ListEvent listEvent) {




Set filtersetList=new HashSet();
//Get the Changed FilterList of left table based on the filtercriteria given in
//filter row of Left Table
EventList eList=listEvent.getSourceList();
for(Iterator it = eList.iterator(); it.hasNext()Wink
{

//Get the Filterdata one by one
EPLLine nextobj=(EPLLine)it.next();
//Get the Unique rowno of the Extracted object
String indx=nextobj.getEpllinerow();
int pos=Integer.parseInt(indx);

//Get the object from EventList of Right Table of Same rowid of the Extracted object
EPLLineModel eplmodel=(EPLLineModel)(rightbuilder.getEventList().get(pos));

//Add to collection ,required to set Filter data to Right Table
filtersetList.add(eplmodel);



}
//The custom matcher set Filter data(colection) to Right Table
rightbuilder.getFilterList().setMatcher(new EPLTableMatcher(filtersetList));
rightbuilder.getNatTable().notifyListeners(SWT.Selection, new Event());
rightbuilder.getNatTable().refresh();



}

});


EPLLine is associated with LeftTable:
EPLLineModel is associated with RightTable:

THe matcher class is:


class EPLTableMatcher implements Matcher {

/** the users to match */
private Set filterdata = new HashSet();

/**
* Create a new {@link IssuesForUsersMatcher} that matches only
* {@link Issue}s that have one or more user in the specified list.
*/
public EPLTableMatcher(Collection filterdata) {
// make a defensive copy of the users
this.filterdata.addAll(filterdata);
}

/**
* Test whether to include or not include the specified issue based
* on whether or not their user is selected.
*/
public boolean matches(Object o) {
if(o == null) return false;
// if(filterdata.isEmpty()) return true;


return filterdata.contains(o);
}
}



This code works fine ,whenever I filter or "clear" filter in filter row of Left Table the right table and press "ENTER" the right table shows the filter dtata properly.

Now I want that left table will be filter based on filter dtata of right table and written the follwing code:
rightbuilder.getFilterList().addListEventListener(new ListEventListener(){

@Override
public void listChanged(ListEvent listEvent) {


Set filtersetList=new HashSet();
EventList eList=listEvent.getSourceList();
for(Iterator it = eList.iterator(); it.hasNext()Wink
{

EPLLineModel nextobj=(EPLLineModel)it.next();
String indx=nextobj.getEpllinemodelrow();
int pos=Integer.parseInt(indx);
EPLLine eplline=(EPLLine)(leftbuilder.getEventList().get(pos));
filtersetList.add(eplline);


}


leftbuilder.getFilterList().setMatcher(new EPLTableMatcher(filtersetList));
leftbuilder.getNatTable().refresh();



}

});

but in this case proper filtering is not happening neither from lefttable nor from right table.

can pls advise.
Re: Row Filter [message #925028 is a reply to message #924987] Thu, 27 September 2012 10:17 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1434
Registered: July 2012
Senior Member
Sounds like a round-trip issue now. After your last modification you filter in one table instance, this triggers the listener there, which in return will trigger the other listener. In short you'll have to ensure that the one event does not trigger another event to be fired on filtering.
Re: Row Filter [message #925039 is a reply to message #925028] Thu, 27 September 2012 10:24 Go to previous messageGo to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 40
Registered: September 2012
Member
Yes I ve also thought ,that this is the reason, is there any way out
Re: Row Filter [message #925059 is a reply to message #925039] Thu, 27 September 2012 10:35 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1434
Registered: July 2012
Senior Member
Well, one solution could be to create one listener instance for both tables, that will set a flag to tell the other one to ignore the upcoming event. Another solution could be to store some flag in workspace that is set on filtering to tell the other listener to ignore the upcoming event. Something like that. You have to ensure off course that the flag is reset after it was checked.
Re: Row Filter [message #925140 is a reply to message #925059] Thu, 27 September 2012 12:13 Go to previous messageGo to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 40
Registered: September 2012
Member
No Dirk, Its not the round-trip issue. As in my listChange code I 've changed the following things to see how many times the event propogates .

for Left Table:

MessageBox messageBox = new MessageBox(Display.getCurrent().getActiveShell(), SWT.OK);

messageBox.setText("LeftFilter");
messageBox.setMessage("LeftFilter);
messageBox.open();

for RightTable listchange()


MessageBox messageBox = new MessageBox(Display.getCurrent().getActiveShell(), SWT.OK);

messageBox.setText("RightFilter");
messageBox.setMessage("RightFilter);
messageBox.open();


Now when I add filter parameters in any table :
1.The messageBox shown just two times one with "LeftFilter" title and another with "RightFilter" and filters both the table properly. That means the round-trip is not the issue.

2.Now If I execute the "Clear-Filter"/further filter(i.e add more filter parameter on filter data) on the any of the filtered table the listchange event is not called as no message Box is showing and clear-filter/further filtering is not working.

i.e. Filtering on any table is working fine properly for the first time,for any any subsequent filtering/clearing its not working


Now If I comment/remove the
rightbuilder.getFilterList().addListEventListener(new ListEventListener(){...


the "leftbuilder.getFilterList().addListEventListener.." works properly for filtering /clear-filtering/further-filtering ,MessageBox is shown properly.


final Vector filtervc=new Vector();
filtervc.add("0");
leftbuilder.getFilterList().addListEventListener(new ListEventListener(){

@Override
public void listChanged(ListEvent listEvent) {



int rept=Integer.parseInt(filtervc.get(0).toString());
/*if(rept>=2)
{
filtervc.add(0,"0");
MessageBox messageBox = new MessageBox(Display.getCurrent().getActiveShell(), SWT.OK);

messageBox.setText("Lrept0");
messageBox.setMessage("Rept::"+rept);
messageBox.open();
return;
}*/
rept++;
filtervc.add(0,new String(rept+""));

MessageBox messageBox = new MessageBox(Display.getCurrent().getActiveShell(), SWT.OK);

messageBox.setText("Lrept1");
messageBox.setMessage("Rept::"+rept);
messageBox.open();

Set filtersetList=new HashSet();
EventList eList=listEvent.getSourceList();
for(Iterator it = eList.iterator(); it.hasNext()Wink
{

EPLLine nextobj=(EPLLine)it.next();
String indx=nextobj.getEpllinerow();
int pos=Integer.parseInt(indx);
EPLLineModel eplmodel=(EPLLineModel)(rightbuilder.getEventList().get(pos));
filtersetList.add(eplmodel);



}

FilterList fList=rightbuilder.getFilterList();

//if((fList.size()==filtersetList.size())&&(filtersetList.containsAll(fList)==true))



rightbuilder.getFilterList().setMatcher(new EPLTableMatcher(filtersetList));
//rightbuilder.getNatTable().notifyListeners(SWT.Selection, new Event());





}

});

Please advice

Re: Row Filter [message #929262 is a reply to message #925140] Mon, 01 October 2012 10:21 Go to previous messageGo to next message
dhruba kumar is currently offline dhruba kumarFriend
Messages: 40
Registered: September 2012
Member
Hi Dirk,
Pls advise.
Re: Row Filter [message #929271 is a reply to message #929262] Mon, 01 October 2012 10:34 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1434
Registered: July 2012
Senior Member
Hi,

Sorry I'm very busy at the moment and your issue seems to be quite complicated. Maybe I have an idea you can check. You are using the FilterRow right? Which filter strategy do you use? The DefaultGlazedListsFilterStrategy will only take care of filters added via filter row. That's why I added the DefaultGlazedListsStaticFilterStrategy. With this you can add and remove filters additionally to the ones added by filter row. And they will be restored despite clearing or changing the filters in the filter row.

So I'll suggest to use the DefaultGlazedListsStaticFilterStrategy and add/remove your filters via addStaticFilter() and removeStaticFilter() instead of adding your Matchers directly to the FilterList.

Hope that helps,
Dirk
Previous Topic:Division by Zero bug in AbstractTextPainter.modifyTextToDisplay(AbstractTextPainter.java:325)
Next Topic:NatTable 0.9.0 Release
Goto Forum:
  


Current Time: Sat Dec 20 23:01:24 GMT 2014

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

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