git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3066 Fix NullPointerException thrown when showing HMMER run dialog
[jalview.git]
/
src
/
jalview
/
gui
/
RedundancyPanel.java
diff --git
a/src/jalview/gui/RedundancyPanel.java
b/src/jalview/gui/RedundancyPanel.java
index
8bf2fba
..
c7e2b8e
100755
(executable)
--- 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;
AlignmentPanel ap;
- Stack<CommandI> historyList = new Stack<CommandI>();
+ Stack<CommandI> historyList = new Stack<>();
// simpler than synching with alignFrame.
// simpler than synching with alignFrame.
@@
-103,8
+103,8
@@
public class RedundancyPanel extends GSliderPanel implements Runnable
frame.setContentPane(this);
Desktop.addInternalFrame(frame,
MessageManager
frame.setContentPane(this);
Desktop.addInternalFrame(frame,
MessageManager
- .getString("label.redundancy_threshold_selection"),
- 400, 100, false);
+ .getString("label.redundancy_threshold_selection"), Desktop.FRAME_MAKE_VISIBLE,
+ FRAME_WIDTH, FRAME_HEIGHT, Desktop.FRAME_NOT_RESIZABLE, Desktop.FRAME_ALLOW_ANY_SIZE);
frame.addInternalFrameListener(new InternalFrameAdapter()
{
@Override
frame.addInternalFrameListener(new InternalFrameAdapter()
{
@Override
@@
-194,7
+194,7
@@
public class RedundancyPanel extends GSliderPanel implements Runnable
}
float value = slider.getValue();
}
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])
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)
{
@Override
public void applyButton_actionPerformed(ActionEvent e)
{
- Vector del = new Vector();
+ List<SequenceI> del = new ArrayList<>();
undoButton.setEnabled(true);
undoButton.setEnabled(true);
@@
-225,13
+225,12
@@
public class RedundancyPanel extends GSliderPanel implements Runnable
{
if (value <= redundancy[i])
{
{
if (value <= redundancy[i])
{
- del.addElement(originalSequences[i]);
+ del.add(originalSequences[i]);
}
}
// This has to be done before the restoreHistoryItem method of alignFrame
}
}
// 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()];
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++)
{
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();
if (deleted[i].getLength() > width)
{
width = deleted[i].getLength();
@@
-264,8
+263,7
@@
public class RedundancyPanel extends GSliderPanel implements Runnable
ap.alignFrame.addHistoryItem(cut);
PaintRefresher.Refresh(this, ap.av.getSequenceSetId(), true, true);
ap.alignFrame.addHistoryItem(cut);
PaintRefresher.Refresh(this, ap.av.getSequenceSetId(), true, true);
- ap.av.firePropertyChange("alignment", null,
- ap.av.getAlignment().getSequences());
+ ap.av.notifyAlignment();
}
}
}
}
@@
-290,12
+288,11
@@
public class RedundancyPanel extends GSliderPanel implements Runnable
{
command.undoCommand(af.getViewAlignments());
ap.av.getHistoryList().remove(command);
{
command.undoCommand(af.getViewAlignments());
ap.av.getHistoryList().remove(command);
- ap.av.firePropertyChange("alignment", null,
- ap.av.getAlignment().getSequences());
+ ap.av.notifyAlignment();
af.updateEditMenuBar();
}
af.updateEditMenuBar();
}
- ap.paintAlignment(true);
+ ap.paintAlignment(true, true);
if (historyList.size() == 0)
{
if (historyList.size() == 0)
{