View Javadoc

1   // Copyright 2003, FreeHEP.
2   package org.freehep.graphicsio.exportchooser;
3   
4   import java.util.Properties;
5   
6   import javax.swing.JLabel;
7   
8   import org.freehep.graphicsio.PageConstants;
9   import org.freehep.swing.layout.TableLayout;
10  
11  /**
12   * 
13   * @author Mark Donszelmann
14   * @version $Id: PageLayoutPanel.java 8584 2006-08-10 23:06:37Z duns $
15   */
16  public class PageLayoutPanel extends OptionPanel {
17      public PageLayoutPanel(Properties options, String rootKey) {
18          super("Page Layout");
19  
20          add(TableLayout.LEFT, new JLabel("Size:"));
21          add(TableLayout.RIGHT, new OptionComboBox(options, rootKey + "."
22                  + PageConstants.PAGE_SIZE, PageConstants.getSizeList()));
23  
24          // FIXME: re-add FREEHEP-277, Margins are now Insets
25          // add(TableLayout.LEFT , new JLabel("Margins:"));
26          // add(TableLayout.RIGHT, new OptionComboBox(options,
27          // rootKey+"."+PageConstants.PAGE_MARGINS,
28          // PageConstants.getMarginsList()));
29  
30          add(TableLayout.LEFT, new JLabel("Orientation:"));
31          add(TableLayout.RIGHT,
32                  new OptionComboBox(options, rootKey + "."
33                          + PageConstants.ORIENTATION, PageConstants
34                          .getOrientationList()));
35  
36          add(TableLayout.FULL, new OptionCheckBox(options, rootKey + "."
37                  + PageConstants.FIT_TO_PAGE, "Fit to Page"));
38      }
39  }