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-2069 update spike branch with latest
[jalview.git]
/
src
/
jalview
/
appletgui
/
AnnotationColumnChooser.java
diff --git
a/src/jalview/appletgui/AnnotationColumnChooser.java
b/src/jalview/appletgui/AnnotationColumnChooser.java
index
bb67efc
..
7674de7
100644
(file)
--- a/
src/jalview/appletgui/AnnotationColumnChooser.java
+++ b/
src/jalview/appletgui/AnnotationColumnChooser.java
@@
-172,16
+172,12
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
// restore Object state from the previous session if one exists
if (lastChooser != null)
{
// restore Object state from the previous session if one exists
if (lastChooser != null)
{
- currentSearchPanel = lastChooser
- .getCurrentSearchPanel();
+ currentSearchPanel = lastChooser.getCurrentSearchPanel();
currentStructureFilterPanel = lastChooser
.getCurrentStructureFilterPanel();
currentStructureFilterPanel = lastChooser
.getCurrentStructureFilterPanel();
- annotations.select(lastChooser
- .getAnnotations().getSelectedIndex());
- threshold.select(lastChooser
- .getThreshold().getSelectedIndex());
- actionOption = lastChooser
- .getActionOption();
+ annotations.select(lastChooser.getAnnotations().getSelectedIndex());
+ threshold.select(lastChooser.getThreshold().getSelectedIndex());
+ actionOption = lastChooser.getActionOption();
percentThreshold.setState(lastChooser.percentThreshold.getState());
}
percentThreshold.setState(lastChooser.percentThreshold.getState());
}
@@
-295,12
+291,11
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
if (av.getAnnotationColumnSelectionState() != null)
{
if (av.getAnnotationColumnSelectionState() != null)
{
- HiddenColumns oldHidden = av
- .getAnnotationColumnSelectionState()
+ HiddenColumns oldHidden = av.getAnnotationColumnSelectionState()
.getOldHiddenColumns();
if (oldHidden != null)
{
.getOldHiddenColumns();
if (oldHidden != null)
{
- ArrayList<int[]> regions = oldHidden.getHiddenColumnsCopyAsList();
+ ArrayList<int[]> regions = oldHidden.getHiddenColumnsCopy();
for (int[] positions : regions)
{
av.hideColumns(positions[0], positions[1]);
for (int[] positions : regions)
{
av.hideColumns(positions[0], positions[1]);
@@
-310,7
+305,8
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
// going to copy the hidden columns over wholesale anyway
av.getAlignment().setHiddenColumns(oldHidden);
}
// going to copy the hidden columns over wholesale anyway
av.getAlignment().setHiddenColumns(oldHidden);
}
- ap.paintAlignment(true);
+ av.sendSelection();
+ ap.paintAlignment(true, true);
}
}
}
}
@@
-352,7
+348,7
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
sliderDragging = false;
valueChanged(true);
}
sliderDragging = false;
valueChanged(true);
}
- ap.paintAlignment(true);
+ ap.paintAlignment(true, true);
}
});
}
}
});
}
@@
-363,8
+359,7
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
if (slider.isEnabled())
{
getCurrentAnnotation().threshold.value = slider.getValue() / 1000f;
if (slider.isEnabled())
{
getCurrentAnnotation().threshold.value = slider.getValue() / 1000f;
- updateView();
- ap.paintAlignment(false);
+ updateView(); // this also calls paintAlignment(true,true)
}
}
}
}
@@
-398,11
+393,11
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
}
AnnotationFilterParameter filterParams = new AnnotationFilterParameter();
}
AnnotationFilterParameter filterParams = new AnnotationFilterParameter();
- setCurrentAnnotation(av.getAlignment().getAlignmentAnnotation()[getAnnotations()
- .getSelectedIndex()]);
+ setCurrentAnnotation(av.getAlignment()
+ .getAlignmentAnnotation()[getAnnotations().getSelectedIndex()]);
- int selectedThresholdItem = getSelectedThresholdItem(getThreshold()
- .getSelectedIndex());
+ int selectedThresholdItem = getSelectedThresholdItem(
+ getThreshold().getSelectedIndex());
slider.setEnabled(true);
thresholdValue.setEnabled(true);
slider.setEnabled(true);
thresholdValue.setEnabled(true);
@@
-420,20
+415,20
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
{
if (getCurrentAnnotation().threshold == null)
{
{
if (getCurrentAnnotation().threshold == null)
{
- getCurrentAnnotation()
- .setThreshold(
- new jalview.datamodel.GraphLine(
- (getCurrentAnnotation().graphMax - getCurrentAnnotation().graphMin) / 2f,
- "Threshold", Color.black));
+ getCurrentAnnotation().setThreshold(new jalview.datamodel.GraphLine(
+ (getCurrentAnnotation().graphMax
+ - getCurrentAnnotation().graphMin) / 2f,
+ "Threshold", Color.black));
}
adjusting = true;
}
adjusting = true;
- float range = getCurrentAnnotation().graphMax * 1000
- - getCurrentAnnotation().graphMin * 1000;
+ // float range = getCurrentAnnotation().graphMax * 1000
+ // - getCurrentAnnotation().graphMin * 1000;
slider.setMinimum((int) (getCurrentAnnotation().graphMin * 1000));
slider.setMaximum((int) (getCurrentAnnotation().graphMax * 1000));
slider.setMinimum((int) (getCurrentAnnotation().graphMin * 1000));
slider.setMaximum((int) (getCurrentAnnotation().graphMax * 1000));
- slider.setValue((int) (getCurrentAnnotation().threshold.value * 1000));
+ slider.setValue(
+ (int) (getCurrentAnnotation().threshold.value * 1000));
setThresholdValueText();
// slider.setMajorTickSpacing((int) (range / 10f));
slider.setEnabled(true);
setThresholdValueText();
// slider.setMajorTickSpacing((int) (range / 10f));
slider.setEnabled(true);
@@
-442,8
+437,8
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
adjusting = false;
// build filter params
adjusting = false;
// build filter params
- filterParams
- .setThresholdType(AnnotationFilterParameter.ThresholdType.NO_THRESHOLD);
+ filterParams.setThresholdType(
+ AnnotationFilterParameter.ThresholdType.NO_THRESHOLD);
if (getCurrentAnnotation().isQuantitative())
{
filterParams
if (getCurrentAnnotation().isQuantitative())
{
filterParams
@@
-451,13
+446,13
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
if (selectedThresholdItem == AnnotationColourGradient.ABOVE_THRESHOLD)
{
if (selectedThresholdItem == AnnotationColourGradient.ABOVE_THRESHOLD)
{
- filterParams
- .setThresholdType(AnnotationFilterParameter.ThresholdType.ABOVE_THRESHOLD);
+ filterParams.setThresholdType(
+ AnnotationFilterParameter.ThresholdType.ABOVE_THRESHOLD);
}
else if (selectedThresholdItem == AnnotationColourGradient.BELOW_THRESHOLD)
{
}
else if (selectedThresholdItem == AnnotationColourGradient.BELOW_THRESHOLD)
{
- filterParams
- .setThresholdType(AnnotationFilterParameter.ThresholdType.BELOW_THRESHOLD);
+ filterParams.setThresholdType(
+ AnnotationFilterParameter.ThresholdType.BELOW_THRESHOLD);
}
}
}
}
}
}
@@
-488,13
+483,13
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
filterParams.setRegexString(currentSearchPanel.searchBox.getText());
if (currentSearchPanel.displayName.getState())
{
filterParams.setRegexString(currentSearchPanel.searchBox.getText());
if (currentSearchPanel.displayName.getState())
{
- filterParams
- .addRegexSearchField(AnnotationFilterParameter.SearchableAnnotationField.DISPLAY_STRING);
+ filterParams.addRegexSearchField(
+ AnnotationFilterParameter.SearchableAnnotationField.DISPLAY_STRING);
}
if (currentSearchPanel.description.getState())
{
}
if (currentSearchPanel.description.getState())
{
- filterParams
- .addRegexSearchField(AnnotationFilterParameter.SearchableAnnotationField.DESCRIPTION);
+ filterParams.addRegexSearchField(
+ AnnotationFilterParameter.SearchableAnnotationField.DESCRIPTION);
}
}
else
}
}
else
@@
-504,10
+499,13
@@
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();
@@
-515,7
+513,8
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
filterParams = null;
av.setAnnotationColumnSelectionState(this);
filterParams = null;
av.setAnnotationColumnSelectionState(this);
- ap.paintAlignment(true);
+ av.sendSelection();
+ ap.paintAlignment(true, true);
}
public HiddenColumns getOldHiddenColumns()
}
public HiddenColumns getOldHiddenColumns()
@@
-637,7
+636,8
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
public void syncState()
{
public void syncState()
{
- if (aColChooser.getActionOption() == AnnotationColumnChooser.ACTION_OPTION_HIDE)
+ if (aColChooser
+ .getActionOption() == AnnotationColumnChooser.ACTION_OPTION_HIDE)
{
furtherAction.select("Hide");
}
{
furtherAction.select("Hide");
}
@@
-665,8
+665,8
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
}
}
}
}
- public class StructureFilterPanel extends TitledPanel implements
- ItemListener
+ public class StructureFilterPanel extends TitledPanel
+ implements ItemListener
{
private AnnotationColumnChooser aColChooser;
{
private AnnotationColumnChooser aColChooser;