/** * Add a listener to the list that's notified each time a change to * the selection occurs. * * Note that the change events fired by this class may include rows * that have been removed from the table. For this reason it is * advised not to <code>for()</code> through the changed range without * also verifying that each row is still in the table. */ public void addListSelectionListener(ListSelectionListener listener) { delegateSelectionModel.addListSelectionListener(listener); }
/** * Add a listener to the list that's notified each time a change to * the selection occurs. * * Note that the change events fired by this class may include rows * that have been removed from the table. For this reason it is * advised not to <code>for()</code> through the changed range without * also verifying that each row is still in the table. */ public void addListSelectionListener(ListSelectionListener listener) { delegateSelectionModel.addListSelectionListener(listener); }
/** * Add a listener to the list that's notified each time a change to * the selection occurs. * * Note that the change events fired by this class may include rows * that have been removed from the table. For this reason it is * advised not to <code>for()</code> through the changed range without * also verifying that each row is still in the table. */ @Override public void addListSelectionListener(ListSelectionListener listener) { delegateSelectionModel.addListSelectionListener(listener); }
/** * Instantiates a new movie selection model. Usage in MoviePanel * * @param sortedList * the sorted list * @param source * the source * @param matcher * the matcher */ public MovieSelectionModel(SortedList<Movie> sortedList, EventList<Movie> source, MovieMatcherEditor matcher) { this.sortedList = sortedList; this.selectionModel = new DefaultEventSelectionModel<>(source); this.selectionModel.addListSelectionListener(this); this.matcherEditor = matcher; this.selectedMovies = selectionModel.getSelected(); propertyChangeListener = new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getSource() == selectedMovie) { firePropertyChange(evt); } } }; }
selectedEpisodes = selectionModel.getSelected(); selectionModel.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) {
tableSelectionModel.addListSelectionListener(resultSelectionModel); resultSelectionModel.selectedResults = tableSelectionModel.getSelected(); tableMovies.setSelectionModel(tableSelectionModel);