X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignFrame.java;h=2a804ad6ea1abdb60f50a4ce0132ad1abbc17cce;hb=b58a17a47d215b541be4d8057eb88072c599087e;hp=e6d86e9d96b58e3214bfe9a20727dd009bce098c;hpb=8c0f33de9bd3c211883eddcc313ebc7978f7b0b5;p=jalview.git diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index e6d86e9..2a804ad 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -34,6 +34,7 @@ import jalview.api.analysis.ScoreModelI; import jalview.bin.Cache; import jalview.commands.CommandI; import jalview.commands.EditCommand; +import jalview.commands.EditCommand.Action; import jalview.commands.OrderCommand; import jalview.commands.RemoveGapColCommand; import jalview.commands.RemoveGapsCommand; @@ -1260,6 +1261,10 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, alignPanel.makeEPS(f); } + public void createSVG(File f) + { + alignPanel.makeSVG(f); + } @Override public void pageSetup_actionPerformed(ActionEvent e) { @@ -1406,7 +1411,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, if (viewport.historyList.size() > 0) { undoMenuItem.setEnabled(true); - CommandI command = (CommandI) viewport.historyList.peek(); + CommandI command = viewport.historyList.peek(); undoMenuItem.setText(MessageManager.formatMessage( "label.undo_command", new String[] { command.getDescription() })); @@ -1421,7 +1426,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { redoMenuItem.setEnabled(true); - CommandI command = (CommandI) viewport.redoList.peek(); + CommandI command = viewport.redoList.peek(); redoMenuItem.setText(MessageManager.formatMessage( "label.redo_command", new String[] { command.getDescription() })); @@ -1485,7 +1490,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, { return; } - CommandI command = (CommandI) viewport.historyList.pop(); + CommandI command = viewport.historyList.pop(); viewport.redoList.push(command); command.undoCommand(getViewAlignments()); @@ -1524,7 +1529,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, return; } - CommandI command = (CommandI) viewport.redoList.pop(); + CommandI command = viewport.redoList.pop(); viewport.historyList.push(command); command.doCommand(getViewAlignments()); @@ -1986,7 +1991,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, // ///// // ADD HISTORY ITEM // - addHistoryItem(new EditCommand(MessageManager.getString("label.add_sequences"), EditCommand.PASTE, + addHistoryItem(new EditCommand( + MessageManager.getString("label.add_sequences"), + Action.PASTE, sequences, 0, alignment.getWidth(), alignment)); } // Add any annotations attached to sequences @@ -2257,8 +2264,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, /* * //ADD HISTORY ITEM */ - addHistoryItem(new EditCommand(MessageManager.getString("label.cut_sequences"), EditCommand.CUT, cut, - sg.getStartRes(), sg.getEndRes() - sg.getStartRes() + 1, + addHistoryItem(new EditCommand( + MessageManager.getString("label.cut_sequences"), Action.CUT, + cut, sg.getStartRes(), sg.getEndRes() - sg.getStartRes() + 1, viewport.getAlignment())); viewport.setSelectionGroup(null); @@ -4176,6 +4184,21 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, */ msa = viewport.getAlignmentView(true); } + else if (viewport.getSelectionGroup() != null + && viewport.getSelectionGroup().getSize() == 1) + { + int option = JOptionPane + .showConfirmDialog( +this, + "More than one sequece group selection is required for this Job, click \n'Cancel' to edit your selection or 'Ok' to submit the entire sequence.", + "Invalid selection", + JOptionPane.OK_CANCEL_OPTION); + if (option == JOptionPane.OK_OPTION) + { + msa = viewport.getAlignmentView(false); + } + + } else { /* @@ -5793,7 +5816,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, aa.visible = visible; } } - this.alignPanel.paintAlignment(true); + alignPanel.validateAnnotationDimensions(false); + alignPanel.alignmentChanged(); } /** @@ -5805,7 +5829,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, this.alignPanel.av.setSortAnnotationsBy(getAnnotationSortOrder()); this.alignPanel.av .setShowAutocalculatedAbove(isShowAutoCalculatedAbove()); - alignPanel.updateAnnotation(applyAutoAnnotationSettings.getState()); + alignPanel.paintAlignment(true); } }