private Hashtable<SequenceGroup, ColourSchemeI> oldgroupColours;
- private JCheckBox currentColours = new JCheckBox();
+ private JCheckBox useOriginalColours = new JCheckBox();
private JPanel minColour = new JPanel();
if (oldcs instanceof AnnotationColourGradient)
{
AnnotationColourGradient acg = (AnnotationColourGradient) oldcs;
- currentColours.setSelected(acg.isPredefinedColours()
+ useOriginalColours.setSelected(acg.isPredefinedColours()
|| acg.getBaseColour() != null);
if (!acg.isPredefinedColours() && acg.getBaseColour() == null)
{
}
});
- currentColours.setFont(JvSwingUtils.getLabelFont());
- currentColours.setOpaque(false);
- currentColours.setText(MessageManager
+ useOriginalColours.setFont(JvSwingUtils.getLabelFont());
+ useOriginalColours.setOpaque(false);
+ useOriginalColours.setText(MessageManager
.getString("label.use_original_colours"));
- currentColours.addActionListener(new ActionListener()
+ useOriginalColours.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
- currentColours_actionPerformed();
+ originalColours_actionPerformed();
}
});
thresholdIsMin.setBackground(Color.white);
jPanel1.add(cancel);
jPanel2.add(annotations, "grow, wrap");
jPanel2.add(seqAssociated);
- jPanel2.add(currentColours);
+ jPanel2.add(useOriginalColours);
JPanel colpanel = new JPanel(new FlowLayout());
colpanel.setBackground(Color.white);
colpanel.add(minColour);
{
if (slider.isEnabled())
{
- if (currentColours.isSelected()
+ if (useOriginalColours.isSelected()
&& !(av.getGlobalColourScheme() instanceof AnnotationColourGradient))
{
updateView();
}
}
- public void currentColours_actionPerformed()
+ public void originalColours_actionPerformed()
{
- if (currentColours.isSelected())
+ boolean selected = useOriginalColours.isSelected();
+ if (selected)
{
reset();
}
- maxColour.setEnabled(!currentColours.isSelected());
- minColour.setEnabled(!currentColours.isSelected());
+ maxColour.setEnabled(!selected);
+ minColour.setEnabled(!selected);
+ thresholdIsMin.setEnabled(!selected);
updateView();
}
slider.setEnabled(true);
thresholdValue.setEnabled(true);
- thresholdIsMin.setEnabled(true);
+ thresholdIsMin.setEnabled(!useOriginalColours.isSelected());
if (selectedThresholdItem == AnnotationColourGradient.NO_THRESHOLD)
{
{
AnnotationColourGradient acg = null;
- if (currentColours.isSelected())
+ if (useOriginalColours.isSelected())
{
acg = new AnnotationColourGradient(currentAnn,
av.getGlobalColourScheme(), selectedThresholdOption);
continue;
}
- if (currentColours.isSelected())
+ if (useOriginalColours.isSelected())
{
sg.setColourScheme(new AnnotationColourGradient(currentAnn, sg
.getColourScheme(), selectedThresholdOption));