/** * 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); }
try { JTextField filterEdit = new JTextField(12); TextComponentMatcherEditor<Issue> textMatcherEditor = new TextComponentMatcherEditor<Issue>(filterEdit, new IssueTextFilterator()); FilterList<Issue> textFilteredIssues = new FilterList<Issue>(issues, textMatcherEditor); SortedList<Issue> sortedIssues = new SortedList<Issue>(textFilteredIssues, null);
try { JTextField filterEdit = new JTextField(12); TextComponentMatcherEditor<Issue> textMatcherEditor = new TextComponentMatcherEditor<Issue>(filterEdit, new IssueTextFilterator()); FilterList<Issue> textFilteredIssues = new FilterList<Issue>(issues, textMatcherEditor); SortedList<Issue> sortedIssues = new SortedList<Issue>(textFilteredIssues, null);
/** * 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); }
try { JTextField filterEdit = new JTextField(12); TextComponentMatcherEditor<Issue> textMatcherEditor = new TextComponentMatcherEditor<Issue>(filterEdit, new IssueTextFilterator()); FilterList<Issue> textFilteredIssues = new FilterList<Issue>(issues, textMatcherEditor); SortedList<Issue> sortedIssues = new SortedList<Issue>(textFilteredIssues, null);
try { JTextField filterEdit = new JTextField(12); TextComponentMatcherEditor<Issue> textMatcherEditor = new TextComponentMatcherEditor<Issue>(filterEdit, new IssueTextFilterator()); FilterList<Issue> textFilteredIssues = new FilterList<Issue>(issues, textMatcherEditor); SortedList<Issue> sortedIssues = new SortedList<Issue>(textFilteredIssues, null);
try { JTextField filterEdit = new JTextField(12); TextComponentMatcherEditor<Issue> textMatcherEditor = new TextComponentMatcherEditor<Issue>(filterEdit, new IssueTextFilterator()); FilterList<Issue> textFilteredIssues = new FilterList<Issue>(issues, textMatcherEditor); SortedList<Issue> sortedIssues = new SortedList<Issue>(textFilteredIssues, null);
try { JTextField filterEdit = new JTextField(12); TextComponentMatcherEditor<Issue> textMatcherEditor = new TextComponentMatcherEditor<Issue>(filterEdit, new IssueTextFilterator()); FilterList<Issue> textFilteredIssues = new FilterList<Issue>(issues, textMatcherEditor); SortedList<Issue> sortedIssues = new SortedList<Issue>(textFilteredIssues, null);
splitPane.setLeftComponent(panelLeft); MatcherEditor<TvShowEpisodeChooserModel> textMatcherEditor = new TextComponentMatcherEditor<>(textField, new TvShowEpisodeChooserModelFilterator()); FilterList<TvShowEpisodeChooserModel> textFilteredEpisodes = new FilterList<>(sortedEpisodes, textMatcherEditor);
MatcherEditor<Movie> textMatcherEditor = new TextComponentMatcherEditor<>(textField, new MovieFilterator()); MovieMatcherEditor movieMatcherEditor = new MovieMatcherEditor(); FilterList<Movie> extendedFilteredMovies = new FilterList<>(sortedMovies, movieMatcherEditor);
final MatcherEditor<ProjectActivity> textMatcherEditor = new TextComponentMatcherEditor<>(searchField, new ProjectActivityTextFilterator()); final FilterList<ProjectActivity> textFilteredIssues = new FilterList<>(model.getActivitiesList(), textMatcherEditor);
/** * Set up GUI components. */ private void initialize() { // Init search field and a list filtered list for the quick search final JSearchField searchField = new JSearchField(); final MatcherEditor<HoursByProject> textMatcherEditor = new TextComponentMatcherEditor<>(searchField, new HoursByProjectTextFilterator()); final FilterList<HoursByProject> textFilteredIssues = new FilterList<>(this.report.getHoursByProject(), textMatcherEditor); tableModel = new EventTableModel<>(textFilteredIssues, new HoursByProjectTableFormat()); final JTable table = new JHighligthedTable(tableModel); TableComparatorChooser.install( table, this.report.getHoursByProject(), TableComparatorChooser.MULTIPLE_COLUMN_MOUSE ); table.getColumn(table.getColumnName(0)).setCellRenderer(new DefaultTableRenderer(new FormatStringValue(DateFormat.getDateInstance()))); table.getColumn(table.getColumnName(1)).setCellRenderer(new DefaultTableRenderer(new FormatStringValue(new DurationFormat()))); JScrollPane tableScrollPane = new JScrollPane(table); int border = 5; final double[][] size = { { border, TableLayout.FILL, border}, // Columns { border, TableLayout.PREFERRED, border, TableLayout.FILL } }; // Rows this.setLayout(new TableLayout(size)); this.add(searchField, "1, 1"); this.add(tableScrollPane, "1, 3"); }
/** * Set up GUI components. */ private void initialize() { // Init search field and a list filtered list for the quick search final JSearchField searchField = new JSearchField(); final MatcherEditor<HoursByMonth> textMatcherEditor = new TextComponentMatcherEditor<>(searchField, new HoursByMonthTextFilterator()); final FilterList<HoursByMonth> textFilteredIssues = new FilterList<>(this.report.getHoursByMonth(), textMatcherEditor); tableModel = new EventTableModel<>(textFilteredIssues, new HoursByMonthTableFormat()); final JTable table = new JHighligthedTable(tableModel); TableComparatorChooser.install( table, this.report.getHoursByMonth(), TableComparatorChooser.MULTIPLE_COLUMN_MOUSE ); table.getColumn(table.getColumnName(0)).setCellRenderer(new DefaultTableRenderer(new FormatStringValue(MONTH_FORMAT))); table.getColumn(table.getColumnName(1)).setCellRenderer(new DefaultTableRenderer(new FormatStringValue(YEAR_FORMAT))); table.getColumn(table.getColumnName(2)).setCellRenderer(new DefaultTableRenderer(new FormatStringValue(new DurationFormat()))); JScrollPane tableScrollPane = new JScrollPane(table); int border = 5; final double[][] size = { { border, TableLayout.FILL, border}, // Columns { border, TableLayout.PREFERRED, border, TableLayout.FILL } }; // Rows this.setLayout(new TableLayout(size)); this.add(searchField, "1, 1"); this.add(tableScrollPane, "1, 3"); }
/** * Set up GUI components. */ private void initialize() { // Init search field and a list filtered list for the quick search final JSearchField searchField = new JSearchField(); final MatcherEditor<HoursByDay> textMatcherEditor = new TextComponentMatcherEditor<>(searchField, new HoursByDayTextFilterator()); final FilterList<HoursByDay> textFilteredIssues = new FilterList<>(this.report.getHoursByDay(), textMatcherEditor); tableModel = new EventTableModel<>(textFilteredIssues, new HoursByDayTableFormat()); final JTable table = new JHighligthedTable(tableModel); TableComparatorChooser.install( table, this.report.getHoursByDay(), TableComparatorChooser.MULTIPLE_COLUMN_MOUSE ); table.getColumn(table.getColumnName(0)).setCellRenderer(new DefaultTableRenderer(new FormatStringValue(DAY_FORMAT))); table.getColumn(table.getColumnName(1)).setCellRenderer(new DefaultTableRenderer(new FormatStringValue(new DurationFormat()))); JScrollPane tableScrollPane = new JScrollPane(table); int border = 5; final double[][] size = { { border, TableLayout.FILL, border}, // Columns { border, TableLayout.PREFERRED, border, TableLayout.FILL } }; // Rows this.setLayout(new TableLayout(size)); this.add(searchField, "1, 1"); this.add(tableScrollPane, "1, 3"); }
/** * Set up GUI components. */ private void initialize() { // Init search field and a list filtered list for the quick search final JSearchField searchField = new JSearchField(); final MatcherEditor<HoursByWeek> textMatcherEditor = new TextComponentMatcherEditor<>(searchField, new HoursByWeekTextFilterator()); final FilterList<HoursByWeek> textFilteredIssues = new FilterList<>(this.report.getHoursByWeek(), textMatcherEditor); tableModel = new EventTableModel<>(textFilteredIssues, new HoursByWeekTableFormat()); final JTable table = new JHighligthedTable(tableModel); TableComparatorChooser.install( table, this.report.getHoursByWeek(), TableComparatorChooser.MULTIPLE_COLUMN_MOUSE ); table.getColumn(table.getColumnName(0)).setCellRenderer(new DefaultTableRenderer(new FormatStringValue(WEEK_FORMAT))); table.getColumn(table.getColumnName(1)).setCellRenderer(new DefaultTableRenderer(new FormatStringValue(YEAR_FORMAT))); table.getColumn(table.getColumnName(2)).setCellRenderer(new DefaultTableRenderer(new FormatStringValue(new DurationFormat()))); JScrollPane tableScrollPane = new JScrollPane(table); int border = 5; final double[][] size = { { border, TableLayout.FILL, border}, // Columns { border, TableLayout.PREFERRED, border, TableLayout.FILL } }; // Rows this.setLayout(new TableLayout(size)); this.add(searchField, "1, 1"); this.add(tableScrollPane, "1, 3"); }
/** * Set up GUI components. */ private void initialize() { // Init search field and a list filtered list for the quick search final JSearchField searchField = new JSearchField(); final MatcherEditor<AccumulatedProjectActivity> textMatcherEditor = new TextComponentMatcherEditor<>(searchField, new AccumulatedProjectActivityTextFilterator()); final FilterList<AccumulatedProjectActivity> textFilteredIssues = new FilterList<>(this.report.getAccumulatedActivitiesByDay(), textMatcherEditor); tableModel = new EventTableModel<>(textFilteredIssues, new AccumulatedActivitiesTableFormat()); final JTable table = new JHighligthedTable(tableModel); TableComparatorChooser.install( table, this.report.getAccumulatedActivitiesByDay(), TableComparatorChooser.MULTIPLE_COLUMN_MOUSE ); table.getColumn(table.getColumnName(0)).setCellRenderer(new DefaultTableRenderer(new FormatStringValue(FormatUtils.DAY_FORMAT))); table.getColumn(table.getColumnName(2)).setCellRenderer(new DefaultTableRenderer(new FormatStringValue(new DurationFormat()))); JScrollPane tableScrollPane = new JScrollPane(table); int border = 5; final double[][] size = { { border, TableLayout.FILL, border}, // Columns { border, TableLayout.PREFERRED, border, TableLayout.FILL } }; // Rows this.setLayout(new TableLayout(size)); this.add(searchField, "1, 1"); this.add(tableScrollPane, "1, 3"); }