protected void showPopupMenu(final int rowSelected, final String type,
final Object typeCol, final Point pt)
{
- final FeatureColourI featureColour = (FeatureColourI) typeCol;
-
JPopupMenu men = new JPopupMenu(MessageManager
.formatMessage("label.settings_for_param", new String[]
{ type }));
- JMenuItem scr = new JMenuItem(
- MessageManager.getString("label.sort_by_score"));
- men.add(scr);
- scr.addActionListener(new ActionListener()
- {
-
- @Override
- public void actionPerformed(ActionEvent e)
- {
- af.avc.sortAlignmentByFeatureScore(Arrays.asList(new String[]
- { type }));
- }
- });
- JMenuItem dens = new JMenuItem(
- MessageManager.getString("label.sort_by_density"));
- dens.addActionListener(new ActionListener()
- {
-
- @Override
- public void actionPerformed(ActionEvent e)
- {
- af.avc.sortAlignmentByFeatureDensity(Arrays.asList(new String[]
- { type }));
- }
- });
- men.add(dens);
+ final FeatureColourI featureColour = (FeatureColourI) typeCol;
/*
- * variable colour options include colour by label, by score,
- * by selected attribute text, or attribute value
+ * menu option to select (or deselect) variable colour
*/
final JCheckBoxMenuItem variableColourCB = new JCheckBoxMenuItem(
MessageManager.getString("label.variable_colour"));
FeatureColourI fci = fr.getFeatureColours().get(type);
table.setValueAt(fci, rowSelected, COLOUR_COLUMN);
// BH 2018 setting a table value does not invalidate it.
-// System.out.println("FeatureSettings is valied" + table.isValid());
-// table.validate();
+// System.out.println("FeatureSettings is valied" + table.isValid());
+// table.validate();
}
}
}
});
+
+ men.addSeparator();
+
+ JMenuItem scr = new JMenuItem(
+ MessageManager.getString("label.sort_by_score"));
+ men.add(scr);
+ scr.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ af.avc.sortAlignmentByFeatureScore(Arrays.asList(new String[]
+ { type }));
+ }
+ });
+ JMenuItem dens = new JMenuItem(
+ MessageManager.getString("label.sort_by_density"));
+ dens.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ af.avc.sortAlignmentByFeatureDensity(Arrays.asList(new String[]
+ { type }));
+ }
+ });
+ men.add(dens);
JMenuItem selCols = new JMenuItem(
MessageManager.getString("label.select_columns_containing"));