+ JPanel byValuePanel = new JPanel();
+ byValuePanel.setLayout(new BoxLayout(byValuePanel, BoxLayout.Y_AXIS));
+ byValuePanel.setBorder(BorderFactory.createTitledBorder(MessageManager
+ .getString("label.colour_by_value")));
+ byValuePanel.setBackground(Color.white);
+
+ /*
+ * first row - choose colour by score or by attribute, choose attribute
+ */
+ JPanel byWhatPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
+ byWhatPanel.setBackground(Color.white);
+ byValuePanel.add(byWhatPanel);
+
+ byScore.setText(MessageManager.getString("label.score"));
+ byWhatPanel.add(byScore);
+ byScore.addActionListener(changeColourAction);
+
+ byAttributeValue.setText(MessageManager
+.getString("label.attribute"));
+ byAttributeValue.addActionListener(changeColourAction);
+ byWhatPanel.add(byAttributeValue);
+
+ List<String> attNames = FeatureAttributes.getInstance().getAttributes(
+ type);
+ valueAttributeCombo = populateAttributesDropdown(type, attNames,
+ true);
+
+ /*
+ * if no numeric atttibutes found, disable colour by attribute value
+ */
+ if (valueAttributeCombo.getItemCount() == 0)
+ {
+ byAttributeValue.setEnabled(false);
+ }
+
+ byWhatPanel.add(valueAttributeCombo);
+
+ /*
+ * second row - min/max/no colours
+ */
+ JPanel colourRangePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
+ colourRangePanel.setBackground(Color.white);
+ byValuePanel.add(colourRangePanel);
+
+ minColour.setFont(JvSwingUtils.getLabelFont());
+ minColour.setBorder(BorderFactory.createLineBorder(Color.black));
+ minColour.setPreferredSize(new Dimension(40, 20));
+ minColour.setToolTipText(MessageManager.getString("label.min_colour"));
+ minColour.addMouseListener(new MouseAdapter()