Package com.jidesoft.swing.event

Examples of com.jidesoft.swing.event.SearchableEvent


    protected void select(int index, String searchingText) {
        if (index != -1) {
            setSelectedIndex(index, true);
            setCursor(index, true);
            Object element = getElementAt(index);
            fireSearchableEvent(new SearchableEvent(this, SearchableEvent.SEARCHABLE_MATCH, searchingText, element, convertElementToString(element)));
        }
        else {
            setSelectedIndex(-1, false);
            fireSearchableEvent(new SearchableEvent(this, SearchableEvent.SEARCHABLE_NOMATCH, searchingText));
        }
    }
View Full Code Here


     *
     * @param searchingText the searching text
     */
    public void showPopup(String searchingText) {
        if (_searchableProvider == null) {
            fireSearchableEvent(new SearchableEvent(this, SearchableEvent.SEARCHABLE_START, searchingText));
            showPopup(createSearchPopup(searchingText));
            _searchableProvider = new SearchableProvider() {
                public String getSearchingText() {
                    return _popup != null ? _popup.getSearchingText() : "";
                }
View Full Code Here

            return;
        }
        int found = findFromCursor(text);
        if (found == -1) {
            firePropertyChangeEvent(text);
            fireSearchableEvent(new SearchableEvent(this, SearchableEvent.SEARCHABLE_NOMATCH, text));
        }
        else {
            firePropertyChangeEvent(text);
            Object element = getElementAt(found);
            fireSearchableEvent(new SearchableEvent(this, SearchableEvent.SEARCHABLE_MATCH, text, element, convertElementToString(element)));
        }
    }
View Full Code Here

                _noMatch.setText(getResourceString("Searchable.noMatch"));
            }
            updatePopupBounds();
            if (index != -1) {
                Object element = getElementAt(index);
                fireSearchableEvent(new SearchableEvent(Searchable.this, SearchableEvent.SEARCHABLE_MATCH, searchingText, element, convertElementToString(element)));
            }
            else {
                fireSearchableEvent(new SearchableEvent(Searchable.this, SearchableEvent.SEARCHABLE_NOMATCH, searchingText));
            }
        }
View Full Code Here

            _comboBox.getEditor().getEditorComponent().setBackground(UIDefaultsLookup.getColor("TextField.background"));
        }
        _searchable.firePropertyChangeEvent(searchingText);
        if (index != -1) {
            Object element = _searchable.getElementAt(index);
            _searchable.fireSearchableEvent(new SearchableEvent(_searchable, SearchableEvent.SEARCHABLE_MATCH, searchingText, element, _searchable.convertElementToString(element)));
        }
        else {
            _searchable.fireSearchableEvent(new SearchableEvent(_searchable, SearchableEvent.SEARCHABLE_NOMATCH, searchingText));
        }
    }
View Full Code Here

                ((Document) evt.getNewValue()).removeDocumentListener(this);
            }
            if (evt.getNewValue() instanceof Document) {
                ((Document) evt.getNewValue()).addDocumentListener(this);
            }
            fireSearchableEvent(new SearchableEvent(this, SearchableEvent.SEARCHABLE_MODEL_CHANGE));
        }
    }
View Full Code Here

    public void insertUpdate(DocumentEvent e) {
        if (isProcessModelChangeEvent()) {
            hidePopup();
            _text = null;
            fireSearchableEvent(new SearchableEvent(this, SearchableEvent.SEARCHABLE_MODEL_CHANGE));
        }
    }
View Full Code Here

    public void removeUpdate(DocumentEvent e) {
        if (isProcessModelChangeEvent()) {
            hidePopup();
            _text = null;
            fireSearchableEvent(new SearchableEvent(this, SearchableEvent.SEARCHABLE_MODEL_CHANGE));
        }
    }
View Full Code Here

    public void changedUpdate(DocumentEvent e) {
        if (isProcessModelChangeEvent()) {
            hidePopup();
            _text = null;
            fireSearchableEvent(new SearchableEvent(this, SearchableEvent.SEARCHABLE_MODEL_CHANGE));
        }
    }
View Full Code Here

                    _layeredPane = null;
                }
            }
            _popup = null;
            _searchableProvider = null;
            fireSearchableEvent(new SearchableEvent(Searchable.this, SearchableEvent.SEARCHABLE_END, "", getCurrentIndex(), _previousSearchText));
        }
        setCursor(-1);
    }
View Full Code Here

TOP

Related Classes of com.jidesoft.swing.event.SearchableEvent

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.