+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ me.ap.alignFrame.avc
+ .sortAlignmentByFeatureDensity(Arrays.asList(new String[]
+ { type }));
+ }
+
+ });
+ men.add(dens);
+
+ if (minmax != null)
+ {
+ final float[][] typeMinMax = minmax.get(type);
+ /*
+ * final java.awt.CheckboxMenuItem chb = new
+ * java.awt.CheckboxMenuItem("Vary Height"); // this is broken at the
+ * moment chb.setState(minmax.get(type) != null);
+ * chb.addActionListener(new ActionListener() {
+ *
+ * public void actionPerformed(ActionEvent e) {
+ * chb.setState(chb.getState()); if (chb.getState()) { minmax.put(type,
+ * null); } else { minmax.put(type, typeMinMax); } }
+ *
+ * }); men.add(chb);
+ */
+ if (typeMinMax != null && typeMinMax[0] != null)
+ {
+ // graduated colourschemes for those where minmax exists for the
+ // positional features
+ MenuItem mxcol = new MenuItem(
+ (typeCol.isSimpleColour()) ? "Graduated Colour"
+ : "Single Colour");
+ men.add(mxcol);
+ mxcol.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ if (typeCol.isSimpleColour())
+ {
+ new FeatureColourChooser(me, type);
+ // write back the current colour object to update the table
+ check.updateColor(fr.getFeatureStyle(type));
+ }
+ else
+ {
+ new UserDefinedColours(me, check.type, typeCol);
+ }
+ }
+
+ });
+ }
+ }
+
+ MenuItem selectContaining = new MenuItem(
+ MessageManager.getString("label.select_columns_containing"));
+ selectContaining.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ me.ap.alignFrame.avc.markColumnsContainingFeatures(false, false,
+ false, type);
+ }
+ });
+ men.add(selectContaining);
+
+ MenuItem selectNotContaining = new MenuItem(MessageManager
+ .getString("label.select_columns_not_containing"));
+ selectNotContaining.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ me.ap.alignFrame.avc.markColumnsContainingFeatures(true, false,
+ false, type);
+ }
+ });
+ men.add(selectNotContaining);
+
+ MenuItem hideContaining = new MenuItem(
+ MessageManager.getString("label.hide_columns_containing"));
+ hideContaining.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ hideFeatureColumns(type, true);
+ }
+ });
+ men.add(hideContaining);
+
+ MenuItem hideNotContaining = new MenuItem(
+ MessageManager.getString("label.hide_columns_not_containing"));
+ hideNotContaining.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ hideFeatureColumns(type, false);
+ }
+ });
+ men.add(hideNotContaining);
+
+ this.featurePanel.add(men);
+ men.show(this.featurePanel, x, y);
+ }
+
+ @Override
+ public void discoverAllFeatureData()
+ {
+ if (fr.getAllFeatureColours() != null
+ && fr.getAllFeatureColours().size() > 0)
+ {
+ // rebuildGroups();
+