ColourMenuHelper.setColourSelected(colourMenu, schemeName);
}
-
- /**
- * Disable inapplicable items in the Select menu when it is clicked
- */
- @Override
- protected void configureSelectMenu()
- {
- createGroup.setEnabled(false);
- unGroup.setEnabled(false);
- SequenceGroup sg = viewport.getSelectionGroup();
- if (sg != null)
- {
- List<SequenceGroup> groups = viewport.getAlignment().getGroups();
- createGroup.setEnabled(groups == null || !groups.contains(sg));
- unGroup.setEnabled(groups != null && groups.contains(sg));
- }
- }
}
class PrintThread extends Thread
private SplitContainerI splitFrame;
- protected JMenuItem createGroup;
-
- protected JMenuItem unGroup;
-
public GAlignFrame()
{
try
}
});
- createGroup = new JMenuItem(
+ JMenuItem createGroup = new JMenuItem(
MessageManager.getString("action.create_group"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, Toolkit
.getDefaultToolkit().getMenuShortcutKeyMask(), false);
};
addMenuActionAndAccelerator(keyStroke, createGroup, al);
- unGroup = new JMenuItem(
+ JMenuItem unGroup = new JMenuItem(
MessageManager.getString("action.remove_group"));
keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_G, Toolkit
.getDefaultToolkit().getMenuShortcutKeyMask()
formatMenu.setText(MessageManager.getString("action.format"));
JMenu selectMenu = new JMenu(MessageManager.getString("action.select"));
- selectMenu.addMenuListener(new MenuListener()
- {
- @Override
- public void menuSelected(MenuEvent e)
- {
- configureSelectMenu();
- }
- @Override
- public void menuDeselected(MenuEvent e)
- {
- }
-
- @Override
- public void menuCanceled(MenuEvent e)
- {
- }
- });
idRightAlign.setText(MessageManager
.getString("label.right_align_sequence_id"));
idRightAlign.addActionListener(new ActionListener()