+ // panel for selecting character encoding
+ _encodingsPanel = new JPanel();
+ if (!XmlUtils.isSystemUtf8())
+ {
+ // only add this panel if system isn't utf8 (or can't be identified yet)
+ _encodingsPanel.setBorder(BorderFactory.createCompoundBorder(
+ BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), BorderFactory.createEmptyBorder(4, 4, 4, 4)));
+ _encodingsPanel.setLayout(new BorderLayout());
+ _encodingsPanel.add(new JLabel(I18nManager.getText("dialog.exportgpx.encoding")), BorderLayout.NORTH);
+ JPanel radioPanel = new JPanel();
+ radioPanel.setLayout(new FlowLayout());
+ ButtonGroup radioGroup = new ButtonGroup();
+ _useSystemRadio = new JRadioButton(I18nManager.getText("dialog.exportgpx.encoding.system"));
+ _forceUtf8Radio = new JRadioButton(I18nManager.getText("dialog.exportgpx.encoding.utf8"));
+ radioGroup.add(_useSystemRadio);
+ radioGroup.add(_forceUtf8Radio);
+ radioPanel.add(_useSystemRadio);
+ radioPanel.add(_forceUtf8Radio);
+ _useSystemRadio.setSelected(true);
+ _encodingsPanel.add(radioPanel, BorderLayout.CENTER);
+ mainPanel.add(_encodingsPanel);
+ }