/*
 * JSubSplit.java
 *
 * Created on March 5, 2007, 2:48 AM
 *
 * This file is part of Jubler.
 *
 * Jubler 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, version 2.
 *
 *
 * Jubler 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 Jubler; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

package com.panayotis.jubler.tools;

import static com.panayotis.jubler.i18n.I18N._;

import com.panayotis.jubler.time.Time;
import com.panayotis.jubler.time.gui.JTimeSingleSelection;
import java.awt.BorderLayout;
import javax.swing.JPanel;

/**
 *
 * @author  teras
 */
public class JSubSplit extends javax.swing.JPanel {
    private JTimeSingleSelection split;
    
    /** Creates new form JSubSplit */
    public JSubSplit() {
        initComponents();
        split = new JTimeSingleSelection("");
        split.setToolTip(_("Use the following time (inclusive) in order to create the new splitted subtitles"));
        
        TimeContainer.add(split, BorderLayout.CENTER);
    }
    
    public void setTime(Time t) {
        split.setTime(t);
    }

    public JPanel getTimeContainer() {
        return TimeContainer;
    }
    
    public Time getTime() {
        return split.getTime();
    }
    
    /** 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() {
        TimeContainer = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();

        setLayout(new java.awt.BorderLayout());

        TimeContainer.setLayout(new java.awt.BorderLayout());

        jLabel1.setText(_("Splitting time"));
        TimeContainer.add(jLabel1, java.awt.BorderLayout.NORTH);

        add(TimeContainer, java.awt.BorderLayout.NORTH);

    }// </editor-fold>//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel TimeContainer;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
    
}
