/** * Handles a clearing of the filter. That is, the filter list will act as * a passthrough and not discriminate any of the elements of the wrapped * source list. */ protected void handleFilterCleared() { if(editor == null) { editor = new PrivateMatcherEditor(); FilterList filterList = (FilterList)super.source; filterList.setMatcherEditor(editor); } else { editor.fireCleared(); } }
/** * Handles a clearing of the filter. That is, the filter list will act as * a passthrough and not discriminate any of the elements of the wrapped * source list. */ protected void handleFilterCleared() { if(editor == null) { editor = new PrivateMatcherEditor(); FilterList filterList = (FilterList)super.source; filterList.setMatcherEditor(editor); } else { editor.fireCleared(); } }
/** * Handles a clearing of the filter. That is, the filter list will act as * a passthrough and not discriminate any of the elements of the wrapped * source list. */ protected void handleFilterCleared() { if(editor == null) { editor = new PrivateMatcherEditor(); FilterList filterList = (FilterList)super.source; filterList.setMatcherEditor(editor); } else { editor.fireCleared(); } }
/** * Handles changes to the behavior of the filter. This may change the contents * of this {@link EventList} as elements are filtered and unfiltered. * * <p><strong><font color="#FF0000">Warning:</font></strong> This method is * thread ready but not thread safe. See {@link EventList} for an example * of thread safe code. */ protected final void handleFilterChanged() { if(editor == null) { editor = new PrivateMatcherEditor(); FilterList filterList = (FilterList)super.source; filterList.setMatcherEditor(editor); } else { editor.fireChanged(); } }
/** * Handles changes to the behavior of the filter. This may change the contents * of this {@link EventList} as elements are filtered and unfiltered. * * <p><strong><font color="#FF0000">Warning:</font></strong> This method is * thread ready but not thread safe. See {@link EventList} for an example * of thread safe code. */ protected final void handleFilterChanged() { if(editor == null) { editor = new PrivateMatcherEditor(); FilterList filterList = (FilterList)super.source; filterList.setMatcherEditor(editor); } else { editor.fireChanged(); } }
/** * Handles changes to the behavior of the filter. This may change the contents * of this {@link EventList} as elements are filtered and unfiltered. * * <p><strong><font color="#FF0000">Warning:</font></strong> This method is * thread ready but not thread safe. See {@link EventList} for an example * of thread safe code. */ protected final void handleFilterChanged() { if(editor == null) { editor = new PrivateMatcherEditor(); FilterList filterList = (FilterList)super.source; filterList.setMatcherEditor(editor); } else { editor.fireChanged(); } }
/** * 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); }
/** * Creates a new filter list that uses a TextFilterator. A TextFilterator is something * that I made up. It is basically a class that knows how to take an arbitrary * object and get an array of strings for that object. * * @param filterEdit a text field for typing in the filter text. */ public TextFilterList(EventList source, Text filterEdit, TextFilterator filterator) { super(new FilterList(source)); this.filterEdit = filterEdit; matcherEditor = new TextWidgetMatcherEditor(filterEdit, filterator, false); ((FilterList)this.source).setMatcherEditor(matcherEditor); // handle changes this.source.addListEventListener(this); }
/** * Creates a new filter list that uses a TextFilterator. A TextFilterator is something * that I made up. It is basically a class that knows how to take an arbitrary * object and get an array of strings for that object. * * @param filterEdit a text field for typing in the filter text. */ public TextFilterList(EventList source, Text filterEdit, TextFilterator filterator) { super(new FilterList(source)); this.filterEdit = filterEdit; matcherEditor = new TextWidgetMatcherEditor(filterEdit, filterator, false); ((FilterList)this.source).setMatcherEditor(matcherEditor); // handle changes this.source.addListEventListener(this); }
/** * Creates a new filter list that uses a TextFilterator. A TextFilterator is something * that I made up. It is basically a class that knows how to take an arbitrary * object and get an array of strings for that object. * * @param filterEdit a text field for typing in the filter text. */ public TextFilterList(EventList source, Text filterEdit, TextFilterator filterator) { super(new FilterList(source)); this.filterEdit = filterEdit; matcherEditor = new TextWidgetMatcherEditor(filterEdit, filterator, false); ((FilterList)this.source).setMatcherEditor(matcherEditor); // handle changes this.source.addListEventListener(this); }
/** * Creates a {@link TextFilterList} that filters the specified {@link EventList} * of elements using the specified {@link TextFilterator} to get the * {@link String}s to search. * * @param filterEdit a text field for typing in the filter text. */ public TextFilterList(EventList source, TextFilterator filterator, JTextField filterEdit) { super(new FilterList(source)); this.matcherEditor = new TextComponentMatcherEditor(filterEdit, filterator); this.filterEdit = filterEdit; ((FilterList)this.source).setMatcherEditor(matcherEditor); // handle changes this.source.addListEventListener(this); }
/** * Creates a {@link TextFilterList} that filters the specified {@link EventList} * of elements using the specified {@link TextFilterator} to get the * {@link String}s to search. * * @param filterEdit a text field for typing in the filter text. */ public TextFilterList(EventList source, TextFilterator filterator, JTextField filterEdit) { super(new FilterList(source)); this.matcherEditor = new TextComponentMatcherEditor(filterEdit, filterator); this.filterEdit = filterEdit; ((FilterList)this.source).setMatcherEditor(matcherEditor); // handle changes this.source.addListEventListener(this); }
/** * Creates a {@link TextFilterList} that filters the specified {@link EventList} * of elements using the specified {@link TextFilterator} to get the * {@link String}s to search. * * @param filterEdit a text field for typing in the filter text. */ public TextFilterList(EventList source, TextFilterator filterator, JTextField filterEdit) { super(new FilterList(source)); this.matcherEditor = new TextComponentMatcherEditor(filterEdit, filterator); this.filterEdit = filterEdit; ((FilterList)this.source).setMatcherEditor(matcherEditor); // handle changes this.source.addListEventListener(this); }
/** * Sets the {@link JTextField} used to edit the filter search {@link String}. */ public void setFilterEdit(JTextField filterEdit) { if(filterEdit == this.filterEdit) return; // clean up the old matcher editor boolean live = matcherEditor.isLive(); TextFilterator textFilterator = matcherEditor.getFilterator(); matcherEditor.dispose(); // prepare the new matcher editor this.matcherEditor = new TextComponentMatcherEditor(filterEdit, textFilterator, live); ((FilterList)source).setMatcherEditor(matcherEditor); }
/** * Sets the {@link JTextField} used to edit the filter search {@link String}. */ public void setFilterEdit(JTextField filterEdit) { if(filterEdit == this.filterEdit) return; // clean up the old matcher editor boolean live = matcherEditor.isLive(); TextFilterator textFilterator = matcherEditor.getFilterator(); matcherEditor.dispose(); // prepare the new matcher editor this.matcherEditor = new TextComponentMatcherEditor(filterEdit, textFilterator, live); ((FilterList)source).setMatcherEditor(matcherEditor); }
/** * Sets the {@link JTextField} used to edit the filter search {@link String}. */ public void setFilterEdit(JTextField filterEdit) { if(filterEdit == this.filterEdit) return; // clean up the old matcher editor boolean live = matcherEditor.isLive(); TextFilterator textFilterator = matcherEditor.getFilterator(); matcherEditor.dispose(); // prepare the new matcher editor this.matcherEditor = new TextComponentMatcherEditor(filterEdit, textFilterator, live); ((FilterList)source).setMatcherEditor(matcherEditor); }
/** * Sets the Text used to edit the filter search {@link String}. * * <p><strong>Warning:</strong> It is an error to call this method * with a null value for filterEdit. */ public void setFilterEdit(Text filterEdit) { if(this.filterEdit == filterEdit) return; // clean up the old matcher editor boolean live = matcherEditor.isLive(); TextFilterator textFilterator = matcherEditor.getFilterator(); matcherEditor.dispose(); // prepare the new matcher editor this.matcherEditor = new TextWidgetMatcherEditor(filterEdit, textFilterator, live); ((FilterList)source).setMatcherEditor(matcherEditor); }
/** * Sets the Text used to edit the filter search {@link String}. * * <p><strong>Warning:</strong> It is an error to call this method * with a null value for filterEdit. */ public void setFilterEdit(Text filterEdit) { if(this.filterEdit == filterEdit) return; // clean up the old matcher editor boolean live = matcherEditor.isLive(); TextFilterator textFilterator = matcherEditor.getFilterator(); matcherEditor.dispose(); // prepare the new matcher editor this.matcherEditor = new TextWidgetMatcherEditor(filterEdit, textFilterator, live); ((FilterList)source).setMatcherEditor(matcherEditor); }
/** * Sets the Text used to edit the filter search {@link String}. * * <p><strong>Warning:</strong> It is an error to call this method * with a null value for filterEdit. */ public void setFilterEdit(Text filterEdit) { if(this.filterEdit == filterEdit) return; // clean up the old matcher editor boolean live = matcherEditor.isLive(); TextFilterator textFilterator = matcherEditor.getFilterator(); matcherEditor.dispose(); // prepare the new matcher editor this.matcherEditor = new TextWidgetMatcherEditor(filterEdit, textFilterator, live); ((FilterList)source).setMatcherEditor(matcherEditor); }