setAnnotations(new JComboBox<String>(getAnnotationItems(false)));
populateThresholdComboBox(threshold);
-
+ AnnotationColumnChooser lastChooser = av
+ .getAnnotationColumnSelectionState();
// restore Object state from the previous session if one exists
- if (av.getAnnotationColumnSelectionState() != null)
+ if (lastChooser != null)
{
- currentSearchPanel = av.getAnnotationColumnSelectionState()
+ currentSearchPanel = lastChooser
.getCurrentSearchPanel();
- currentStructureFilterPanel = av.getAnnotationColumnSelectionState()
+ currentStructureFilterPanel = lastChooser
.getCurrentStructureFilterPanel();
- annotations.setSelectedIndex(av.getAnnotationColumnSelectionState()
+ annotations.setSelectedIndex(lastChooser
.getAnnotations().getSelectedIndex());
- threshold.setSelectedIndex(av.getAnnotationColumnSelectionState()
+ threshold.setSelectedIndex(lastChooser
.getThreshold().getSelectedIndex());
- actionOption = av.getAnnotationColumnSelectionState()
+ actionOption = lastChooser
.getActionOption();
+ percentThreshold.setSelected(lastChooser.percentThreshold
+ .isSelected());
}
try
slider.setMaximum((int) (getCurrentAnnotation().graphMax * 1000));
slider.setValue((int) (getCurrentAnnotation().threshold.value * 1000));
- if (percentThreshold.isSelected())
- {
- thresholdValue
- .setText(""
- + ((getCurrentAnnotation().threshold.value - getCurrentAnnotation().graphMin) * 100f / (getCurrentAnnotation().graphMax - getCurrentAnnotation().graphMin)));
- }
- else
- {
- thresholdValue.setText(getCurrentAnnotation().threshold.value + "");
- }
+ setThresholdValueText();
slider.setMajorTickSpacing((int) (range / 10f));
slider.setEnabled(true);