Class RegexIndicatorBinder

java.lang.Object
ai.attackframework.tools.burp.ui.text.RegexIndicatorBinder

public final class RegexIndicatorBinder extends Object
Binds a text field and toggle(s) to a small indicator label that shows a ✓ (valid) or ✖ (invalid) when regex mode is enabled.

Behavior

  • Indicator is hidden when regex mode is off or the field is blank.
  • Indicator shows ✓ (green) for a valid pattern; ✖ (red) otherwise.
  • Indicator width is fixed to the max of both glyphs to avoid jitter.
  • Method Details

    • bind

      public static AutoCloseable bind(JTextField field, JCheckBox regexToggle, JCheckBox caseToggleOrNull, boolean multiline, JLabel indicator)
      Wire listeners and keep the indicator in sync with the current state.
      Parameters:
      field - source text field
      regexToggle - checkbox controlling regex mode
      caseToggleOrNull - optional checkbox controlling case sensitivity (may be null)
      multiline - whether multiline anchors should be applied
      indicator - target label for ✓ / ✖
      Returns:
      handle that detaches listeners when closed