private void btnEditRuleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditRuleActionPerformed
        if (tableRules.getSelectedRow() == -1) {
            return;
        }

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

        if (rule == null) {
            return;
        }

        this.ruleDialog.setRule(rule);
        this.ruleDialog.setParent(this);
        this.ruleDialog.setIsAdding(false);

        this.ruleDialog.setVisible(true);
    }//GEN-LAST:event_btnEditRuleActionPerformed