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
Merge remote-tracking branch 'origin/develop' into
[jalview.git]
/
src
/
jalview
/
gui
/
AnnotationColumnChooser.java
diff --git
a/src/jalview/gui/AnnotationColumnChooser.java
b/src/jalview/gui/AnnotationColumnChooser.java
index
fa63e0d
..
0fe6462
100644
(file)
--- a/
src/jalview/gui/AnnotationColumnChooser.java
+++ b/
src/jalview/gui/AnnotationColumnChooser.java
@@
-110,20
+110,23
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
setAnnotations(new JComboBox<String>(getAnnotationItems(false)));
populateThresholdComboBox(threshold);
setAnnotations(new JComboBox<String>(getAnnotationItems(false)));
populateThresholdComboBox(threshold);
-
+ AnnotationColumnChooser lastChooser = av
+ .getAnnotationColumnSelectionState();
// restore Object state from the previous session if one exists
// restore Object state from the previous session if one exists
- if (av.getAnnotationColumnSelectionState() != null)
+ if (lastChooser != null)
{
{
- currentSearchPanel = av.getAnnotationColumnSelectionState()
+ currentSearchPanel = lastChooser
.getCurrentSearchPanel();
.getCurrentSearchPanel();
- currentStructureFilterPanel = av.getAnnotationColumnSelectionState()
+ currentStructureFilterPanel = lastChooser
.getCurrentStructureFilterPanel();
.getCurrentStructureFilterPanel();
- annotations.setSelectedIndex(av.getAnnotationColumnSelectionState()
+ annotations.setSelectedIndex(lastChooser
.getAnnotations().getSelectedIndex());
.getAnnotations().getSelectedIndex());
- threshold.setSelectedIndex(av.getAnnotationColumnSelectionState()
+ threshold.setSelectedIndex(lastChooser
.getThreshold().getSelectedIndex());
.getThreshold().getSelectedIndex());
- actionOption = av.getAnnotationColumnSelectionState()
+ actionOption = lastChooser
.getActionOption();
.getActionOption();
+ percentThreshold.setSelected(lastChooser.percentThreshold
+ .isSelected());
}
try
}
try
@@
-151,6
+154,9
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
thresholdPanel.setFont(JvSwingUtils.getLabelFont());
thresholdPanel.setLayout(new MigLayout("", "[left][right]", "[][]"));
thresholdPanel.setFont(JvSwingUtils.getLabelFont());
thresholdPanel.setLayout(new MigLayout("", "[left][right]", "[][]"));
+ percentThreshold.setBackground(Color.white);
+ percentThreshold.setFont(JvSwingUtils.getLabelFont());
+
JPanel actionPanel = new JPanel();
actionPanel.setBackground(Color.white);
actionPanel.setFont(JvSwingUtils.getLabelFont());
JPanel actionPanel = new JPanel();
actionPanel.setBackground(Color.white);
actionPanel.setFont(JvSwingUtils.getLabelFont());
@@
-174,8
+180,9
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
ngStructureFilterPanel = new StructureFilterPanel(this);
thresholdPanel.add(getThreshold());
ngStructureFilterPanel = new StructureFilterPanel(this);
thresholdPanel.add(getThreshold());
- thresholdPanel.add(thresholdValue, "wrap");
- thresholdPanel.add(slider, "grow, span, wrap");
+ thresholdPanel.add(percentThreshold, "wrap");
+ thresholdPanel.add(slider, "grow");
+ thresholdPanel.add(thresholdValue, "span, wrap");
actionPanel.add(ok);
actionPanel.add(cancel);
actionPanel.add(ok);
actionPanel.add(cancel);
@@
-282,12
+289,14
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
slider.setEnabled(true);
thresholdValue.setEnabled(true);
slider.setEnabled(true);
thresholdValue.setEnabled(true);
+ percentThreshold.setEnabled(true);
if (selectedThresholdItem == AnnotationColourGradient.NO_THRESHOLD)
{
slider.setEnabled(false);
thresholdValue.setEnabled(false);
thresholdValue.setText("");
if (selectedThresholdItem == AnnotationColourGradient.NO_THRESHOLD)
{
slider.setEnabled(false);
thresholdValue.setEnabled(false);
thresholdValue.setText("");
+ percentThreshold.setEnabled(false);
// build filter params
}
else if (selectedThresholdItem != AnnotationColourGradient.NO_THRESHOLD)
// build filter params
}
else if (selectedThresholdItem != AnnotationColourGradient.NO_THRESHOLD)
@@
-308,7
+317,9
@@
public class AnnotationColumnChooser extends AnnotationRowFilter implements
slider.setMinimum((int) (getCurrentAnnotation().graphMin * 1000));
slider.setMaximum((int) (getCurrentAnnotation().graphMax * 1000));
slider.setValue((int) (getCurrentAnnotation().threshold.value * 1000));
slider.setMinimum((int) (getCurrentAnnotation().graphMin * 1000));
slider.setMaximum((int) (getCurrentAnnotation().graphMax * 1000));
slider.setValue((int) (getCurrentAnnotation().threshold.value * 1000));
- thresholdValue.setText(getCurrentAnnotation().threshold.value + "");
+
+ setThresholdValueText();
+
slider.setMajorTickSpacing((int) (range / 10f));
slider.setEnabled(true);
thresholdValue.setEnabled(true);
slider.setMajorTickSpacing((int) (range / 10f));
slider.setEnabled(true);
thresholdValue.setEnabled(true);