Search in sources :

Example 1 with JPreviewSlider

use of com.bixly.pastevid.util.view.JPreviewSlider in project screenbird by adamhub.

the class PreviewPlayer method initComponents.

/** 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("unchecked")
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
void initComponents() {
    jPanelPreviewRoot = new javax.swing.JPanel();
    jPanel1 = new javax.swing.JPanel();
    btnCancel = new javax.swing.JButton();
    btnMinimize = new javax.swing.JButton();
    titleBarLabel = new javax.swing.JLabel();
    jPanel3 = new JRoundedPanel();
    togglePlayPause = new javax.swing.JToggleButton();
    btnSkipToStart = new javax.swing.JButton();
    btnSkipToEnd = new javax.swing.JButton();
    btnFinalizeVideo = new javax.swing.JButton();
    jlblTimeCurrent = new javax.swing.JLabel();
    jlblTimeRemaining = new javax.swing.JLabel();
    jPanel2 = new javax.swing.JPanel();
    previewTimeSlider = new JPreviewSlider(this);
    jPanel4 = new javax.swing.JPanel();
    jpImage = new com.bixly.pastevid.util.view.JImagePanel();
    setBackground(new java.awt.Color(214, 214, 214));
    setLayout(new java.awt.BorderLayout());
    jPanelPreviewRoot.setBackground(new java.awt.Color(214, 214, 214));
    jPanelPreviewRoot.setOpaque(false);
    jPanelPreviewRoot.setLayout(new java.awt.BorderLayout());
    jPanel1.setBackground(new java.awt.Color(76, 76, 76));
    jPanel1.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 0, 1, 0, new java.awt.Color(56, 56, 56)));
    jPanel1.setPreferredSize(new java.awt.Dimension(677, 23));
    btnCancel.setBackground(java.awt.Color.white);
    btnCancel.setForeground(new java.awt.Color(255, 255, 255));
    // NOI18N
    btnCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/close_normal.png")));
    btnCancel.setAlignmentY(0.0F);
    btnCancel.setBorder(null);
    btnCancel.setBorderPainted(false);
    btnCancel.setContentAreaFilled(false);
    btnCancel.setDoubleBuffered(true);
    btnCancel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnCancel.setMaximumSize(new java.awt.Dimension(42, 16));
    btnCancel.setMinimumSize(new java.awt.Dimension(42, 16));
    // NOI18N
    btnCancel.setName("btnCancelRecorder");
    btnCancel.setPreferredSize(new java.awt.Dimension(42, 16));
    // NOI18N
    btnCancel.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/close_normal.png")));
    // NOI18N
    btnCancel.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/close_hover.png")));
    btnCancel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    btnCancel.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCancelActionPerformed(evt);
        }
    });
    btnMinimize.setBackground(java.awt.Color.darkGray);
    btnMinimize.setForeground(new java.awt.Color(255, 255, 255));
    // NOI18N
    btnMinimize.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/minimize_normal.png")));
    btnMinimize.setBorder(null);
    btnMinimize.setContentAreaFilled(false);
    btnMinimize.setDoubleBuffered(true);
    btnMinimize.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnMinimize.setMargin(new java.awt.Insets(2, 14, 0, 14));
    btnMinimize.setMaximumSize(new java.awt.Dimension(21, 16));
    btnMinimize.setMinimumSize(new java.awt.Dimension(21, 16));
    // NOI18N
    btnMinimize.setName("btnMinimizeRecorder");
    btnMinimize.setPreferredSize(new java.awt.Dimension(21, 16));
    // NOI18N
    btnMinimize.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/minimize_normal.png")));
    // NOI18N
    btnMinimize.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/minimize_hover.png")));
    btnMinimize.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnMinimizeActionPerformed(evt);
        }
    });
    // NOI18N
    titleBarLabel.setFont(new java.awt.Font("Arial", 1, 13));
    titleBarLabel.setForeground(new java.awt.Color(255, 255, 255));
    titleBarLabel.setText("Loading...");
    titleBarLabel.setMaximumSize(new java.awt.Dimension(53, 19));
    titleBarLabel.setMinimumSize(new java.awt.Dimension(53, 19));
    titleBarLabel.setPreferredSize(new java.awt.Dimension(53, 19));
    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(titleBarLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 584, Short.MAX_VALUE).addGap(18, 18, 18).addComponent(btnMinimize, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(0, 0, 0).addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel1Layout.createSequentialGroup().addGap(3, 3, 3).addComponent(titleBarLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(btnMinimize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addGap(0, 0, Short.MAX_VALUE)));
    jPanelPreviewRoot.add(jPanel1, java.awt.BorderLayout.PAGE_START);
    add(jPanelPreviewRoot, java.awt.BorderLayout.PAGE_START);
    jPanel3.setBackground(new java.awt.Color(214, 214, 214));
    togglePlayPause.setBackground(java.awt.Color.darkGray);
    // NOI18N
    togglePlayPause.setFont(new java.awt.Font("Lucida Grande", 0, 12));
    togglePlayPause.setForeground(java.awt.Color.white);
    // NOI18N
    togglePlayPause.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/preview/play_normal.png")));
    togglePlayPause.setToolTipText("Play Preivew");
    togglePlayPause.setBorder(null);
    togglePlayPause.setBorderPainted(false);
    togglePlayPause.setContentAreaFilled(false);
    togglePlayPause.setFocusable(false);
    togglePlayPause.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    togglePlayPause.setIconTextGap(0);
    togglePlayPause.setMaximumSize(new java.awt.Dimension(113, 36));
    togglePlayPause.setMinimumSize(new java.awt.Dimension(113, 36));
    // NOI18N
    togglePlayPause.setName("togglePlayPause");
    togglePlayPause.setPreferredSize(new java.awt.Dimension(113, 36));
    // NOI18N
    togglePlayPause.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/preview/play_pushed.png")));
    // NOI18N
    togglePlayPause.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/preview/play_hover.png")));
    // NOI18N
    togglePlayPause.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/preview/play_pushed.png")));
    togglePlayPause.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            togglePlayPauseActionPerformed(evt);
        }
    });
    btnSkipToStart.setBackground(java.awt.Color.white);
    btnSkipToStart.setForeground(new java.awt.Color(255, 255, 255));
    // NOI18N
    btnSkipToStart.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/preview/rewind_normal.png")));
    btnSkipToStart.setToolTipText("Skip to Beginning");
    btnSkipToStart.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
    btnSkipToStart.setBorderPainted(false);
    btnSkipToStart.setContentAreaFilled(false);
    btnSkipToStart.setDoubleBuffered(true);
    btnSkipToStart.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnSkipToStart.setMaximumSize(new java.awt.Dimension(24, 24));
    btnSkipToStart.setMinimumSize(new java.awt.Dimension(24, 24));
    // NOI18N
    btnSkipToStart.setName("btnCancelRecorder");
    btnSkipToStart.setPreferredSize(new java.awt.Dimension(24, 24));
    // NOI18N
    btnSkipToStart.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/preview/rewind_hover.png")));
    // NOI18N
    btnSkipToStart.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/preview/rewind_pushed.png")));
    btnSkipToStart.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mousePressed(java.awt.event.MouseEvent evt) {
            btnSkipToStartMousePressed(evt);
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            btnSkipToStartMouseReleased(evt);
        }
    });
    btnSkipToStart.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSkipToStartActionPerformed(evt);
        }
    });
    btnSkipToEnd.setBackground(java.awt.Color.white);
    btnSkipToEnd.setForeground(new java.awt.Color(255, 255, 255));
    // NOI18N
    btnSkipToEnd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/preview/ffwd_normal.png")));
    btnSkipToEnd.setToolTipText("Skip To End");
    btnSkipToEnd.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
    btnSkipToEnd.setBorderPainted(false);
    btnSkipToEnd.setContentAreaFilled(false);
    btnSkipToEnd.setDoubleBuffered(true);
    btnSkipToEnd.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnSkipToEnd.setMaximumSize(new java.awt.Dimension(24, 24));
    btnSkipToEnd.setMinimumSize(new java.awt.Dimension(24, 24));
    // NOI18N
    btnSkipToEnd.setName("btnCancelRecorder");
    btnSkipToEnd.setPreferredSize(new java.awt.Dimension(24, 24));
    // NOI18N
    btnSkipToEnd.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/preview/ffwd_hover.png")));
    // NOI18N
    btnSkipToEnd.setRolloverSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/preview/ffwd_pushed.png")));
    btnSkipToEnd.addMouseListener(new java.awt.event.MouseAdapter() {

        public void mousePressed(java.awt.event.MouseEvent evt) {
            btnSkipToEndMousePressed(evt);
        }

        public void mouseReleased(java.awt.event.MouseEvent evt) {
            btnSkipToEndMouseReleased(evt);
        }
    });
    btnSkipToEnd.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSkipToEndActionPerformed(evt);
        }
    });
    btnFinalizeVideo.setBackground(java.awt.Color.darkGray);
    // NOI18N
    btnFinalizeVideo.setFont(new java.awt.Font("Lucida Grande", 0, 12));
    btnFinalizeVideo.setForeground(new java.awt.Color(255, 255, 255));
    // NOI18N
    btnFinalizeVideo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/preview/finalize_normal.png")));
    btnFinalizeVideo.setToolTipText("Finalize Screen Capture");
    btnFinalizeVideo.setBorder(null);
    btnFinalizeVideo.setContentAreaFilled(false);
    btnFinalizeVideo.setDoubleBuffered(true);
    btnFinalizeVideo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnFinalizeVideo.setMaximumSize(new java.awt.Dimension(24, 24));
    btnFinalizeVideo.setMinimumSize(new java.awt.Dimension(24, 24));
    // NOI18N
    btnFinalizeVideo.setName("btnFinalizeVideo");
    btnFinalizeVideo.setPreferredSize(new java.awt.Dimension(24, 24));
    // NOI18N
    btnFinalizeVideo.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/preview/finalize_hover.png")));
    // NOI18N
    btnFinalizeVideo.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/preview/finalize_pushed.png")));
    btnFinalizeVideo.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnFinalizeVideoActionPerformed(evt);
        }
    });
    jlblTimeCurrent.setBackground(new java.awt.Color(214, 214, 214));
    jlblTimeCurrent.setForeground(new java.awt.Color(255, 255, 255));
    jlblTimeCurrent.setText("TimeCurr");
    jlblTimeCurrent.setToolTipText("Current Time of Screen Capture");
    jlblTimeCurrent.setDoubleBuffered(true);
    jlblTimeRemaining.setForeground(new java.awt.Color(255, 255, 255));
    jlblTimeRemaining.setText("TimeLeft");
    jlblTimeRemaining.setToolTipText("Time Left of Screen Capture");
    jlblTimeRemaining.setDoubleBuffered(true);
    jPanel2.setBackground(new java.awt.Color(214, 214, 214));
    // NOI18N
    previewTimeSlider.setName("jsliderpreview");
    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup().addComponent(previewTimeSlider, javax.swing.GroupLayout.DEFAULT_SIZE, 367, Short.MAX_VALUE).addContainerGap()));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(previewTimeSlider, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
    javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel3Layout.createSequentialGroup().addContainerGap().addComponent(togglePlayPause, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE).addGap(10, 10, 10).addComponent(btnSkipToStart, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(btnSkipToEnd, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addGroup(jPanel3Layout.createSequentialGroup().addComponent(jlblTimeCurrent).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(jlblTimeRemaining))).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(btnFinalizeVideo, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE).addContainerGap()));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel3Layout.createSequentialGroup().addContainerGap().addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false).addComponent(togglePlayPause, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(btnSkipToStart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(btnSkipToEnd, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(btnFinalizeVideo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addGroup(jPanel3Layout.createSequentialGroup().addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jlblTimeRemaining).addComponent(jlblTimeCurrent)))).addContainerGap(18, Short.MAX_VALUE)));
    add(jPanel3, java.awt.BorderLayout.PAGE_END);
    jPanel4.setBackground(new java.awt.Color(214, 214, 214));
    jpImage.setEnabled(false);
    javax.swing.GroupLayout jpImageLayout = new javax.swing.GroupLayout(jpImage);
    jpImage.setLayout(jpImageLayout);
    jpImageLayout.setHorizontalGroup(jpImageLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 653, Short.MAX_VALUE));
    jpImageLayout.setVerticalGroup(jpImageLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 228, Short.MAX_VALUE));
    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout.setHorizontalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel4Layout.createSequentialGroup().addContainerGap().addComponent(jpImage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addContainerGap()));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel4Layout.createSequentialGroup().addContainerGap().addComponent(jpImage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addContainerGap()));
    add(jPanel4, java.awt.BorderLayout.CENTER);
}
Also used : Color(java.awt.Color) MouseAdapter(java.awt.event.MouseAdapter) ImageIcon(javax.swing.ImageIcon) Color(java.awt.Color) JRoundedPanel(com.bixly.pastevid.util.view.JRoundedPanel) JPreviewSlider(com.bixly.pastevid.util.view.JPreviewSlider) MouseEvent(java.awt.event.MouseEvent) Dimension(java.awt.Dimension) JPanel(javax.swing.JPanel)

Aggregations

JPreviewSlider (com.bixly.pastevid.util.view.JPreviewSlider)1 JRoundedPanel (com.bixly.pastevid.util.view.JRoundedPanel)1 Color (java.awt.Color)1 Dimension (java.awt.Dimension)1 MouseAdapter (java.awt.event.MouseAdapter)1 MouseEvent (java.awt.event.MouseEvent)1 ImageIcon (javax.swing.ImageIcon)1 JPanel (javax.swing.JPanel)1