Record Class LiveEditComponents

java.lang.Object
java.lang.Record
lu.kbra.modelizer_next.ui.canvas.datastruct.LiveEditComponents
Record Components:
textField - text field value used by the operation
textArea - text area value used by the operation
enumComboBox - enum combo box value used by the operation
paletteList - list to read or update
enumList - list to read or update

public record LiveEditComponents(JTextField textField, JTextArea textArea, JComboBox<Enum<?>> enumComboBox, JList<StylePalette> paletteList, JList<Enum<?>> enumList) extends Record
Swing components used during inline editing on the canvas.
  • Constructor Details

  • Method Details

    • forEach

      public void forEach(Consumer<JComponent> consumer)
      Applies the supplied consumer to each live edit Swing component.
      Parameters:
      consumer - consumer value used by the operation
    • setVisible

      public void setVisible(boolean b)
      Sets the visible on the active canvas.
      Parameters:
      b - whether b is enabled
    • 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.
    • textField

      public JTextField textField()
      Returns the value of the textField record component.
      Returns:
      the value of the textField record component
    • textArea

      public JTextArea textArea()
      Returns the value of the textArea record component.
      Returns:
      the value of the textArea record component
    • enumComboBox

      @Deprecated public JComboBox<Enum<?>> enumComboBox()
      Deprecated.
      Returns the value of the enumComboBox record component.
      Returns:
      the value of the enumComboBox record component
    • paletteList

      public JList<StylePalette> paletteList()
      Returns the value of the paletteList record component.
      Returns:
      the value of the paletteList record component
    • enumList

      public JList<Enum<?>> enumList()
      Returns the value of the enumList record component.
      Returns:
      the value of the enumList record component