package Modes.Setup;

import Main.Main;
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
 * @author Jonathan Zamora
 */
public class SetupTemplateExtra extends javax.swing.JPanel {
    // Declaring vars
        int roundsNum = 1;
        int roundTimeMin = 1;
        int roundTimeSec = 0;
        int restTimeMin = 0;
        int restTimeSec = 30;
        int forceGoal = 100;
        
    /**
     * Creates new form homePagePanel
     */
    Timer timer;
    public SetupTemplateExtra() 
    {
        initComponents();       
        // Current Time
        ActionListener actionListener = (ActionEvent evt) -> {
            Date date = new Date();
            DateFormat timeFormat = new SimpleDateFormat("HH:mm:ss");
            String time = timeFormat.format(date);
            jLabel7.setText(time);
        };
        timer = new Timer(1000, actionListener);
        timer.setInitialDelay(0);
        timer.start();
        
        // Setting Plus and Minus state
        RoundTimeMinus.setVisible(false);
        RoundTimePlus.setVisible(false);
        RestTimeMinus.setVisible(false);
        RestTimePlus.setVisible(false);
        ForceGoalMinus.setVisible(false);
        ForceGoalPlus.setVisible(false);
    }
    
    public void invisible()
    {
        RoundsPlus.setVisible(false);
        RoundsMinus.setVisible(false);
        RoundTimeMinus.setVisible(false);
        RoundTimePlus.setVisible(false);
        RestTimeMinus.setVisible(false);
        RestTimePlus.setVisible(false);
        ForceGoalMinus.setVisible(false);
        ForceGoalPlus.setVisible(false);
    }

    /**
     * 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")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jPanel1.setVisible(false);
        About_Button = new javax.swing.JButton();
        About_Button.setOpaque(false);
        About_Button.setContentAreaFilled(false);
        //jButton1.setBorderPainted(false);
        Settings_Button = new javax.swing.JButton();
        About_Button.setOpaque(false);
        About_Button.setContentAreaFilled(false);
        //jButton1.setBorderPainted(false);
        Profile_Button = new javax.swing.JButton();
        About_Button.setOpaque(false);
        About_Button.setContentAreaFilled(false);
        //jButton1.setBorderPainted(false);
        Activity_Button = new javax.swing.JButton();
        About_Button.setOpaque(false);
        About_Button.setContentAreaFilled(false);
        //jButton1.setBorderPainted(false);
        Feedback_Button = new javax.swing.JButton();
        About_Button.setOpaque(false);
        About_Button.setContentAreaFilled(false);
        //jButton1.setBorderPainted(false);
        jLabel7 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        SidebarButton = new javax.swing.JLabel();
        ComboCounterTitle = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        ForceGoal = new javax.swing.JLabel();
        RoundsNum = new javax.swing.JLabel();
        RestTime = new javax.swing.JLabel();
        RoundTime = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        RoundsMinus = new javax.swing.JLabel();
        RoundsPlus = new javax.swing.JLabel();
        RoundTimePlus = new javax.swing.JLabel();
        RoundTimeMinus = new javax.swing.JLabel();
        RestTimePlus = new javax.swing.JLabel();
        RestTimeMinus = new javax.swing.JLabel();
        ForceGoalPlus = new javax.swing.JLabel();
        ForceGoalMinus = new javax.swing.JLabel();

        jPanel1.setBackground(new java.awt.Color(51, 51, 56));
        jPanel1.setBorder(javax.swing.BorderFactory.createMatteBorder(0, 5, 5, 0, new java.awt.Color(0, 0, 0)));
        jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        About_Button.setBackground(new java.awt.Color(51, 51, 56));
        About_Button.setFont(new java.awt.Font("Tahoma", 0, 30)); // NOI18N
        About_Button.setForeground(new java.awt.Color(240, 240, 240));
        About_Button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/aboutIcon.png"))); // NOI18N
        About_Button.setText(" About");
        About_Button.setBorder(null);
        About_Button.setContentAreaFilled(false);
        About_Button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                About_ButtonMouseClicked(evt);
            }
        });
        jPanel1.add(About_Button, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 420, 160, 60));

        Settings_Button.setBackground(new java.awt.Color(51, 51, 56));
        Settings_Button.setFont(new java.awt.Font("Tahoma", 0, 30)); // NOI18N
        Settings_Button.setForeground(new java.awt.Color(240, 240, 240));
        Settings_Button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/settingsIcon.png"))); // NOI18N
        Settings_Button.setText(" Settings");
        Settings_Button.setBorder(null);
        Settings_Button.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        Settings_Button.setFocusPainted(false);
        Settings_Button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                Settings_ButtonMouseClicked(evt);
            }
        });
        jPanel1.add(Settings_Button, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, 190, 60));

        Profile_Button.setBackground(new java.awt.Color(51, 51, 56));
        Profile_Button.setFont(new java.awt.Font("Tahoma", 0, 30)); // NOI18N
        Profile_Button.setForeground(new java.awt.Color(240, 240, 240));
        Profile_Button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/profileIcon.png"))); // NOI18N
        Profile_Button.setText(" Profile");
        Profile_Button.setBorder(null);
        Profile_Button.setContentAreaFilled(false);
        Profile_Button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                Profile_ButtonMouseClicked(evt);
            }
        });
        jPanel1.add(Profile_Button, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 120, 150, 60));

        Activity_Button.setBackground(new java.awt.Color(51, 51, 56));
        Activity_Button.setFont(new java.awt.Font("Tahoma", 0, 30)); // NOI18N
        Activity_Button.setForeground(new java.awt.Color(240, 240, 240));
        Activity_Button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/activityIcon.png"))); // NOI18N
        Activity_Button.setText(" Activity");
        Activity_Button.setBorder(null);
        Activity_Button.setContentAreaFilled(false);
        Activity_Button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                Activity_ButtonMouseClicked(evt);
            }
        });
        jPanel1.add(Activity_Button, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 220, 160, 60));

        Feedback_Button.setBackground(new java.awt.Color(51, 51, 56));
        Feedback_Button.setFont(new java.awt.Font("Tahoma", 0, 30)); // NOI18N
        Feedback_Button.setForeground(new java.awt.Color(240, 240, 240));
        Feedback_Button.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/feedbackIcon.png"))); // NOI18N
        Feedback_Button.setText(" Feedback");
        Feedback_Button.setBorder(null);
        Feedback_Button.setContentAreaFilled(false);
        Feedback_Button.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                Feedback_ButtonMouseClicked(evt);
            }
        });
        jPanel1.add(Feedback_Button, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 320, 180, 60));

        setBackground(new java.awt.Color(0, 0, 55));
        setMaximumSize(new java.awt.Dimension(768, 1024));
        setMinimumSize(new java.awt.Dimension(768, 1024));
        setPreferredSize(new java.awt.Dimension(768, 1024));
        setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel7.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        jLabel7.setForeground(new java.awt.Color(240, 240, 240));
        jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel7.setText("Timer");
        add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 90, 100, -1));

        jPanel2.setBackground(new java.awt.Color(51, 51, 56));
        jPanel2.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        SidebarButton.setBackground(new java.awt.Color(51, 51, 56));
        SidebarButton.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        SidebarButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/menuIcon.png"))); // NOI18N
        SidebarButton.setOpaque(true);
        SidebarButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                SidebarButtonMouseClicked(evt);
            }
        });
        jPanel2.add(SidebarButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(690, 10, 60, 55));

        ComboCounterTitle.setFont(new java.awt.Font("Tahoma", 1, 48)); // NOI18N
        ComboCounterTitle.setForeground(new java.awt.Color(240, 240, 240));
        ComboCounterTitle.setText("ComboCounter");
        jPanel2.add(ComboCounterTitle, new org.netbeans.lib.awtextra.AbsoluteConstraints(190, 10, -1, -1));

        add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 755, 80));

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/emptyCircleIcon.png"))); // NOI18N
        add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 570, 30, 30));

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/filledCircleIcon.png"))); // NOI18N
        add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 480, 30, 30));

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/emptyCircleIcon.png"))); // NOI18N
        add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 510, 30, 30));

        jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/emptyCircleIcon.png"))); // NOI18N
        add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 450, 30, 30));

        jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/emptyCircleIcon.png"))); // NOI18N
        add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 540, 30, 30));

        jLabel6.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(240, 240, 240));
        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel6.setText("Force Goal");
        add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 800, 180, 40));

        jLabel9.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel9.setForeground(new java.awt.Color(240, 240, 240));
        jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel9.setText("Round Time");
        add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 400, 200, 40));

        jLabel10.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel10.setForeground(new java.awt.Color(240, 240, 240));
        jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel10.setText("Rest Time");
        add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(310, 590, 160, 40));

        jLabel11.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        jLabel11.setForeground(new java.awt.Color(240, 240, 240));
        jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel11.setText("Force Mode");
        add(jLabel11, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 90, 170, 40));

        ForceGoal.setFont(new java.awt.Font("Tahoma", 0, 48)); // NOI18N
        ForceGoal.setForeground(new java.awt.Color(240, 240, 240));
        ForceGoal.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        ForceGoal.setText("100");
        ForceGoal.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                ForceGoalMouseClicked(evt);
            }
        });
        add(ForceGoal, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 870, 90, 40));

        RoundsNum.setFont(new java.awt.Font("Tahoma", 0, 48)); // NOI18N
        RoundsNum.setForeground(new java.awt.Color(240, 240, 240));
        RoundsNum.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        RoundsNum.setText("1");
        RoundsNum.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                RoundsNumMouseClicked(evt);
            }
        });
        add(RoundsNum, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 290, 60, 40));

        RestTime.setFont(new java.awt.Font("Tahoma", 0, 48)); // NOI18N
        RestTime.setForeground(new java.awt.Color(240, 240, 240));
        RestTime.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        RestTime.setText("0:30");
        RestTime.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                RestTimeMouseClicked(evt);
            }
        });
        add(RestTime, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 660, 100, 40));

        RoundTime.setFont(new java.awt.Font("Tahoma", 0, 48)); // NOI18N
        RoundTime.setForeground(new java.awt.Color(240, 240, 240));
        RoundTime.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        RoundTime.setText("1:00");
        RoundTime.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                RoundTimeMouseClicked(evt);
            }
        });
        add(RoundTime, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 470, 130, 40));

        jLabel16.setFont(new java.awt.Font("Tahoma", 0, 36)); // NOI18N
        jLabel16.setForeground(new java.awt.Color(240, 240, 240));
        jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel16.setText("Rounds");
        add(jLabel16, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 220, 170, 40));

        RoundsMinus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/minusIcon.png"))); // NOI18N
        RoundsMinus.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                RoundsMinusMouseClicked(evt);
            }
        });
        add(RoundsMinus, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 290, -1, 40));

        RoundsPlus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/plusIcon.png"))); // NOI18N
        RoundsPlus.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                RoundsPlusMouseClicked(evt);
            }
        });
        add(RoundsPlus, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 290, -1, 40));

        RoundTimePlus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/plusIcon.png"))); // NOI18N
        RoundTimePlus.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                RoundTimePlusMouseClicked(evt);
            }
        });
        add(RoundTimePlus, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 470, -1, 40));

        RoundTimeMinus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/minusIcon.png"))); // NOI18N
        RoundTimeMinus.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                RoundTimeMinusMouseClicked(evt);
            }
        });
        add(RoundTimeMinus, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 470, -1, 40));

        RestTimePlus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/plusIcon.png"))); // NOI18N
        RestTimePlus.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                RestTimePlusMouseClicked(evt);
            }
        });
        add(RestTimePlus, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 660, -1, 40));

        RestTimeMinus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/minusIcon.png"))); // NOI18N
        RestTimeMinus.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                RestTimeMinusMouseClicked(evt);
            }
        });
        add(RestTimeMinus, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 660, -1, 40));

        ForceGoalPlus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/plusIcon.png"))); // NOI18N
        add(ForceGoalPlus, new org.netbeans.lib.awtextra.AbsoluteConstraints(570, 870, -1, 40));

        ForceGoalMinus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/minusIcon.png"))); // NOI18N
        add(ForceGoalMinus, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 870, -1, 40));
    }// </editor-fold>//GEN-END:initComponents

    private void SidebarButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_SidebarButtonMouseClicked
        if (Main.sidebarOpen == false)
        {
            jPanel1.setVisible(true) ;
            Main.sidebarOpen = true ;
        }
        else if (Main.sidebarOpen == true)
        {
            jPanel1.setVisible(false);
            Main.sidebarOpen = false ;
        }
    }//GEN-LAST:event_SidebarButtonMouseClicked

    private void About_ButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_About_ButtonMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_About_ButtonMouseClicked

    private void Settings_ButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Settings_ButtonMouseClicked
        Main.transitionToPage(3);
    }//GEN-LAST:event_Settings_ButtonMouseClicked

    private void Profile_ButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Profile_ButtonMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_Profile_ButtonMouseClicked

    private void Activity_ButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Activity_ButtonMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_Activity_ButtonMouseClicked

    private void Feedback_ButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Feedback_ButtonMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_Feedback_ButtonMouseClicked

    private void RoundsNumMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_RoundsNumMouseClicked
        invisible();
        RoundsPlus.setVisible(true);
        RoundsMinus.setVisible(true);
    }//GEN-LAST:event_RoundsNumMouseClicked

    private void RoundTimeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_RoundTimeMouseClicked
        invisible();
        RoundTimeMinus.setVisible(true);
        RoundTimePlus.setVisible(true);
    }//GEN-LAST:event_RoundTimeMouseClicked

    private void RestTimeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_RestTimeMouseClicked
        invisible();
        RestTimeMinus.setVisible(true);
        RestTimePlus.setVisible(true);
    }//GEN-LAST:event_RestTimeMouseClicked

    private void ForceGoalMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ForceGoalMouseClicked
        invisible();
        ForceGoalMinus.setVisible(true);
        ForceGoalPlus.setVisible(true);
    }//GEN-LAST:event_ForceGoalMouseClicked

    private void RoundsPlusMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_RoundsPlusMouseClicked
        // Max 10 rounds
        if (roundsNum != 10)
            roundsNum++;
        String roundNum = String.valueOf(roundsNum);
        RoundsNum.setText(roundNum);
    }//GEN-LAST:event_RoundsPlusMouseClicked

    private void RoundsMinusMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_RoundsMinusMouseClicked
        if (roundsNum != 1)
            roundsNum--;
        String roundNum = String.valueOf(roundsNum);
        RoundsNum.setText(roundNum);
    }//GEN-LAST:event_RoundsMinusMouseClicked

    private void RoundTimePlusMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_RoundTimePlusMouseClicked
        // 0:30 - 3:00 increases by 30s | 3:00-10:00 increases by 1m
        // 10:00 - 30:00 increases by 5m
        if (roundTimeMin < 3)
        {   
            if(roundTimeSec == 30)
            {
                roundTimeMin++;
                roundTimeSec = 0;
            }
            else
                roundTimeSec += 30;

            String min = String.valueOf(roundTimeMin);
            String sec;
            if (roundTimeSec == 0)
                sec = "00";
            else
                sec = "30";
            RoundTime.setText(min + ":" + sec);
        }
        else if (roundTimeMin < 10)
        {
            roundTimeMin+= 1;
            String min = String.valueOf(roundTimeMin);
            RoundTime.setText(min + ":00");
        }
        else if (roundTimeMin >= 10 && roundTimeMin != 30)
        {
            roundTimeMin+= 5;
            String min = String.valueOf(roundTimeMin);
            RoundTime.setText(min + ":00");
        }
    }//GEN-LAST:event_RoundTimePlusMouseClicked

    private void RoundTimeMinusMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_RoundTimeMinusMouseClicked
        // 0:30 - 3:00 decreases by 30s | 3:00-10:00 decreases by 1m
        // 10:00 - 30:00 decreases by 5m
        if (roundTimeMin == 0 && roundTimeSec == 30)
            return;
        
        if (roundTimeMin <= 3)
        {   
            if(roundTimeSec == 00)
            {
                roundTimeMin--;
                roundTimeSec = 30;
            }
            else
                roundTimeSec -= 30;

            String min = String.valueOf(roundTimeMin);
            String sec;
            if (roundTimeSec == 0)
                sec = "00";
            else
                sec = "30";
            RoundTime.setText(min + ":" + sec);
        }
        else if (roundTimeMin <= 10)
        {
            roundTimeMin-= 1;
            String min = String.valueOf(roundTimeMin);
            RoundTime.setText(min + ":00");
        }
        else if (roundTimeMin <= 30)
        {
            roundTimeMin-= 5;
            String min = String.valueOf(roundTimeMin);
            RoundTime.setText(min + ":00");
        }
    }//GEN-LAST:event_RoundTimeMinusMouseClicked

    private void RestTimePlusMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_RestTimePlusMouseClicked
        // Max 5:00
        if (restTimeMin == 5)
            return;
        
        if(restTimeSec == 30)
        {
            restTimeMin++;
            restTimeSec = 0;
        }
        else
            restTimeSec += 30;

        String min = String.valueOf(restTimeMin);
        String sec;
        if (restTimeSec == 0)
            sec = "00";
        else
            sec = "30";
        RestTime.setText(min + ":" + sec);
    }//GEN-LAST:event_RestTimePlusMouseClicked

    private void RestTimeMinusMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_RestTimeMinusMouseClicked
        if (restTimeMin == 0 && restTimeSec == 30)
            return;
        
        if(restTimeSec == 30)
        {
            restTimeMin++;
            restTimeSec = 0;
        }
        else
            restTimeSec += 30;

        String min = String.valueOf(restTimeMin);
        String sec;
        if (restTimeSec == 0)
            sec = "00";
        else
            sec = "30";
        RestTime.setText(min + ":" + sec);
    }//GEN-LAST:event_RestTimeMinusMouseClicked

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton About_Button;
    private javax.swing.JButton Activity_Button;
    private javax.swing.JLabel ComboCounterTitle;
    private javax.swing.JButton Feedback_Button;
    private javax.swing.JLabel ForceGoal;
    private javax.swing.JLabel ForceGoalMinus;
    private javax.swing.JLabel ForceGoalPlus;
    private javax.swing.JButton Profile_Button;
    private javax.swing.JLabel RestTime;
    private javax.swing.JLabel RestTimeMinus;
    private javax.swing.JLabel RestTimePlus;
    private javax.swing.JLabel RoundTime;
    private javax.swing.JLabel RoundTimeMinus;
    private javax.swing.JLabel RoundTimePlus;
    private javax.swing.JLabel RoundsMinus;
    private javax.swing.JLabel RoundsNum;
    private javax.swing.JLabel RoundsPlus;
    private javax.swing.JButton Settings_Button;
    private javax.swing.JLabel SidebarButton;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    // End of variables declaration//GEN-END:variables
}
