//TODO escape special characters
private void filter() {
                String text = DrugMappingStringUtilities.safeToUpperCase(searchField.getText());
                if (text.length() == 0) {
                    rowSorter.setRowFilter(null);
                }
                else {
                	//TODO escape special characters
                    rowSorter.setRowFilter(RowFilter.regexFilter(text));
                }
                if (rowSorter.getViewRowCount() == 0) {
            		ingredientMappingLogPanel.removeAll();
            		ingredientMappingResultPanel.removeAll();
            		mainFrame.getFrame().repaint();
                }
                if (ingredientsTable.getRowCount() > 0) {
            		ListSelectionModel selectionModel = ingredientsTable.getSelectionModel();
            		selectionModel.setSelectionInterval(0, 0);
                }
             }
}
else {
//TODO escape special characters
rowSorter.setRowFilter(RowFilter.regexFilter(text));
}
private void filter() {
String text = DrugMappingStringUtilities.safeToUpperCase(searchField.getText());
if (text.length() == 0) {
rowSorter.setRowFilter(null);
}
else {
//TODO escape special characters
rowSorter.setRowFilter(RowFilter.regexFilter(text));
}
if (rowSorter.getViewRowCount() == 0) {
ingredientMappingLogPanel.removeAll();
ingredientMappingResultPanel.removeAll();
mainFrame.getFrame().repaint();
}
if (ingredientsTable.getRowCount() > 0) {
ListSelectionModel selectionModel = ingredientsTable.getSelectionModel();
selectionModel.setSelectionInterval(0, 0);
private void filter() {
String text = DrugMappingStringUtilities.safeToUpperCase(searchField.getText());
if (text.length() == 0) {
rowSorter.setRowFilter(null);
}
else {
//TODO escape special characters
rowSorter.setRowFilter(RowFilter.regexFilter(text));
}
if (rowSorter.getViewRowCount() == 0) {
ingredientMappingLogPanel.removeAll();
ingredientMappingResultPanel.removeAll();
mainFrame.getFrame().repaint();
}
if (ingredientsTable.getRowCount() > 0) {
ListSelectionModel selectionModel = ingredientsTable.getSelectionModel();
selectionModel.setSelectionInterval(0, 0);
}
}