private void tableRulesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tableRulesMouseClicked
        if (tableRules.getSelectedRow() == -1) {
            return;
        }

        Rule rule = RulesManager.getInstance().getRuleByName((String) tableRules.getModel().getValueAt(tableRules.getSelectedRow(), 1));

        if (rule == null) {
            return;
        }

        rule.setIsEnabled((Boolean) tableRules.getModel().getValueAt(tableRules.getSelectedRow(), 0));

        RulesManager.getInstance().saveRules(MainClass.RULES_DIR);
    }//GEN-LAST:event_tableRulesMouseClicked