AlignmentPanel ap;
- Stack<CommandI> historyList = new Stack<CommandI>();
+ Stack<CommandI> historyList = new Stack<>();
// simpler than synching with alignFrame.
frame = new JInternalFrame();
frame.setContentPane(this);
- Desktop.addInternalFrame(frame, MessageManager
- .getString("label.redundancy_threshold_selection"), 400, 100,
- false);
+ Desktop.addInternalFrame(frame,
+ MessageManager
+ .getString("label.redundancy_threshold_selection"),
+ true, FRAME_WIDTH, FRAME_HEIGHT, false, true);
frame.addInternalFrameListener(new InternalFrameAdapter()
{
@Override
progress.setVisible(false);
progress = null;
- label.setText(MessageManager
- .getString("label.enter_redundancy_threshold"));
+ label.setText(
+ MessageManager.getString("label.enter_redundancy_threshold"));
slider.setVisible(true);
applyButton.setEnabled(true);
valueField.setVisible(true);
}
float value = slider.getValue();
- List<SequenceI> redundantSequences = new ArrayList<SequenceI>();
+ List<SequenceI> redundantSequences = new ArrayList<>();
for (int i = 0; i < redundancy.length; i++)
{
if (value <= redundancy[i])
@Override
public void applyButton_actionPerformed(ActionEvent e)
{
- Vector del = new Vector();
+ List<SequenceI> del = new ArrayList<>();
undoButton.setEnabled(true);
{
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()];
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();
ap.alignFrame.addHistoryItem(cut);
PaintRefresher.Refresh(this, ap.av.getSequenceSetId(), true, true);
- ap.av.firePropertyChange("alignment", null, ap.av.getAlignment()
- .getSequences());
+ ap.av.firePropertyChange("alignment", null,
+ ap.av.getAlignment().getSequences());
}
}
{
command.undoCommand(af.getViewAlignments());
ap.av.getHistoryList().remove(command);
- ap.av.firePropertyChange("alignment", null, ap.av.getAlignment()
- .getSequences());
+ ap.av.firePropertyChange("alignment", null,
+ ap.av.getAlignment().getSequences());
af.updateEditMenuBar();
}
- ap.paintAlignment(true);
+ ap.paintAlignment(true, true);
if (historyList.size() == 0)
{