Search code examples
netbeansnetbeans-8netbeans-platform

How do I convert a propertyChangeListener into a Lookup?


I have an OutlineView displaying a list of available data from a database. What I would like to do is when the user uses the QuickFilter have the number of filtered results be displayed nearby. I think I'm getting the propertyChangeListener with:
outlineView.getOutline().getPropertyChangeListener(ETable.PROP_QUICK_FILTER);

I'm confused how to move forward from here with adding the pcl to my ProxyLookup in my TopComponent.


Solution

  • Turns out what I was needing to do this was:

    outlineView.getOutline().addPropertyChangeListener(ETable.PROP_QUICK_FILTER, new PropertyChangeListener(){
        @Override
        public void propertyChange(PropertyChangeEvent evt){
            //Able to get the current number of displayed rows here
        }
    }
    

    I know it seems simple but this had taking hours of my time just to get this. Doing this to help any future needs of people.