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 branch 'doc/JAL-4090_Release_2_11_3_0' into develop
[jalview.git]
/
src
/
jalview
/
gui
/
AnnotationColumnChooser.java
diff --git
a/src/jalview/gui/AnnotationColumnChooser.java
b/src/jalview/gui/AnnotationColumnChooser.java
index
0b1ad93
..
0483aa6
100644
(file)
--- a/
src/jalview/gui/AnnotationColumnChooser.java
+++ b/
src/jalview/gui/AnnotationColumnChooser.java
@@
-42,6
+42,7
@@
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.border.TitledBorder;
import javax.swing.JRadioButton;
import javax.swing.border.TitledBorder;
+import jalview.bin.Console;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.HiddenColumns;
import jalview.io.cache.JvCacheableInputBox;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.HiddenColumns;
import jalview.io.cache.JvCacheableInputBox;
@@
-95,8
+96,13
@@
public class AnnotationColumnChooser extends AnnotationRowFilter
public AnnotationColumnChooser(AlignViewport av, final AlignmentPanel ap)
{
public AnnotationColumnChooser(AlignViewport av, final AlignmentPanel ap)
{
+ this(av,ap,null);
+ }
+ public AnnotationColumnChooser(AlignViewport av, final AlignmentPanel ap, AlignmentAnnotation selectedAnnotation)
+ {
super(av, ap);
frame = new JInternalFrame();
super(av, ap);
frame = new JInternalFrame();
+ frame.setFrameIcon(null);
frame.setContentPane(this);
frame.setLayer(JLayeredPane.PALETTE_LAYER);
Desktop.addInternalFrame(frame,
frame.setContentPane(this);
frame.setLayer(JLayeredPane.PALETTE_LAYER);
Desktop.addInternalFrame(frame,
@@
-114,7
+120,7
@@
public class AnnotationColumnChooser extends AnnotationRowFilter
}
setOldHiddenColumns(av.getAlignment().getHiddenColumns());
adjusting = true;
}
setOldHiddenColumns(av.getAlignment().getHiddenColumns());
adjusting = true;
-
+
setAnnotations(new JComboBox<>(getAnnotationItems(false)));
populateThresholdComboBox(threshold);
AnnotationColumnChooser lastChooser = av
setAnnotations(new JComboBox<>(getAnnotationItems(false)));
populateThresholdComboBox(threshold);
AnnotationColumnChooser lastChooser = av
@@
-133,6
+139,16
@@
public class AnnotationColumnChooser extends AnnotationRowFilter
percentThreshold
.setSelected(lastChooser.percentThreshold.isSelected());
}
percentThreshold
.setSelected(lastChooser.percentThreshold.isSelected());
}
+ if (selectedAnnotation!=null)
+ {
+ try {
+ setCurrentAnnotation(selectedAnnotation);
+ annotations.setSelectedItem(getAnnotationMenuLabel(selectedAnnotation));
+ } catch (Exception x)
+ {
+ Console.error("Couldn't select annotation in column chooser",x);
+ }
+ }
try
{
try
{
@@
-849,4
+865,10
@@
public class AnnotationColumnChooser extends AnnotationRowFilter
gSearchPanel.searchBox.updateCache();
ngSearchPanel.searchBox.updateCache();
}
gSearchPanel.searchBox.updateCache();
ngSearchPanel.searchBox.updateCache();
}
+
+ public static void displayFor(AlignViewport av, AlignmentPanel ap,
+ AlignmentAnnotation alignmentAnnotation)
+ {
+ AnnotationColumnChooser colchooser = new AnnotationColumnChooser(av, ap, alignmentAnnotation);
+ }
}
}