import java.awt.Font;
import java.awt.Graphics;
import java.awt.GridLayout;
+import java.awt.LayoutManager;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
private JTextArea filtersAsText;
+ // set white normally, black to debug layout
+ private Color debugBorderColour = Color.white;
+
/**
* Constructor
*
*/
JPanel andOrPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
andOrPanel.setBackground(Color.white);
+ andOrPanel.setBorder(BorderFactory.createLineBorder(debugBorderColour));
andFilters = new JRadioButton("And");
orFilters = new JRadioButton("Or");
ActionListener actionListener = new ActionListener()
* panel with filters - populated by refreshFiltersDisplay
*/
chooseFiltersPanel = new JPanel();
- chooseFiltersPanel.setLayout(new BoxLayout(chooseFiltersPanel,
- BoxLayout.Y_AXIS));
+ LayoutManager box = new BoxLayout(chooseFiltersPanel,
+ BoxLayout.Y_AXIS);
+ chooseFiltersPanel.setLayout(box);
filtersPanel.add(chooseFiltersPanel);
/*
}
if (!found)
{
- filteredFeatureChoice // todo i18n
- .addItem("No filterable feature attributes known");
+ filteredFeatureChoice.addItem(MessageManager
+ .getString("label.no_feature_attributes"));
+ filteredFeatureChoice.setEnabled(false);
}
filteredFeatureChoice.addItemListener(listener);
-
}
/**
.getCondition();
String pattern = filter.getMatcher().getPattern();
JPanel row = addFilter(key, attNames, condition, pattern, filterIndex);
+ row.setBorder(BorderFactory.createLineBorder(debugBorderColour));
chooseFiltersPanel.add(row);
filterIndex++;
}
+ // chooseFiltersPanel.add(Box.createVerticalGlue());
filtersPane.validate();
filtersPane.repaint();
filterRow.setBackground(Color.white);
/*
- * inputs for attribute, condition, pattern
- */
- /*
* drop-down choice of attribute, with description as a tooltip
* if we can obtain it
*/
*/
if (pattern != null && pattern.trim().length() > 0)
{
- // todo: gif for - button
+ // todo: gif for button drawing '-' or 'x'
JButton removeCondition = new BasicArrowButton(SwingConstants.WEST);
removeCondition.setToolTipText(MessageManager
.getString("label.delete_row"));