X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FRedundancyPanel.java;h=6ed32482a30246fdbd7f2586c0efa48eac1b676b;hb=9d2408483e451285fd555c3cd6e0273977acbaa7;hp=8bf2fba4e6b267de7b5c54de7d57855ba3f7451b;hpb=3d0101179759ef157b088ea135423cd909512d9f;p=jalview.git diff --git a/src/jalview/gui/RedundancyPanel.java b/src/jalview/gui/RedundancyPanel.java index 8bf2fba..6ed3248 100755 --- a/src/jalview/gui/RedundancyPanel.java +++ b/src/jalview/gui/RedundancyPanel.java @@ -54,7 +54,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable AlignmentPanel ap; - Stack historyList = new Stack(); + Stack historyList = new Stack<>(); // simpler than synching with alignFrame. @@ -104,7 +104,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable Desktop.addInternalFrame(frame, MessageManager .getString("label.redundancy_threshold_selection"), - 400, 100, false); + true, FRAME_WIDTH, FRAME_HEIGHT, false, true); frame.addInternalFrameListener(new InternalFrameAdapter() { @Override @@ -194,7 +194,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable } float value = slider.getValue(); - List redundantSequences = new ArrayList(); + List redundantSequences = new ArrayList<>(); for (int i = 0; i < redundancy.length; i++) { if (value <= redundancy[i]) @@ -214,7 +214,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable @Override public void applyButton_actionPerformed(ActionEvent e) { - Vector del = new Vector(); + List del = new ArrayList<>(); undoButton.setEnabled(true); @@ -225,13 +225,12 @@ public class RedundancyPanel extends GSliderPanel implements Runnable { if (value <= redundancy[i]) { - del.addElement(originalSequences[i]); + del.add(originalSequences[i]); } } // This has to be done before the restoreHistoryItem method of alignFrame - // will - // actually restore these sequences. + // will actually restore these sequences. if (del.size() > 0) { SequenceI[] deleted = new SequenceI[del.size()]; @@ -239,7 +238,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable int width = 0; for (int i = 0; i < del.size(); i++) { - deleted[i] = (SequenceI) del.elementAt(i); + deleted[i] = del.get(i); if (deleted[i].getLength() > width) { width = deleted[i].getLength(); @@ -295,7 +294,7 @@ public class RedundancyPanel extends GSliderPanel implements Runnable af.updateEditMenuBar(); } - ap.paintAlignment(true); + ap.paintAlignment(true, true); if (historyList.size() == 0) {