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-1152 use a proper RadioButton not a faked one
[jalview.git]
/
src
/
jalview
/
jbgui
/
GAlignFrame.java
diff --git
a/src/jalview/jbgui/GAlignFrame.java
b/src/jalview/jbgui/GAlignFrame.java
index
1e67ff7
..
599cba8
100755
(executable)
--- a/
src/jalview/jbgui/GAlignFrame.java
+++ b/
src/jalview/jbgui/GAlignFrame.java
@@
-372,9
+372,9
@@
public class GAlignFrame extends JInternalFrame
protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
protected JCheckBoxMenuItem applyAutoAnnotationSettings = new JCheckBoxMenuItem();
- protected JCheckBoxMenuItem showAutoFirst = new JCheckBoxMenuItem();
+ protected JRadioButtonMenuItem showAutoFirst = new JRadioButtonMenuItem();
- protected JCheckBoxMenuItem showAutoLast = new JCheckBoxMenuItem();
+ protected JRadioButtonMenuItem showAutoLast = new JRadioButtonMenuItem();
private JMenuItem grpsFromSelection = new JMenuItem();
private JMenuItem grpsFromSelection = new JMenuItem();
@@
-1422,8
+1422,11
@@
public class GAlignFrame extends JInternalFrame
}
});
}
});
+ ButtonGroup buttonGroup = new ButtonGroup();
+ buttonGroup.add(showAutoFirst);
+ buttonGroup.add(showAutoLast);
showAutoFirst.setText(MessageManager.getString("label.show_first"));
showAutoFirst.setText(MessageManager.getString("label.show_first"));
- showAutoFirst.setState(Cache.getDefault(
+ showAutoFirst.setSelected(Cache.getDefault(
Preferences.SHOW_AUTOCALC_ABOVE,
false));
showAutoFirst.addActionListener(new ActionListener()
Preferences.SHOW_AUTOCALC_ABOVE,
false));
showAutoFirst.addActionListener(new ActionListener()
@@
-1431,22
+1434,18
@@
public class GAlignFrame extends JInternalFrame
@Override
public void actionPerformed(ActionEvent e)
{
@Override
public void actionPerformed(ActionEvent e)
{
- boolean sortFirst = showAutoFirst.getState();
- setShowAutoCalculatedAbove(sortFirst);
- showAutoLast.setState(!sortFirst);
+ setShowAutoCalculatedAbove(showAutoFirst.isSelected());
sortAnnotations_actionPerformed();
}
});
showAutoLast.setText(MessageManager.getString("label.show_last"));
sortAnnotations_actionPerformed();
}
});
showAutoLast.setText(MessageManager.getString("label.show_last"));
- showAutoLast.setState(!showAutoFirst.getState());
+ showAutoLast.setSelected(!showAutoFirst.isSelected());
showAutoLast.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
showAutoLast.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent e)
{
- boolean sortLast = showAutoLast.getState();
- setShowAutoCalculatedAbove(!sortLast);
- showAutoFirst.setState(!sortLast);
+ setShowAutoCalculatedAbove(!showAutoLast.isSelected());
sortAnnotations_actionPerformed();
}
});
sortAnnotations_actionPerformed();
}
});