/*
* Copyright (C) 2011 Jason von Nieda <jason@vonnieda.org>
*
* This file is part of OpenPnP.
*
* OpenPnP is free software: you can redistribute it and/or modify it under the terms of the GNU
* General Public License as published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* OpenPnP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with OpenPnP. If not, see
* <http://www.gnu.org/licenses/>.
*
* For more information about OpenPnP visit http://openpnp.org
*/
package org.openpnp.machine.reference.wizards;
import javax.swing.BoxLayout;
import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
import org.openpnp.gui.support.AbstractConfigurationWizard;
import org.openpnp.machine.reference.ReferencePnpJobProcessor;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.FormSpecs;
import com.jgoodies.forms.layout.RowSpec;
@SuppressWarnings("serial")
public class ReferencePnpJobProcessorConfigurationWizard extends AbstractConfigurationWizard {
private final ReferencePnpJobProcessor jobProcessor;
private JCheckBox parkWhenComplete;
public ReferencePnpJobProcessorConfigurationWizard(ReferencePnpJobProcessor jobProcessor) {
this.jobProcessor = jobProcessor;
contentPanel.setLayout(new BoxLayout(contentPanel, BoxLayout.Y_AXIS));
JPanel panelGeneral = new JPanel();
panelGeneral.setBorder(new TitledBorder(null, "General", TitledBorder.LEADING,
TitledBorder.TOP, null, null));
contentPanel.add(panelGeneral);
panelGeneral.setLayout(new FormLayout(
new ColumnSpec[] {FormSpecs.DEFAULT_COLSPEC, FormSpecs.DEFAULT_COLSPEC,},
new RowSpec[] {FormSpecs.RELATED_GAP_ROWSPEC, RowSpec.decode("16px"),}));
JLabel lblParkWhenComplete = new JLabel("Park When Complete");
panelGeneral.add(lblParkWhenComplete, "1, 2, right, top");
parkWhenComplete = new JCheckBox("");
panelGeneral.add(parkWhenComplete, "2, 2");
}
@Override
public void createBindings() {
addWrappedBinding(jobProcessor, "parkWhenComplete", parkWhenComplete, "selected");
}
}