* Create the accessory panel.
*/
protected void createAccessoryPanel() {
JPanel accessoryPanel = new JPanel();
accessoryPanel.setLayout(new GridBagLayout());
GridBagUtil layout = new GridBagUtil(accessoryPanel, (GridBagLayout) accessoryPanel.getLayout());
accessoryPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
formatBox = new JComboBox();
formatBox.setSelectedItem(JPEG_TYPE);
formatBox.setToolTipText(_I18N.getString("selectFileFormat"));
formatBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
updateFileSuffix();
}
});
int r = 0;
int none = GridBagConstraints.NONE;
int west = GridBagConstraints.WEST;
layout.add(new JLabel(_I18N.getString("saveAsType") + ":"), 0, r++, 1, 1, 0.0, 0.0, none, west);
layout.add(formatBox, 0, r++, 1, 1, 0.0, 0.0, none, west);
layout.add(new JLabel(" "), 0, r++, 1, 1, 0.0, 0.0, none, west); // space
layout.add(new JLabel(_I18N.getString("options") + ":"), 0, r++, 1, 1, 0.0, 0.0, none, west);
useAll = new JRadioButton(_I18N.getString("saveImage"));
useAll.setToolTipText(_I18N.getString("saveImageAreaNoGraphics"));
useAll.setSelected(true);
useAll.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
updateFormatBox(false);
}
});
useView = new JRadioButton(_I18N.getString("saveCurrentView"));
useView.setToolTipText(_I18N.getString("saveImageAreaWithGraphics"));
useView.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
updateFormatBox(true);
}
});
ButtonGroup bg = new ButtonGroup();
bg.add(useAll);
bg.add(useView);
layout.add(useAll, 0, r++, 1, 1, 0.0, 0.0, none, west);
layout.add(useView, 0, r++, 1, 1, 0.0, 0.0, none, west);
setAccessory(accessoryPanel);
}