/* * Copyright (c) 2009 The Jackson Laboratory * * This software was developed by Gary Churchill's Lab at The Jackson * Laboratory (see http://research.jax.org/faculty/churchill). * * This 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. * * This software 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 this software. If not, see <http://www.gnu.org/licenses/>. */ package org.jax.qtl.scan.gui; import org.jax.qtl.scan.ScanCommandBuilder; /** * This panel is a sort of catch all for the scan parameters that didn't * make it into the other panels. * @see ScanCommandBuilder * @author <A HREF="mailto:keith.sheppard@jax.org">Keith Sheppard</A> */ public class OtherScanParametersPanel extends ScanCommandEditorPanel { /** * every {@link java.io.Serializable} is supposed to have one of these */ private static final long serialVersionUID = -4113250306981211719L; private final ScanCommandBuilder scanCommand; /** * Constructor * @param scanCommand * the scan command that this panel edits */ public OtherScanParametersPanel(ScanCommandBuilder scanCommand) { this.scanCommand = scanCommand; this.initComponents(); this.parametersChanged(); } /** * respond to a change in the parameters */ private void parametersChanged() { this.scanCommand.setUseAllMarkers( !this.evenlySpacedMarkersCheckBox.isSelected()); this.scanCommand.setCleanOutput( this.cleanOutputCheckBox.isSelected()); this.fireCommandModified(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("all") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { evenlySpacedMarkersCheckBox = new javax.swing.JCheckBox(); cleanOutputCheckBox = new javax.swing.JCheckBox(); evenlySpacedMarkersCheckBox.setSelected(true); evenlySpacedMarkersCheckBox.setText("Only Use Evenly Spaced Markers for Scan"); evenlySpacedMarkersCheckBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { evenlySpacedMarkersCheckBoxItemStateChanged(evt); } }); cleanOutputCheckBox.setText("Clean Output of Scan"); cleanOutputCheckBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { cleanOutputCheckBoxItemStateChanged(evt); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(evenlySpacedMarkersCheckBox) .add(cleanOutputCheckBox)) .addContainerGap(61, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(evenlySpacedMarkersCheckBox) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(cleanOutputCheckBox) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); }// </editor-fold>//GEN-END:initComponents private void evenlySpacedMarkersCheckBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_evenlySpacedMarkersCheckBoxItemStateChanged this.parametersChanged(); }//GEN-LAST:event_evenlySpacedMarkersCheckBoxItemStateChanged private void cleanOutputCheckBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cleanOutputCheckBoxItemStateChanged this.parametersChanged(); }//GEN-LAST:event_cleanOutputCheckBoxItemStateChanged // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JCheckBox cleanOutputCheckBox; private javax.swing.JCheckBox evenlySpacedMarkersCheckBox; // End of variables declaration//GEN-END:variables /** * {@inheritDoc} */ @Override protected ScanCommandBuilder getScanCommand() { return this.scanCommand; } }