Package ca.odell.glazedlists

Examples of ca.odell.glazedlists.FilterList


        eventList = getRootEventList();
       
        // Install the matcher if configured (this will filter the list)
        if (matcher != null)
            eventList = new FilterList(eventList, matcher);
        else if (matcherEditor != null)
            eventList = new FilterList(eventList, matcherEditor);

        String sortProperty = getColumnPropertyNames()[0];
        SortedList sortedList = new SortedList(eventList,
                new PropertyComparator(sortProperty, true, true));
        eventList = sortedList;
View Full Code Here


     * source {@link EventList}.
     *
     * <p>Extending classes must call handleFilterChanged().
     */
    protected AbstractFilterList(EventList source) {
        super(new FilterList(source));
       
        // listen for changes to the source list
        this.source.addListEventListener(this);
    }
View Full Code Here

     * source list.
     */
    protected void handleFilterCleared() {
        if(editor == null) {
            editor = new PrivateMatcherEditor();
            FilterList filterList = (FilterList)super.source;
            filterList.setMatcherEditor(editor);
        } else {
            editor.fireCleared();
        }
    }
View Full Code Here

     * 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();
        }
    }
View Full Code Here

    }


    /** {@inheritDoc} */
    public void dispose() {
        FilterList filteredSource = (FilterList)source;
        super.dispose();
        filteredSource.dispose();
    }
View Full Code Here

     * Prepare for the test.
     */
    public void setUp() {
        textMatcherEditor = new TextMatcherEditor(GlazedLists.toStringTextFilterator());
        threadedMatcherEditor = new ThreadedMatcherEditor(textMatcherEditor);
        filterList = new FilterList(new BasicEventList(), threadedMatcherEditor);

        matchAll = new MatcherEditor.Event(threadedMatcherEditor, MatcherEditor.Event.MATCH_ALL, Matchers.trueMatcher());
        matchNone = new MatcherEditor.Event(threadedMatcherEditor, MatcherEditor.Event.MATCH_NONE, Matchers.falseMatcher());
        matchRelaxed = new MatcherEditor.Event(threadedMatcherEditor, MatcherEditor.Event.RELAXED, threadedMatcherEditor.getMatcher());
        matchConstrained = new MatcherEditor.Event(threadedMatcherEditor, MatcherEditor.Event.CONSTRAINED, threadedMatcherEditor.getMatcher());
View Full Code Here

            // setup below, the text entered by the user will be matched against the values
            // in the lastName and address.address1 properties of the contacts in the table.
            // The GlazedLists filtered lists is used to accomplish this.
            EventList baseList = contactTable.getBaseEventList();
            TextFilterator filterator = GlazedLists.textFilterator(new String[]{"lastName", "address.address1"});
            FilterList filterList = new FilterList(baseList, new TextComponentMatcherEditor(filterField, filterator));

            // Install the fully constructed (layered) list into the table
            contactTable.setFinalEventList(filterList);

            // Install the popup menu
View Full Code Here

        eventList = getRootEventList();

        // Install the matcher if configured (this will filter the list)
        if( matcher != null ) {
            eventList = new FilterList(eventList, matcher);
        } else if( matcherEditor != null ) {
            eventList = new FilterList(eventList, matcherEditor);
        }

        // Install the sorter if configured
        SortedList sortedList = null;
        if( comparator != null || useSortedList()) {
View Full Code Here

        final ValueModel2EventListBridge itemRefresher = new ValueModel2EventListBridge(selectableItemsHolder,
                eventList, true);

        ListSelectionDialog selectionDialog = null;
        if (filtered) {
            FilterListSelectionDialog filterDialog = new FilterListSelectionDialog("", null, new FilterList(eventList));
            if (filterProperties == null) {
                filterDialog.setFilterator(new StringTextFilterator());
            } else {
                filterDialog.setFilterator(new BeanTextFilterator(filterProperties));
            }
View Full Code Here

        sortedProjects = new SortedList( projectsEventList, new ProjectNameComparator() );
       
        selectedProjectsModel = new EventSelectionModel( sortedProjects );
        selectedProjectsModel.setSelectionMode( ListSelection.MULTIPLE_INTERVAL_SELECTION_DEFENSIVE );
       
        FilterList textFilteredIssues = new FilterList( sortedProjects,
            new TextComponentMatcherEditor( filterEditor, new ProjectTextFilterator()) );

        EventTableModel statusTableModel = new EventTableModel( textFilteredIssues, format );
      
        statusTable = new JTable(statusTableModel);
View Full Code Here

TOP

Related Classes of ca.odell.glazedlists.FilterList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.