Record Class KeyEventTriggerConfig

java.lang.Object
java.lang.Record
com.inductiveautomation.perspective.designer.workspace.scriptseditor.ai.config.KeyEventTriggerConfig

public record KeyEventTriggerConfig(KeyEvent.EventMode mode, @Nullable KeyEvent.EventBound binding, @Nullable String key, @Nullable String code, @Nullable String regexPattern, @Nullable Integer regexWindow, boolean alt, boolean control, boolean shift, boolean meta) extends Record
  • Field Details

  • Constructor Details

    • KeyEventTriggerConfig

      public KeyEventTriggerConfig(KeyEvent.EventMode mode, @Nullable KeyEvent.EventBound binding, @Nullable String key, @Nullable String code, @Nullable String regexPattern, @Nullable Integer regexWindow, boolean alt, boolean control, boolean shift, boolean meta)
      Creates an instance of a KeyEventTriggerConfig record class.
      Parameters:
      mode - the value for the mode record component
      binding - the value for the binding record component
      key - the value for the key record component
      code - the value for the code record component
      regexPattern - the value for the regexPattern record component
      regexWindow - the value for the regexWindow record component
      alt - the value for the alt record component
      control - the value for the control record component
      shift - the value for the shift record component
      meta - the value for the meta record component
  • Method Details

    • fromKeyEvent

      public static KeyEventTriggerConfig fromKeyEvent(KeyEvent keyEvent)
    • applyTo

      public KeyEvent applyTo(KeyEvent base)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • mode

      public KeyEvent.EventMode mode()
      Returns the value of the mode record component.
      Returns:
      the value of the mode record component
    • binding

      public @Nullable KeyEvent.EventBound binding()
      Returns the value of the binding record component.
      Returns:
      the value of the binding record component
    • key

      public @Nullable String key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • code

      public @Nullable String code()
      Returns the value of the code record component.
      Returns:
      the value of the code record component
    • regexPattern

      public @Nullable String regexPattern()
      Returns the value of the regexPattern record component.
      Returns:
      the value of the regexPattern record component
    • regexWindow

      public @Nullable Integer regexWindow()
      Returns the value of the regexWindow record component.
      Returns:
      the value of the regexWindow record component
    • alt

      public boolean alt()
      Returns the value of the alt record component.
      Returns:
      the value of the alt record component
    • control

      public boolean control()
      Returns the value of the control record component.
      Returns:
      the value of the control record component
    • shift

      public boolean shift()
      Returns the value of the shift record component.
      Returns:
      the value of the shift record component
    • meta

      public boolean meta()
      Returns the value of the meta record component.
      Returns:
      the value of the meta record component