Interface FormControllerFormListener

  • All Superinterfaces:
    EventListener

    public interface FormControllerFormListener
    extends EventListener

    An event listener for processing events of type FormControllerFormEvent.

    Event listeners of this type can be registered at a FormController. They are notified once when the form associated with the controller is closed. The FormControllerFormEvent object passed to the listener method contains information whether the form was committed or canceled.

    The idea behind this event listener type is that listeners registered at the FormController can do some processing of the data entered into the form when it is closed - for instance, if the form was committed, the data can be saved somewhere. So their purpose is the same as for the command objects that can be set for a FormController: one for the OK command and one for the Cancel command. The difference is that event listeners are directly executed in the event dispatch thread when the form is closed while commands are added to the command queue and are then executed by a different thread. Therefore event listeners are appropriate for short-running operations, e.g. updating the UI or copying data into a domain object. More sophisticated operations should be performed by commands in a background thread.

    Version:
    $Id: FormControllerFormListener.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Method Detail

      • formClosed

        void formClosed​(FormControllerFormEvent event)
        Notifies this listener that the form associated with the monitored FormController was closed. All information available is provided by the passed in event object.
        Parameters:
        event - the event object