use of alma.acs.nsstatistics.EventData in project ACS by ACS-Community.
the class EventListPart method notifyEventTypeFilterChanged.
/**
* @see alma.acs.eventGui2.parts.IEventListPart#notifyEventTypeFilterChange(java.lang.String)
*/
@Override
public void notifyEventTypeFilterChanged(final String filterText) {
// System.out.println("EventListPart#notifyEventTypeFilterChange : " + filterText);
if (tableFilter != null) {
viewer.removeFilter(tableFilter);
}
tableFilter = new ViewerFilter() {
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
if (filterText.equals("")) {
return true;
}
EventData row = (EventData) element;
String column = row.getEventTypeName();
if (column.toUpperCase(Locale.ENGLISH).contains(filterText.toUpperCase(Locale.ENGLISH))) {
return true;
}
return false;
}
};
viewer.addFilter(tableFilter);
viewer.refresh();
}
Aggregations