import javax.swing.border.Border;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
-import javax.swing.plaf.TableUI;
import javax.swing.table.AbstractTableModel;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
JMenuItem scr = new JMenuItem(
MessageManager.getString("label.sort_by_score"));
men.add(scr);
- final FeatureSettings me = this;
scr.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
- me.af.avc
- .sortAlignmentByFeatureScore(Arrays.asList(new String[]
+ af.avc.sortAlignmentByFeatureScore(Arrays.asList(new String[]
{ type }));
}
});
@Override
public void actionPerformed(ActionEvent e)
{
- me.af.avc
- .sortAlignmentByFeatureDensity(Arrays.asList(new String[]
+ af.avc.sortAlignmentByFeatureDensity(Arrays.asList(new String[]
{ type }));
}
});
/*
* toggle simple colour to variable colour - show dialog
*/
- FeatureTypeSettings fc = new FeatureTypeSettings(me.fr, type);
+ FeatureTypeSettings fc = new FeatureTypeSettings(fr, type);
fc.addActionListener(this);
}
else
table.setValueAt(new FeatureColour(c), rowSelected,
COLOUR_COLUMN);
table.validate();
- me.updateFeatureRenderer(
+ updateFeatureRenderer(
((FeatureTableModel) table.getModel()).getData(),
false);
}
};
- JalviewColourChooser.showColourChooser(me, title, featureColour.getMaxColour(), listener);
+ JalviewColourChooser.showColourChooser(FeatureSettings.this, title,
+ featureColour.getMaxColour(), listener);
}
}
else
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());
+// System.out.println("FeatureSettings is valied" + table.isValid());
// table.validate();
}
}
class ColorEditor extends AbstractCellEditor
implements TableCellEditor, ActionListener
{
-// FeatureSettings me;
-
FeatureColourI currentColor;
FeatureTypeSettings chooser;
}
}
- // Implement the one CellEditor method that AbstractCellEditor doesn't.
+ /**
+ * Override allows access to this method from anonymous inner classes
+ */
+ @Override
+ protected void fireEditingStopped()
+ {
+ super.fireEditingStopped();
+ }
+
+ // Implement the one CellEditor method that AbstractCellEditor doesn't.
@Override
public Object getCellEditorValue()
{
this.rowSelected = row;
type = table.getValueAt(row, TYPE_COLUMN).toString();
button.setOpaque(true);
- button.setBackground(getBackground());
+ button.setBackground(FeatureSettings.this.getBackground());
if (!currentColor.isSimpleColour())
{
JLabel btn = new JLabel();
this.rowSelected = row;
type = table.getValueAt(row, TYPE_COLUMN).toString();
button.setOpaque(true);
- button.setBackground(getBackground());
+ button.setBackground(FeatureSettings.this.getBackground());
button.setText(currentFilter.toString());
button.setIcon(null);
return button;