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-2623 updated Overview/structure on input of threshold value
[jalview.git]
/
src
/
jalview
/
gui
/
AnnotationColumnChooser.java
diff --git
a/src/jalview/gui/AnnotationColumnChooser.java
b/src/jalview/gui/AnnotationColumnChooser.java
index
a15f605
..
6fc5fad
100644
(file)
--- a/
src/jalview/gui/AnnotationColumnChooser.java
+++ b/
src/jalview/gui/AnnotationColumnChooser.java
@@
-36,7
+36,7
@@
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.KeyEvent;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.KeyEvent;
-import java.util.Iterator;
+import java.util.ArrayList;
import javax.swing.ButtonGroup;
import javax.swing.JCheckBox;
import javax.swing.ButtonGroup;
import javax.swing.JCheckBox;
@@
-112,7
+112,7
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
setOldHiddenColumns(av.getAlignment().getHiddenColumns());
adjusting = true;
setOldHiddenColumns(av.getAlignment().getHiddenColumns());
adjusting = true;
- setAnnotations(new JComboBox<String>(getAnnotationItems(false)));
+ setAnnotations(new JComboBox<>(getAnnotationItems(false)));
populateThresholdComboBox(threshold);
AnnotationColumnChooser lastChooser = av
.getAnnotationColumnSelectionState();
populateThresholdComboBox(threshold);
AnnotationColumnChooser lastChooser = av
.getAnnotationColumnSelectionState();
@@
-244,21
+244,21
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
HiddenColumns oldHidden = av
.getAnnotationColumnSelectionState()
.getOldHiddenColumns();
HiddenColumns oldHidden = av
.getAnnotationColumnSelectionState()
.getOldHiddenColumns();
- if (oldHidden != null && oldHidden.getHiddenRegions() != null
- && !oldHidden.getHiddenRegions().isEmpty())
+ if (oldHidden != null)
{
{
- for (Iterator<int[]> itr = oldHidden.getHiddenRegions()
- .iterator(); itr.hasNext();)
+ ArrayList<int[]> regions = oldHidden.getHiddenColumnsCopy();
+ for (int[] positions : regions)
{
{
- int positions[] = itr.next();
av.hideColumns(positions[0], positions[1]);
}
}
av.hideColumns(positions[0], positions[1]);
}
}
+ // TODO not clear why we need to hide all the columns (above) if we are
+ // going to copy the hidden columns over wholesale anyway
av.getAlignment().setHiddenColumns(oldHidden);
}
av.getAlignment().setHiddenColumns(oldHidden);
}
+ av.sendSelection();
ap.paintAlignment(true);
}
ap.paintAlignment(true);
}
-
}
@Override
}
@Override
@@
-386,14
+386,18
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
}
}
}
}
+ // show hidden columns here, before changing the column selection in
+ // filterAnnotations, because showing hidden columns has the side effect of
+ // adding them to the selection
+ av.showAllHiddenColumns();
av.getColumnSelection().filterAnnotations(
getCurrentAnnotation().annotations, filterParams);
av.getColumnSelection().filterAnnotations(
getCurrentAnnotation().annotations, filterParams);
- av.showAllHiddenColumns();
if (getActionOption() == ACTION_OPTION_HIDE)
{
av.hideSelectedColumns();
}
if (getActionOption() == ACTION_OPTION_HIDE)
{
av.hideSelectedColumns();
}
+ av.sendSelection();
filterParams = null;
av.setAnnotationColumnSelectionState(this);
filterParams = null;
av.setAnnotationColumnSelectionState(this);
@@
-724,7
+728,7
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
private static final String FILTER_BY_ANN_CACHE_KEY = "CACHE.SELECT_FILTER_BY_ANNOT";
private static final String FILTER_BY_ANN_CACHE_KEY = "CACHE.SELECT_FILTER_BY_ANNOT";
- public JvCacheableInputBox<String> searchBox = new JvCacheableInputBox<String>(
+ public JvCacheableInputBox<String> searchBox = new JvCacheableInputBox<>(
FILTER_BY_ANN_CACHE_KEY);
public SearchPanel(AnnotationColumnChooser aColChooser)
FILTER_BY_ANN_CACHE_KEY);
public SearchPanel(AnnotationColumnChooser aColChooser)