{
menu1.setLabel(MessageManager.getString("action.edit_group"));
groupMenu.remove(createGroupMenuItem);
+ if (sg.cs != null)
+ {
+ abovePIDColour.setState(sg.cs.getThreshold() > 0);
+ conservationMenuItem.setState(sg.cs.conservationApplied());
+ }
}
-
}
else
{
@Override
public void itemStateChanged(ItemEvent evt)
{
- if (evt.getSource() == abovePIDColour)
+ Object source = evt.getSource();
+ if (source == abovePIDColour)
{
abovePIDColour_itemStateChanged();
}
- else if (evt.getSource() == showColourText)
+ else if (source == conservationMenuItem)
+ {
+ conservationMenuItem_itemStateChanged();
+ }
+ else if (source == showColourText)
{
showColourText_itemStateChanged();
}
- else if (evt.getSource() == showText)
+ else if (source == showText)
{
showText_itemStateChanged();
}
- else if (evt.getSource() == showBoxes)
+ else if (source == showBoxes)
{
showBoxes_itemStateChanged();
}
- else if (evt.getSource() == displayNonconserved)
+ else if (source == displayNonconserved)
{
this.showNonconserved_itemStateChanged();
}
{
noColourmenuItem_actionPerformed();
}
- else if (source == conservationMenuItem)
- {
- conservationMenuItem_itemStateChanged();
- }
else if (source == unGroupMenuItem)
{
unGroupMenuItem_actionPerformed();
import javax.swing.JColorChooser;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
-import javax.swing.JOptionPane;
import javax.swing.JPopupMenu;
import javax.swing.JRadioButtonMenuItem;
colours.add(strandColour);
colours.add(turnColour);
colours.add(buriedColour);
- colours.add(abovePIDColour);
colours.add(userDefinedColour);
colours.add(PIDColour);
colours.add(BLOSUM62Colour);
noColourmenuItem.setSelected(true);
}
- if (sg.cs != null && sg.cs.conservationApplied())
+ if (sg.cs != null)
{
+ if (sg.cs.conservationApplied())
+ {
conservationMenuItem.setSelected(true);
+ }
+ if (sg.cs.getThreshold() > 0)
+ {
+ abovePIDColour.setSelected(true);
+ }
}
displayNonconserved.setSelected(sg.getShowNonconserved());
showText.setSelected(sg.getDisplayText());