/** * A hidden constructor that allows us to store a reference to the * FilterList, which we created and must dispose later. * * @param filterList the FilterList that backs this TableCheckFilterList * @param table the checkable table * @param tableFormat the format of the checkable table */ private TableCheckFilterList(FilterList<S> filterList, Table table, TableFormat tableFormat) { super(filterList); this.filterList = filterList; this.table = table; this.checkableTableFormat = tableFormat instanceof CheckableTableFormat ? (CheckableTableFormat) tableFormat : null; // listen for changes in checkedness table.addSelectionListener(this); // prepare the filter filterList.setMatcherEditor(checkMatcherEditor); // handle changes filterList.addListEventListener(this); }
/** * A hidden constructor that allows us to store a reference to the * FilterList, which we created and must dispose later. * * @param filterList the FilterList that backs this TableCheckFilterList * @param table the checkable table * @param tableFormat the format of the checkable table */ private TableCheckFilterList(FilterList<S> filterList, Table table, TableFormat tableFormat) { super(filterList); this.filterList = filterList; this.table = table; this.checkableTableFormat = tableFormat instanceof CheckableTableFormat ? (CheckableTableFormat) tableFormat : null; // listen for changes in checkedness table.addSelectionListener(this); // prepare the filter filterList.setMatcherEditor(checkMatcherEditor); // handle changes filterList.addListEventListener(this); }
/** * A hidden constructor that allows us to store a reference to the * FilterList, which we created and must dispose later. * * @param filterList the FilterList that backs this TableCheckFilterList * @param table the checkable table * @param tableFormat the format of the checkable table */ private TableCheckFilterList(FilterList<S> filterList, Table table, TableFormat tableFormat) { super(filterList); this.filterList = filterList; this.table = table; this.checkableTableFormat = tableFormat instanceof CheckableTableFormat ? (CheckableTableFormat) tableFormat : null; // listen for changes in checkedness table.addSelectionListener(this); // prepare the filter filterList.setMatcherEditor(checkMatcherEditor); // handle changes filterList.addListEventListener(this); }
this.defaultFilters = defaultFilters; ListenerClass listener = new ListenerClass(); filterList.addListEventListener(listener); gui = new FilterGui<E>(jFrame, this); cache = new HashMap<E, String>();
final FilterList filteredList = new FilterList(sortedList, new ThreadedMatcherEditor(matcherEditor)); filteredList.addListEventListener(new ListEventListener() {
/** * @param source the raw elements that will be tested by the given * <code>matcher</code> * @param matcher the logic which determines whether an element is counted * in the value reported by this Calculation */ public ConditionalCount(EventList<E> source, Matcher<E> matcher) { super(new Integer(0)); // the user should ideally know nothing about this FilterList, so we // lock the pipeline during its construction so the calling code need // not consider concurrency, which is really an implementation detail source.getReadWriteLock().readLock().lock(); try { filtered = new FilterList<E>(source, matcher); filtered.addListEventListener(this); setValue(new Integer(filtered.size())); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * @param source the raw elements that will be tested by the given * <code>matcher</code> * @param matcher the logic which determines whether an element is counted * in the value reported by this Calculation */ public ConditionalCount(EventList<E> source, Matcher<E> matcher) { super(new Integer(0)); // the user should ideally know nothing about this FilterList, so we // lock the pipeline during its construction so the calling code need // not consider concurrency, which is really an implementation detail source.getReadWriteLock().readLock().lock(); try { filtered = new FilterList<E>(source, matcher); filtered.addListEventListener(this); setValue(new Integer(filtered.size())); } finally { source.getReadWriteLock().readLock().unlock(); } }
/** * @param source the raw elements that will be tested by the given * <code>matcher</code> * @param matcher the logic which determines whether an element is counted * in the value reported by this Calculation */ public ConditionalCount(EventList<E> source, Matcher<E> matcher) { super(new Integer(0)); // the user should ideally know nothing about this FilterList, so we // lock the pipeline during its construction so the calling code need // not consider concurrency, which is really an implementation detail source.getReadWriteLock().readLock().lock(); try { filtered = new FilterList<E>(source, matcher); filtered.addListEventListener(this); setValue(new Integer(filtered.size())); } finally { source.getReadWriteLock().readLock().unlock(); } }
filterList = new FilterList<MyIndustryJob>(sortedList); eventList.getReadWriteLock().readLock().unlock(); filterList.addListEventListener(listener);
filterList = new FilterList<>(eventList); eventList.getReadWriteLock().readLock().unlock(); filterList.addListEventListener(listener);
filterList = new FilterList<MyMarketOrder>(sortedList); eventList.getReadWriteLock().readLock().unlock(); filterList.addListEventListener(listener);
filterList = new FilterList<StockpileItem>(sortedListTotal); eventList.getReadWriteLock().readLock().unlock(); filterList.addListEventListener(listener);
eventList.getReadWriteLock().readLock().unlock(); filterList.addListEventListener(listener);
filterList = new FilterList<MyTransaction>(sortedList); eventList.getReadWriteLock().readLock().unlock(); filterList.addListEventListener(listener);