public class WinPopupMenu extends JMenu {
private ZIntPref pref;
public WinPopupMenu(ZIntPref pref) {
this.pref = pref;
final ZIntPref f_pref = pref;
JRadioButtonMenuItem r1 = new JRadioButtonMenuItem(new AbstractAction("Alpha-numeric") {
public void actionPerformed(ActionEvent e) {
f_pref.putValue(WinValueProfile.MODE_DISPLAY_TEXT);
}
});
JRadioButtonMenuItem r2 = new JRadioButtonMenuItem(new AbstractAction("Graph") {
public void actionPerformed(ActionEvent e) {
f_pref.putValue(WinValueProfile.MODE_DISPLAY_GRAPH);
}
});
JRadioButtonMenuItem r3 = new JRadioButtonMenuItem(new AbstractAction("Alpha-numeric over graph") {
public void actionPerformed(ActionEvent e) {
f_pref.putValue(WinValueProfile.MODE_DISPLAY_TEXT_AND_GRAPH);
}
});
ButtonGroup bg = new ButtonGroup();
bg.add(r1);