/*
* the panel with the filters for the selected feature type
*/
- chooseFiltersPanel = new JPanel(new GridLayout(0, 1));
- chooseFiltersPanel.setBackground(Color.white);
- chooseFiltersPanel.setBorder(BorderFactory
+ JPanel filtersPanel = new JPanel(new GridLayout(0, 1));
+ filtersPanel.setBackground(Color.white);
+ filtersPanel.setBorder(BorderFactory
.createTitledBorder(MessageManager.getString("label.filters")));
/*
+ * add AND or OR radio buttons
+ */
+ JPanel andOrPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
+ andOrPanel.setBackground(Color.white);
+ andFilters = new JRadioButton("And");
+ orFilters = new JRadioButton("Or");
+ ActionListener actionListener = new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ filtersChanged();
+ }
+ };
+ 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(new GridLayout(0, 1));
+ filtersPanel.add(chooseFiltersPanel);
+
+ /*
* a read-only text view of the current filters
*/
JPanel showFiltersPanel = new JPanel(new BorderLayout(5, 5));
filtersPane.setLayout(new BorderLayout());
filtersPane.add(chooseTypePanel, BorderLayout.NORTH);
- filtersPane.add(chooseFiltersPanel, BorderLayout.CENTER);
+ filtersPane.add(filtersPanel, BorderLayout.CENTER);
filtersPane.add(showFiltersPanel, BorderLayout.SOUTH);
/*
filters.clear();
/*
- * add AND or OR radio buttons
- */
- JPanel andOrPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
- andOrPanel.setBackground(Color.white);
- andFilters = new JRadioButton("And");
- orFilters = new JRadioButton("Or");
- ActionListener actionListener = new ActionListener()
- {
- @Override
- public void actionPerformed(ActionEvent e)
- {
- filtersChanged();
- }
- };
- 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);
- chooseFiltersPanel.add(andOrPanel);
-
- /*
* look up attributes known for feature type
*/
List<String> attNames = FeatureAttributes.getInstance().getAttributes(
* if this feature type has filters set, load them first
*/
KeyedMatcherSetI featureFilters = fr.getFeatureFilter(selectedType);
- andFilters.setSelected(true);
filtersAsText.setText("");
if (featureFilters != null)
{