Debian Codegraph @

freehep-graphicsio/src/main/java/org/freehep/graphicsio/exportchooser/ImagePanel.java

raw
1 // Copyright 2003, FreeHEP.
2 package org.freehep.graphicsio.exportchooser;
3
4 import java.util.Properties;
5
6 import javax.swing.ButtonGroup;
7 import javax.swing.JLabel;
8
9 import org.freehep.graphicsbase.swing.layout.TableLayout;
10 import org.freehep.graphicsio.ImageConstants;
11
12 /**
13 *
14 * @author Mark Donszelmann
15 * @version $Id: freehep-graphicsio/src/main/java/org/freehep/graphicsio/exportchooser/ImagePanel.java 5641ca92a537 2005/11/26 00:15:35 duns $
16 */
17 public class ImagePanel extends OptionPanel {
18 public ImagePanel(Properties options, String rootKey, String[] formats) {
19 super("Images");
20
21 add(TableLayout.FULL, new JLabel("Write Images as"));
22 ButtonGroup group = new ButtonGroup();
23 OptionRadioButton imageType[] = new OptionRadioButton[formats.length];
24 for (int i = 0; i < formats.length; i++) {
25 imageType[i] = new OptionRadioButton(options, rootKey + "."
26 + ImageConstants.WRITE_IMAGES_AS, formats[i]);
27 add(TableLayout.FULL, imageType[i]);
28 group.add(imageType[i]);
29 // add(TableLayout.RIGHT, new OptionTextField(options,
30 // rootKey+"."+keys[i], 40));
31 }
32 }
33 }