minColour.setBackground(acg.getMinColour());
maxColour.setBackground(acg.getMaxColour());
}
+ seqAssociated.setSelected(acg.isSeqAssociated());
}
-
adjusting = true;
Vector list = new Vector();
int index = 1;
adjusting = false;
changeColour();
- validate();
+ frame.invalidate();
+ frame.pack();
}
thresholdIsMin_actionPerformed(actionEvent);
}
});
+ seqAssociated.setBackground(Color.white);
+ seqAssociated.setFont(JvSwingUtils.getLabelFont());
+ seqAssociated.setText("Per-sequence only");
+ seqAssociated.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent arg0)
+ {
+ seqAssociated_actionPerformed(arg0);
+ }
+ });
+
this.setLayout(borderLayout1);
jPanel2.setLayout(new MigLayout("","[left][center][right]","[][][]"));
jPanel1.setBackground(Color.white);
colpanel.add(minColour);
colpanel.add(maxColour);
jPanel2.add(colpanel, "wrap");
-
+ jPanel2.add(seqAssociated, "wrap");
jPanel2.add(threshold);
jPanel2.add(defColours,"skip 1, wrap");
jPanel2.add(thresholdIsMin);
jPanel2.add(thresholdValue, "grow");
this.add(jPanel1, java.awt.BorderLayout.SOUTH);
this.add(jPanel2, java.awt.BorderLayout.CENTER);
+ this.validate();
+ }
+
+ protected void seqAssociated_actionPerformed(ActionEvent arg0)
+ {
+ changeColour();
}
protected void resetColours_actionPerformed(ActionEvent arg0)
JCheckBox currentColours = new JCheckBox();
JCheckBox thresholdIsMin = new JCheckBox();
+
+ JCheckBox seqAssociated = new JCheckBox();
public void minColour_actionPerformed()
{
minColour.getBackground(), maxColour.getBackground(),
aboveThreshold);
}
+ acg.setSeqAssociated(seqAssociated.isSelected());
if (currentAnnotation.graphMin == 0f
&& currentAnnotation.graphMax == 0f)
{
sg.cs = new AnnotationColourGradient(currentAnnotation, sg.cs,
aboveThreshold);
+ ((AnnotationColourGradient)sg.cs).setSeqAssociated(seqAssociated.isSelected());
+
}
else
{
sg.cs = new AnnotationColourGradient(currentAnnotation,
minColour.getBackground(), maxColour.getBackground(),
aboveThreshold);
+ ((AnnotationColourGradient)sg.cs).setSeqAssociated(seqAssociated.isSelected());
}
}
}
+ ap.alignmentChanged();
// ensure all associated views (overviews, structures, etc) are notified of updated colours.
ap.paintAlignment(true);
}