- private void newFilter(String regex) {
- RowFilter<TableModel,Object> filter = null;
- try {
- // The "(?iu)" magic turns on case insensitivity with unicode chars
- filter = RowFilter.regexFilter("(?iu)"+regex);
- } catch ( java.util.regex.PatternSyntaxException e ) {
- // FIXME - do we want to remove the filter?
- return;
+ private void updateFilters() {
+ List<RowFilter<TableModel, Object>> filters = new ArrayList<RowFilter<TableModel, Object>>(2);
+ String filterTextRegex = filterText.getText();
+ if (filterTextRegex != null) {
+ try {
+ // The "(?iu)" magic turns on case insensitivity with unicode chars
+ RowFilter<TableModel, Object> regexFilter = RowFilter.regexFilter("(?iu)" + filterTextRegex);
+ filters.add(regexFilter);
+ } catch (java.util.regex.PatternSyntaxException e) {
+ }
+ }
+ if (aftDiameterFilterCheckBox.isSelected()) {
+ filters.add(aftDiameterFilter);
+ }
+ if (foreDiameterFilterCheckBox.isSelected()) {
+ filters.add(foreDiameterFilter);
+ }
+
+ componentSelectionTable.setRowFilter(RowFilter.andFilter(filters));
+ }
+
+
+ private SymmetricComponent getPreviousSymmetricComponent() {
+ RocketComponent c = component;
+ while (c != null) {
+ c = c.getPreviousComponent();
+ if (c instanceof SymmetricComponent) {
+ return (SymmetricComponent) c;
+ }
+ }
+ return null;
+ }
+
+
+ private SymmetricComponent getNextSymmetricComponent() {
+ RocketComponent c = component;
+ while (c != null) {
+ c = c.getNextComponent();
+ if (c instanceof SymmetricComponent) {
+ return (SymmetricComponent) c;
+ }