Class WindowEvent

  • All Implemented Interfaces:
    Serializable

    public class WindowEvent
    extends BuilderEvent

    An event class used by the window builder framework to deliver event information related to windows.

    Events related to windows, e.g. window closing or iconifying, are also abstracted by the builder framework. This event class is used for this purpose. In addition to the event's source (usually the original library specific event object) a reference to the affected window object is provided. This reference is usually an object created by the platform specific window manager that implements the Window interface defined by the window builder framework.

    Version:
    $Id: WindowEvent.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    See Also:
    Serialized Form
    • Constructor Detail

      • WindowEvent

        public WindowEvent​(Object source,
                           Window sourceWindow,
                           WindowEvent.Type type)
        Creates an instance of WindowEvent and sets the properties.
        Parameters:
        source - the event's source
        sourceWindow - a reference to the affected window
        type - the event type
    • Method Detail

      • getSourceWindow

        public Object getSourceWindow()
        Returns the source window. This is the window that caused this event.
        Returns:
        the source window
      • getType

        public WindowEvent.Type getType()
        Returns the type of this event. The type can be used to find out which action was performed on the window when this event was triggered.
        Returns:
        the type of this event