Record Class EditorGridSettingsRequest

java.lang.Object
java.lang.Record
dev.turboism.sdk.cubism.command.EditorGridSettingsRequest
All Implemented Interfaces:
EditorParameterizedRequest

public record EditorGridSettingsRequest(int spacingPixels, Color color) extends Record implements EditorParameterizedRequest
Configures the Editor grid using the observed spacing and color fields.
  • Constructor Details

    • EditorGridSettingsRequest

      public EditorGridSettingsRequest(int spacingPixels, Color color)
      Host-verified bounds: the native dialog slider spans [5, min(documentWidth, documentHeight)] and documents are clamped to 30000 pixels, so 30000 is the safe static upper bound. The host grid color is written as opaque RGB (the CColor(int,int,int) constructor); alpha must be 1 so no channel is silently dropped.
  • Method Details

    • command

      public EditorParameterizedCommand command()
      Specified by:
      command in interface EditorParameterizedRequest
      Returns:
      the parameterized command this request drives: the grid setting dialog
    • commandId

      public String commandId()
      Specified by:
      commandId in interface EditorParameterizedRequest
      Returns:
      the host command identifier of command(), for logging and dispatch
    • 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 '=='.
      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.
    • spacingPixels

      public int spacingPixels()
      Returns the value of the spacingPixels record component.
      Returns:
      the value of the spacingPixels record component
    • color

      public Color color()
      Returns the value of the color record component.
      Returns:
      the value of the color record component