@Override public void actionPerformed(ActionEvent e) { matcherEditor.setFilterText(filterEdit.getText().split("[ \t]")); } }
public void actionPerformed(ActionEvent e) { matcherEditor.setFilterText(filterEdit.getText().split("[ \t]")); } }
public void actionPerformed(ActionEvent e) { matcherEditor.setFilterText(filterEdit.getText().split("[ \t]")); } }
/** * Update the filter text from the contents of the Document. */ private void refilter() { try { final int mode = getMode(); final String text = document.getText(0, document.getLength()); final String[] filters; // in CONTAINS mode we treat the string as whitespace delimited if (mode == CONTAINS) filters = text.split("[ \t]"); // in STARTS_WITH, REGULAR_EXPRESSION, or EXACT modes we use the string in its entirety else if (mode == STARTS_WITH || mode == REGULAR_EXPRESSION || mode == EXACT) filters = new String[] {text}; else throw new IllegalStateException("Unknown mode: " + mode); setFilterText(filters); } catch (BadLocationException ble) { // this shouldn't ever, ever happen throw new RuntimeException(ble); } }
/** * Update the filter text from the contents of the Document. */ private void refilter() { try { final int mode = getMode(); final String text = document.getText(0, document.getLength()); final String[] filters; // in CONTAINS mode we treat the string as whitespace delimited if (mode == CONTAINS) filters = text.split("[ \t]"); // in STARTS_WITH, REGULAR_EXPRESSION, or EXACT modes we use the string in its entirety else if (mode == STARTS_WITH || mode == REGULAR_EXPRESSION || mode == EXACT) filters = new String[] {text}; else throw new IllegalStateException("Unknown mode: " + mode); setFilterText(filters); } catch (BadLocationException ble) { // this shouldn't ever, ever happen throw new RuntimeException(ble); } }
/** * Update the filter text from the contents of the Document. */ private void refilter() { try { final int mode = getMode(); final String text = document.getText(0, document.getLength()); final String[] filters; // in CONTAINS mode we treat the string as whitespace delimited if (mode == CONTAINS) filters = text.split("[ \t]"); // in STARTS_WITH, REGULAR_EXPRESSION, or EXACT modes we use the string in its entirety else if (mode == STARTS_WITH || mode == REGULAR_EXPRESSION || mode == EXACT) filters = new String[] {text}; else throw new IllegalStateException("Unknown mode: " + mode); setFilterText(filters); } catch (BadLocationException ble) { // this shouldn't ever, ever happen throw new RuntimeException(ble); } }