Record Class ParameterChipLayout

java.lang.Object
java.lang.Record
org.cyclops.integrateddynamics.core.logicprogrammer.client.ParameterChipLayout
Record Components:
chips - The x, y and width of the chip of each shown parameter, which are the first ones.
more - The x, y and width of the chip of the parameters that are left out, or null if all are shown.
button - The x, y and width of the button to add a parameter.

public record ParameterChipLayout(List<int[]> chips, @Nullable int[] more, int[] button) extends Record
The places of the parameter chips in the expression panel: in rows, followed by the button to add a parameter.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ParameterChipLayout(List<int[]> chips, int[] more, int[] button)
    Creates an instance of a ParameterChipLayout record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int[]
    Returns the value of the button record component.
    List<int[]>
    Returns the value of the chips record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    layout(int[] chipWidths, IntUnaryOperator moreWidth, int buttonWidth, int x, int y, int width, int rowHeight, int rows)
     
    int[]
    Returns the value of the more record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ParameterChipLayout

      public ParameterChipLayout(List<int[]> chips, @Nullable int[] more, int[] button)
      Creates an instance of a ParameterChipLayout record class.
      Parameters:
      chips - the value for the chips record component
      more - the value for the more record component
      button - the value for the button record component
  • Method Details

    • layout

      public static ParameterChipLayout layout(int[] chipWidths, IntUnaryOperator moreWidth, int buttonWidth, int x, int y, int width, int rowHeight, int rows)
      Parameters:
      chipWidths - The width of the chip of each parameter.
      moreWidth - The width of the chip of the parameters that are left out, by how many there are.
      buttonWidth - The width of the button to add a parameter.
      x - The left of the rows.
      y - The top of the first row.
      width - The width of the rows.
      rowHeight - The distance between the tops of two rows.
      rows - The most rows.
      Returns:
      The layout.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • chips

      public List<int[]> chips()
      Returns the value of the chips record component.
      Returns:
      the value of the chips record component
    • more

      @Nullable public int[] more()
      Returns the value of the more record component.
      Returns:
      the value of the more record component
    • button

      public int[] button()
      Returns the value of the button record component.
      Returns:
      the value of the button record component