Package com.meapsoft.gui.composers

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

/*
* IntraChunkShuffleComposerPanel.java
*
* Created on November 16, 2007, 4:46 PM
*/

package com.meapsoft.gui.composers;

import com.meapsoft.composers.Composer;
import com.meapsoft.composers.IntraChunkShuffleComposer;
import com.meapsoft.disgraced.GUIUtils;

/**
*
* @author  ms3311
*/
public class IntraChunkShuffleComposerPanel extends ComposerSettingsPanel {
   
    /** Creates new form IntraChunkShuffleComposerPanel */
    public IntraChunkShuffleComposerPanel() {
        initComponents();
    }
   
    public int initComposer()
    {
    int numSubChunks = 4;
   
    try
    {
      numSubChunks = new Integer(mSubChunkTxt.getText()).intValue();
    }
    catch (Exception e)
    {
      GUIUtils.ShowDialog("The number of sub chunks must be >= 2.", GUIUtils.MESSAGE, mParentTab.mMainScreen);
            return -1;
    }
    mComposer = new IntraChunkShuffleComposer(mParentTab.featFile, mParentTab.edlFile, numSubChunks);
     
      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()
    {
        mSubChunkTxt = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();

        mSubChunkTxt.setText("4");

        jLabel1.setText("Sub-chunks:");

        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(jLabel1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(mSubChunkTxt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 36, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(14, 14, 14)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jLabel1)
                    .add(mSubChunkTxt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents
   
   
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JTextField mSubChunkTxt;
    // End of variables declaration//GEN-END:variables
   
}
TOP

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

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.