| 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.graphicsbase.swing.layout.TableLayout; |
| 9 |
import org.freehep.graphicsio.PageConstants; |
| 10 |
|
| 11 |
/** |
| 12 |
* |
| 13 |
* @author Mark Donszelmann |
| 14 |
* @version $Id: freehep-graphicsio/src/main/java/org/freehep/graphicsio/exportchooser/PageLayoutPanel.java 5641ca92a537 2005/11/26 00:15:35 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 |
} |