net.sf.jguiraffe.gui.builder.event
Class WindowEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.sf.jguiraffe.gui.builder.event.BuilderEvent
          extended by net.sf.jguiraffe.gui.builder.event.WindowEvent
All Implemented Interfaces:
java.io.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 180 2010-02-22 20:50:30Z oheger $
Author:
Oliver Heger
See Also:
Serialized Form

Nested Class Summary
static class WindowEvent.Type
          An enumeration for the different types of window events.
 
Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
WindowEvent(java.lang.Object source, Window sourceWindow, WindowEvent.Type type)
          Creates an instance of WindowEvent and sets the properties.
 
Method Summary
 java.lang.Object getSourceWindow()
          Returns the source window.
 WindowEvent.Type getType()
          Returns the type of this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WindowEvent

public WindowEvent(java.lang.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 java.lang.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


Copyright © 2010 The JGUIraffe Team. All Rights Reserved.