import jalview.analysis.AlignmentAnnotationUtils;
import jalview.analysis.AlignmentUtils;
import jalview.analysis.Conservation;
+import jalview.api.AlignCalcWorkerI;
import jalview.api.AlignViewportI;
import jalview.bin.Console;
import jalview.commands.ChangeCaseCommand;
import jalview.util.StringUtils;
import jalview.util.UrlLink;
import jalview.viewmodel.seqfeatures.FeatureRendererModel;
+import jalview.workers.SecondaryStructureConsensusThread;
/**
* The popup menu that is displayed on right-click on a sequence id, or in the
if (Platform.isJS())
{
details = new JInternalFrame();
+ details.setFrameIcon(null);
JPanel panel = new JPanel(new BorderLayout());
panel.setOpaque(true);
panel.setBackground(Color.white);
cut_actionPerformed();
}
});
+ JMenuItem justifyLeftMenuItem = new JMenuItem(
+ MessageManager.getString("action.left_justify"));
+ justifyLeftMenuItem.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ ap.alignFrame.avc.justify_Region(true);
+ }
+ });
+ JMenuItem justifyRightMenuItem = new JMenuItem(
+ MessageManager.getString("action.right_justify"));
+ justifyRightMenuItem.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ ap.alignFrame.avc.justify_Region(false);
+ }
+ });
+
upperCase.setText(MessageManager.getString("label.to_upper_case"));
upperCase.addActionListener(new ActionListener()
{
editMenu.add(copy);
editMenu.add(cut);
+ editMenu.add(justifyLeftMenuItem);
+ editMenu.add(justifyRightMenuItem);
editMenu.add(editSequence);
editMenu.add(upperCase);
editMenu.add(lowerCase);
Map<SequenceI, List<AlignmentAnnotation>> candidates)
{
final AlignmentI alignment = this.ap.getAlignment();
- AlignmentUtils.addReferenceAnnotations(candidates, alignment,
- null);
+ AlignmentUtils.addReferenceAnnotations(candidates, alignment, null);
+
+ if(AlignmentUtils.isSSAnnotationPresent(candidates)) {
+ restartSSConsensusWorker();
+ }
+
refresh();
}
+
+
+ private void restartSSConsensusWorker() {
+
+ List<AlignCalcWorkerI> workers = ap.alignFrame.getViewport().getCalcManager()
+ .getRegisteredWorkersOfClass(SecondaryStructureConsensusThread.class);
+ if (!workers.isEmpty()) {
+
+ ap.alignFrame.getViewport().getCalcManager().startWorker(workers.remove(0));
+
+ }
+
+ }
+
+
protected void makeReferenceSeq_actionPerformed(ActionEvent actionEvent)
{
pane.setBackground(Color.WHITE);
pane.add(textLabel, BorderLayout.NORTH);
frame = new JInternalFrame();
+ frame.setFrameIcon(null);
frame.getContentPane().add(new JScrollPane(pane));
}
else
String[] omitHidden = null;
- System.out.println("PROMPT USER HERE"); // TODO: decide if a prompt happens
+ jalview.bin.Console.outPrintln("PROMPT USER HERE"); // TODO: decide if a
+ // prompt happens
// or we simply trust the user wants
// wysiwig behaviour