/*
* EDLComposerPanel.java
*
* Created on November 16, 2007, 5:00 PM
*/
package com.meapsoft.gui.composers;
import com.meapsoft.EDLFile;
import com.meapsoft.composers.Composer;
import com.meapsoft.composers.EDLComposer;
/**
*
* @author ms3311
*/
public class EDLComposerPanel extends ComposerSettingsPanel {
private String inputEDLFileNameFull = "";
private String inputEDLFileNameShort = "" ;
/** Creates new form EDLComposerPanel */
public EDLComposerPanel() {
initComponents();
}
public int initComposer()
{
EDLFile input = new EDLFile(inputEDLFileNameFull);
mComposer = new EDLComposer(input, mParentTab.edlFile);
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()
{
jLabel1 = new javax.swing.JLabel();
mEdlFileTxt = new javax.swing.JTextField();
mBrowseBtn = new javax.swing.JButton();
jLabel1.setText("Input EDL file:");
mEdlFileTxt.setText("input edl file");
mBrowseBtn.setText("Browse");
mBrowseBtn.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(java.awt.event.ActionEvent evt)
{
mBrowseBtnActionPerformed(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()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(jLabel1))
.add(layout.createSequentialGroup()
.add(44, 44, 44)
.add(mEdlFileTxt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 152, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(mBrowseBtn)))
.addContainerGap(79, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(jLabel1)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(mEdlFileTxt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(mBrowseBtn))
.addContainerGap(184, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
private void mBrowseBtnActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_mBrowseBtnActionPerformed
{//GEN-HEADEREND:event_mBrowseBtnActionPerformed
String names[] = browseFile("edl");
inputEDLFileNameFull = names[0];
inputEDLFileNameShort = names[1];
mParentTab.dataBaseName = inputEDLFileNameShort.replaceAll(".edl", "");
mParentTab.updateFileNames();
mParentTab.outputEDLFileName = mParentTab.dataBaseName + ".out.edl";
mParentTab.inputEDLFileName = mParentTab.outputEDLFileName;
mEdlFileTxt.setText(inputEDLFileNameShort);
}//GEN-LAST:event_mBrowseBtnActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel jLabel1;
private javax.swing.JButton mBrowseBtn;
private javax.swing.JTextField mEdlFileTxt;
// End of variables declaration//GEN-END:variables
}