{
final JCheckBoxMenuItem aaConEnabled = new JCheckBoxMenuItem(
aaui.getAAconToggle());
- wsmenu.addMenuListener(new MenuListener()
- {
- @Override
- public void menuSelected(MenuEvent arg0)
- {
- // TODO: refactor to the implementing class.
- wsmenu.setEnabled((alignFrame.getViewport().getAlignment()
- .isNucleotide() ? aaui.isNa() : aaui.isPr()));
- List<AlignCalcWorkerI> aaconClient = alignFrame.getViewport()
- .getCalcManager()
- .getRegisteredWorkersOfClass(aaui.getClient());
- if (aaconClient != null && aaconClient.size() > 0)
- {
- aaConEnabled.setSelected(true);
- }
- else
- {
- aaConEnabled.setSelected(false);
- }
- }
-
- @Override
- public void menuDeselected(MenuEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void menuCanceled(MenuEvent arg0)
- {
- // TODO Auto-generated method stub
-
- }
- });
aaConEnabled.setToolTipText("<html><p>"
+ JvSwingUtils.wrapTooltip(aaui.getAAconToggleTooltip() + "</p>")
+ "</html>");
});
wsmenu.add(aaConEnabled);
- JMenuItem modifyParams = new JMenuItem(aaui.getAAeditSettings());
+ final JMenuItem modifyParams = new JMenuItem(aaui.getAAeditSettings());
modifyParams.setToolTipText("<html><p>"
+ JvSwingUtils.wrapTooltip(aaui.getAAeditSettingsTooltip() + "</p>")
+ "</html>");
}
});
wsmenu.add(modifyParams);
+ wsmenu.addMenuListener(new MenuListener()
+ {
+
+ @Override
+ public void menuSelected(MenuEvent arg0)
+ {
+ // TODO: refactor to the implementing class.
+ if (alignFrame.getViewport().getAlignment()
+ .isNucleotide() ? aaui.isNa() : aaui.isPr()) {
+ aaConEnabled.setEnabled(true);
+ modifyParams.setEnabled(true);
+ }
+ else {
+ aaConEnabled.setEnabled(false);
+ modifyParams.setEnabled(false);
+ }
+ List<AlignCalcWorkerI> aaconClient = alignFrame.getViewport()
+ .getCalcManager()
+ .getRegisteredWorkersOfClass(aaui.getClient());
+ if (aaconClient != null && aaconClient.size() > 0)
+ {
+ aaConEnabled.setSelected(true);
+ }
+ else
+ {
+ aaConEnabled.setSelected(false);
+ }
+ }
+
+ @Override
+ public void menuDeselected(MenuEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void menuCanceled(MenuEvent arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+ });
}
return true;