public void note(TFEvent e) {
Field color=getModel().getColorField();
if (color!=null && color!=oldColor)
{
removeAll();
final FilterCategoryPanel p=new FilterCategoryPanel("Color Legend: '"+color.getName()+"'",
color, this);
add(p);
Bag<String> data=DBUtils.countValues(getModel().getDB().all(), color);
p.setData(data);
p.dataList.addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
ValueFilter f=(ValueFilter)p.defineFilter();
getModel().setGrayFilter(f, this);
}
});
oldColor=color;