Record Class LiveEditComponents

java.lang.Object
java.lang.Record
lu.kbra.modelizer_next.ui.canvas.datastruct.LiveEditComponents

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

    • LiveEditComponents

      public LiveEditComponents(JTextField textField, JTextArea textArea, @Deprecated JComboBox<Enum<?>> enumComboBox, JList<StylePalette> paletteList, JList<Enum<?>> enumList, CopyPastePopupMenu copyPastePopupMenu, FieldTagsPopupMenu fieldTagsPopupMenu)
      Creates an instance of a LiveEditComponents record class.
      Parameters:
      textField - the value for the textField record component
      textArea - the value for the textArea record component
      enumComboBox - the value for the enumComboBox record component
      paletteList - the value for the paletteList record component
      enumList - the value for the enumList record component
      copyPastePopupMenu - the value for the copyPastePopupMenu record component
      fieldTagsPopupMenu - the value for the fieldTagsPopupMenu record component
  • 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
    • copyPastePopupMenu

      public CopyPastePopupMenu copyPastePopupMenu()
      Returns the value of the copyPastePopupMenu record component.
      Returns:
      the value of the copyPastePopupMenu record component
    • fieldTagsPopupMenu

      public FieldTagsPopupMenu fieldTagsPopupMenu()
      Returns the value of the fieldTagsPopupMenu record component.
      Returns:
      the value of the fieldTagsPopupMenu record component