Package ca.corbett.extras.properties
Record Class PropertyFormFieldValueChangedEvent
java.lang.Object
java.lang.Record
ca.corbett.extras.properties.PropertyFormFieldValueChangedEvent
public record PropertyFormFieldValueChangedEvent(AbstractProperty property, ActionEvent sourceEvent, FormPanel formPanel, FormField formField)
extends Record
Used by PropertyFormFieldChangeListener to indicate that a change has been made in a FormField
that was created and is managed by some AbstractProperty instance. This class contains information
about which FormField on which AbstractProperty was modified, and on which FormPanel the change happened.
IMPORTANT NOTE: Objects of this class contain both the AbstractProperty that generated the FormField, and also the FormField itself. Keep in mind that these change events are fired while the FormPanel in question is visible and has not yet been OK'd by the user! That means, the property in question has not yet been informed of the changes made in the form field. That means, if you wish to read the current version of the FormField, you should interrogate the FormField and NOT the AbstractProperty! If you want to know what the value of the field was at the time that it was generated by the AbstractProperty, then query the AbstractProperty, and not the FormField.
- Since:
- swing-extras 2.3
- Author:
- scorbo2
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyFormFieldValueChangedEvent(AbstractProperty property, ActionEvent sourceEvent, FormPanel formPanel, FormField formField) Creates an instance of aPropertyFormFieldValueChangedEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theformFieldrecord component.Returns the value of theformPanelrecord component.final inthashCode()Returns a hash code value for this object.property()Returns the value of thepropertyrecord component.Returns the value of thesourceEventrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PropertyFormFieldValueChangedEvent
public PropertyFormFieldValueChangedEvent(AbstractProperty property, ActionEvent sourceEvent, FormPanel formPanel, FormField formField) Creates an instance of aPropertyFormFieldValueChangedEventrecord class.- Parameters:
property- the value for thepropertyrecord componentsourceEvent- the value for thesourceEventrecord componentformPanel- the value for theformPanelrecord componentformField- the value for theformFieldrecord component
-
-
Method Details
-
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). -
property
Returns the value of thepropertyrecord component.- Returns:
- the value of the
propertyrecord component
-
sourceEvent
Returns the value of thesourceEventrecord component.- Returns:
- the value of the
sourceEventrecord component
-
formPanel
Returns the value of theformPanelrecord component.- Returns:
- the value of the
formPanelrecord component
-
formField
Returns the value of theformFieldrecord component.- Returns:
- the value of the
formFieldrecord component
-