Package com.meapsoft.gui.composers

Source Code of com.meapsoft.gui.composers.ThresholdComposerPanel

/*
* ThesholdComposerPanel.java
*
* Created on November 16, 2007, 4:51 PM
*/

package com.meapsoft.gui.composers;

import com.meapsoft.composers.Composer;
import com.meapsoft.composers.ThresholdComposer;

/**
*
* @author  ms3311
*/
public class ThresholdComposerPanel extends ComposerSettingsPanel {
   
    /** Creates new form ThesholdComposerPanel */
    public ThresholdComposerPanel() {
        initComponents();
    }

    public int initComposer()
    {
    double top = new Double(mTopTxt.getText()).doubleValue();
    double bottom = new Double(mBottomTxt.getText()).doubleValue();
    mComposer = new ThresholdComposer(mParentTab.featFile, mParentTab.edlFile, top, bottom, mInsideBtn.isSelected());
     
      return 0;
    }
   
   
    /** 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.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents()
    {
        mButtonGroup = new javax.swing.ButtonGroup();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        mBottomTxt = new javax.swing.JTextField();
        mTopTxt = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        mInsideBtn = new javax.swing.JRadioButton();
        mOutsideBtn = new javax.swing.JRadioButton();

        jLabel1.setText("Bottom Threshold:");

        jLabel2.setText("Top Threshold:");

        mBottomTxt.setText("1.0");

        mTopTxt.setText("10.0");

        jLabel3.setText("Use chunks:");

        mButtonGroup.add(mInsideBtn);
        mInsideBtn.setSelected(true);
        mInsideBtn.setText("Inside Thresholds");
        mInsideBtn.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        mInsideBtn.setMargin(new java.awt.Insets(0, 0, 0, 0));

        mButtonGroup.add(mOutsideBtn);
        mOutsideBtn.setText("Outside Thresholds");
        mOutsideBtn.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        mOutsideBtn.setMargin(new java.awt.Insets(0, 0, 0, 0));

        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(jLabel1)
                    .add(jLabel2))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(mBottomTxt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(mTopTxt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .add(28, 28, 28)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(jLabel3)
                    .add(layout.createSequentialGroup()
                        .add(10, 10, 10)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(mOutsideBtn)
                            .add(mInsideBtn))))
                .addContainerGap(123, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel1)
                    .add(mBottomTxt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jLabel3))
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(15, 15, 15)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel2)
                            .add(mTopTxt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                    .add(layout.createSequentialGroup()
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(mInsideBtn)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(mOutsideBtn)))
                .addContainerGap(227, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents
   
   
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JRadioButton mInsideBtn;
    private javax.swing.JTextField mBottomTxt;
    private javax.swing.ButtonGroup mButtonGroup;
    private javax.swing.JRadioButton mOutsideBtn;
    private javax.swing.JTextField mTopTxt;
    // End of variables declaration//GEN-END:variables


}
TOP

Related Classes of com.meapsoft.gui.composers.ThresholdComposerPanel

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.