else if (label.indexOf("Consensus") > -1
|| label.indexOf("Information Content") > -1)
{
+ // identifier for type of histogram and/or logo to be shown
+ int type = 2;
+ if (label.indexOf("Consensus") > -1)
+ {
+ type = 0;
+ }
+ else if (label.indexOf("Information Content") > -1)
+ {
+ type = 1;
+ }
+
pop.addSeparator();
// av and sequencegroup need to implement same interface for
+ final AlignmentAnnotation aaa = aa[selectedRow];
+ if (type == 0)
+ {
final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(
- MessageManager.getString("label.ignore_gaps_consensus"),
+ MessageManager.getString("label.ignore_gaps_consensus"),
(aa[selectedRow].groupRef != null) ? aa[selectedRow].groupRef
.getIgnoreGapsConsensus() : ap.av
.isIgnoreGapsConsensus());
- final AlignmentAnnotation aaa = aa[selectedRow];
+
cbmi.addActionListener(new ActionListener()
{
@Override
}
});
pop.add(cbmi);
+ }
+ if (type == 1)
+ {
+ final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(
+ "Ignore Below Background Frequency",
+ (aa[selectedRow].groupRef != null)
+ ? aa[selectedRow].groupRef
+ .getIgnoreBelowBackground()
+ : ap.av.isIgnoreBelowBackground());
+
+ cbmi.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ if (aaa.groupRef != null)
+ {
+ // TODO: pass on reference to ap so the view can be updated.
+ aaa.groupRef.setIgnoreBelowBackground(cbmi.getState());
+ ap.getAnnotationPanel()
+ .paint(ap.getAnnotationPanel().getGraphics());
+ }
+ else
+ {
+ ap.av.setIgnoreBelowBackground(cbmi.getState(), ap);
+ }
+ ap.alignmentChanged();
+ }
+ });
+ pop.add(cbmi);
+ }
// av and sequencegroup need to implement same interface for
if (aaa.groupRef != null)
{