Search in sources :

Example 1 with ConfigurationUI

use of net.sf.sdedit.ui.components.configuration.ConfigurationUI in project abstools by abstools.

the class PrintDialog method init.

private void init() {
    JPanel center = new JPanel();
    getContentPane().add(center, BorderLayout.CENTER);
    ButtonPanel buttonPanel = new ButtonPanel();
    buttonPanel.addAction(cancel);
    buttonPanel.addAction(ok, 0, true);
    getContentPane().add(buttonPanel, BorderLayout.SOUTH);
    printerProperties = ConfigurationManager.getPrintConfigurationBean();
    setToCurrentFile();
    ConfigurationUI<PrintConfiguration> cui = new ConfigurationUI<PrintConfiguration>(this, printerProperties, null, null, null, null);
    cui.hideButtons();
    cui.hideCategoryList();
    printerProperties.addPropertyChangeListener(this);
    center.setLayout(new GridLayout(1, 2));
    center.add(cui);
    JPanel right = new JPanel();
    right.setBorder(new TitledBorder("Preview"));
    right.setLayout(new BorderLayout());
    preview = new JScrollPane();
    right.add(preview);
    scaleLabel = new JLabel("Zoom factor: 100 %");
    scaleLabel.setHorizontalAlignment(SwingConstants.CENTER);
    right.add(scaleLabel, BorderLayout.SOUTH);
    center.add(right);
}
Also used : PrintConfiguration(net.sf.sdedit.config.PrintConfiguration) JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) GridLayout(java.awt.GridLayout) BorderLayout(java.awt.BorderLayout) ConfigurationUI(net.sf.sdedit.ui.components.configuration.ConfigurationUI) JLabel(javax.swing.JLabel) TitledBorder(javax.swing.border.TitledBorder) ButtonPanel(net.sf.sdedit.ui.components.ButtonPanel)

Aggregations

BorderLayout (java.awt.BorderLayout)1 GridLayout (java.awt.GridLayout)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1 JScrollPane (javax.swing.JScrollPane)1 TitledBorder (javax.swing.border.TitledBorder)1 PrintConfiguration (net.sf.sdedit.config.PrintConfiguration)1 ButtonPanel (net.sf.sdedit.ui.components.ButtonPanel)1 ConfigurationUI (net.sf.sdedit.ui.components.configuration.ConfigurationUI)1