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 operationtextArea- text area value used by the operationenumComboBox- enum combo box value used by the operationpaletteList- list to read or updateenumList- 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 Summary
ConstructorsConstructorDescriptionLiveEditComponents(JTextField textField, JTextArea textArea, JComboBox<Enum<?>> enumComboBox, JList<StylePalette> paletteList, JList<Enum<?>> enumList) Creates an instance of aLiveEditComponentsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.enumList()Returns the value of theenumListrecord component.final booleanIndicates whether some other object is "equal to" this one.voidforEach(Consumer<JComponent> consumer) Applies the supplied consumer to each live edit Swing component.final inthashCode()Returns a hash code value for this object.Returns the value of thepaletteListrecord component.voidsetVisible(boolean b) Sets the visible on the active canvas.textArea()Returns the value of thetextArearecord component.Returns the value of thetextFieldrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LiveEditComponents
public LiveEditComponents(JTextField textField, JTextArea textArea, @Deprecated JComboBox<Enum<?>> enumComboBox, JList<StylePalette> paletteList, JList<Enum<?>> enumList) Creates an instance of aLiveEditComponentsrecord class.- Parameters:
textField- the value for thetextFieldrecord componenttextArea- the value for thetextArearecord componentenumComboBox- the value for theenumComboBoxrecord componentpaletteList- the value for thepaletteListrecord componentenumList- the value for theenumListrecord component
-
-
Method Details
-
forEach
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
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
textField
Returns the value of thetextFieldrecord component.- Returns:
- the value of the
textFieldrecord component
-
textArea
Returns the value of thetextArearecord component.- Returns:
- the value of the
textArearecord component
-
enumComboBox
Deprecated.Returns the value of theenumComboBoxrecord component.- Returns:
- the value of the
enumComboBoxrecord component
-
paletteList
Returns the value of thepaletteListrecord component.- Returns:
- the value of the
paletteListrecord component
-
enumList
Returns the value of theenumListrecord component.- Returns:
- the value of the
enumListrecord component
-