ButtonGroup buttonGroup = new ButtonGroup();
JRadioButtonMenuItem menuItem;
Reticle reticle = cameraView.getDefaultReticle();
menuItem = new JRadioButtonMenuItem(noReticleAction);
if (reticle == null) {
menuItem.setSelected(true);
}
buttonGroup.add(menuItem);
menu.add(menuItem);
menuItem = new JRadioButtonMenuItem(crosshairReticleAction);
if (reticle != null && reticle.getClass() == CrosshairReticle.class) {
menuItem.setSelected(true);
}
buttonGroup.add(menuItem);
menu.add(menuItem);
menuItem = new JRadioButtonMenuItem(rulerReticleAction);
if (reticle != null && reticle.getClass() == RulerReticle.class) {
menuItem.setSelected(true);
}
buttonGroup.add(menuItem);
menu.add(menuItem);
menuItem = new JRadioButtonMenuItem(fiducialReticleAction);
if (reticle != null && reticle.getClass() == FiducialReticle.class) {
menuItem.setSelected(true);
}
buttonGroup.add(menuItem);
menu.add(menuItem);