+ };
+ andFilters.addActionListener(actionListener);
+ orFilters.addActionListener(actionListener);
+ ButtonGroup andOr = new ButtonGroup();
+ andOr.add(andFilters);
+ andOr.add(orFilters);
+ andFilters.setSelected(true);
+ andOrPanel.add(new JLabel(MessageManager
+ .getString("label.join_conditions")));
+ andOrPanel.add(andFilters);
+ andOrPanel.add(orFilters);
+ filtersPanel.add(andOrPanel);
+
+ /*
+ * panel with filters - populated by refreshFiltersDisplay
+ */
+ chooseFiltersPanel = new JPanel();
+ LayoutManager box = new BoxLayout(chooseFiltersPanel,
+ BoxLayout.Y_AXIS);
+ chooseFiltersPanel.setLayout(box);
+ filtersPanel.add(chooseFiltersPanel);
+
+ /*
+ * a read-only text view of the current filters
+ */
+ JPanel showFiltersPanel = new JPanel(new BorderLayout(5, 5));
+ showFiltersPanel.setBackground(Color.white);
+ JvSwingUtils.createItalicTitledBorder(showFiltersPanel,
+ MessageManager.getString("label.match_condition"), true);
+ filtersAsText = new JTextArea();
+ filtersAsText.setLineWrap(true);
+ filtersAsText.setWrapStyleWord(true);
+ showFiltersPanel.add(filtersAsText);
+
+ filtersPane.setLayout(new BorderLayout());
+ filtersPane.add(chooseTypePanel, BorderLayout.NORTH);
+ filtersPane.add(filtersPanel, BorderLayout.CENTER);
+ filtersPane.add(showFiltersPanel, BorderLayout.SOUTH);
+
+ /*
+ * update display for initial feature type selection
+ */
+ refreshFiltersDisplay();
+ }
+
+ /**
+ * Adds entries to the 'choose feature to filter' drop-down choice. Only
+ * feature types which have known attributes (so can be filtered) are
+ * included, so recall this method to update the list (check for newly added
+ * attributes).
+ */
+ protected void populateFilterableFeatures()
+ {
+ /*
+ * suppress action handler while updating the list
+ */
+ ItemListener listener = filteredFeatureChoice.getItemListeners()[0];
+ filteredFeatureChoice.removeItemListener(listener);
+
+ filteredFeatureChoice.removeAllItems();
+ ReverseListIterator<String> types = new ReverseListIterator<>(
+ fr.getRenderOrder());