/** * Sets the main index. Main index is the column index which you want to be searched. * * @param mainIndex the index of the column to be searched. If -1, all columns will be searched. */ public void setMainIndex(int mainIndex) { int[] temp = {mainIndex}; if (mainIndex < 0) { temp = new int[0]; } int[] old = _searchColumnIndices; if (old != temp) { _searchColumnIndices = temp; hidePopup(); } }
/** * Sets the main indexes. Main indexes are the columns index which you want to be searched. * * @param columnIndices the index of the columns to be searched. If empty, all columns will be searched. */ public void setSearchColumnIndices(int[] columnIndices) { if (columnIndices == null) { columnIndices = new int[0]; } int[] old = _searchColumnIndices; if (!JideSwingUtilities.equals(old, columnIndices, true)) { _searchColumnIndices = columnIndices; hidePopup(); } }
public void propertyChange(PropertyChangeEvent evt) { if ("model".equals(evt.getPropertyName())) { hidePopup(); if (evt.getOldValue() instanceof TableModel) { ((TableModel) evt.getOldValue()).removeTableModelListener(this); } if (evt.getNewValue() instanceof TableModel) { ((TableModel) evt.getNewValue()).addTableModelListener(this); } fireSearchableEvent(new SearchableEvent(this, SearchableEvent.SEARCHABLE_MODEL_CHANGE)); } }
public void tableChanged(TableModelEvent e) { if (isProcessModelChangeEvent()) { hidePopup(); fireSearchableEvent(new SearchableEvent(this, SearchableEvent.SEARCHABLE_MODEL_CHANGE)); } }