View Javadoc

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.graphicsio.ImageConstants;
10  import org.freehep.swing.layout.TableLayout;
11  
12  /**
13   * 
14   * @author Mark Donszelmann
15   * @version $Id: ImagePanel.java 8584 2006-08-10 23:06:37Z 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  }