yu.ac.bg.etf.javaqx.qswing.events
Class WindowEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byyu.ac.bg.etf.javaqx.qswing.events.QSwingEvent
          extended byyu.ac.bg.etf.javaqx.qswing.events.ComponentEvent
              extended byyu.ac.bg.etf.javaqx.qswing.events.WindowEvent
All Implemented Interfaces:
java.io.Serializable

public class WindowEvent
extends ComponentEvent

Window Event.

NOTE: This class is not full compatible with java.awt.event.WindowEvent class!

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)
See Also:
Serialized Form

Field Summary
static int WINDOW_ACTIVATED
          The window activated id.
static int WINDOW_CLOSED
          The window closed id.
static int WINDOW_CLOSING
          The window closing id.
static int WINDOW_DEACTIVATED
          The window deactivated id.
static int WINDOW_GAINED_FOCUS
          The window focus gained id.
static int WINDOW_LOST_FOCUS
          The window focus lost id.
static int WINDOW_OPENED
          The window opened id.
static int WINDOW_STATE_CHANGED
          The window state changed id.
 
Fields inherited from class yu.ac.bg.etf.javaqx.qswing.events.ComponentEvent
COMPONENT_HIDDEN, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
 
Fields inherited from class yu.ac.bg.etf.javaqx.qswing.events.QSwingEvent
ACTION_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTEXT_MENU_EVENT_MASK, CUSTOM_CONTEXT_MENU_EVENT_MASK, FOCUS_EVENT_MASK, id, KEY_EVENT_MASK, LOCATION_TOOL_TIP_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, PAINT_VIEW_EVENT_MASK, WINDOW_EVENT_MASK
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
WindowEvent(JQWindow source, int id)
          Constructs new WindowEvent object.
WindowEvent(JQWindow source, int id, int oldState, int newState)
          Constructs new WindowEvent object.
 
Method Summary
 int getNewState()
          Returns new window state.
 int getOldState()
          Returns old window state.
 JQWindow getWindow()
          Returns the source window of the event.
 java.lang.String paramString()
          Returns string representation of the event.
protected  java.lang.String stateString(int state)
          Returns string representation of the window state.
 
Methods inherited from class yu.ac.bg.etf.javaqx.qswing.events.ComponentEvent
getComponent
 
Methods inherited from class yu.ac.bg.etf.javaqx.qswing.events.QSwingEvent
consume, getID, isConsumed, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WINDOW_OPENED

public static final int WINDOW_OPENED
The window opened id.

See Also:
Constant Field Values

WINDOW_CLOSING

public static final int WINDOW_CLOSING
The window closing id.

See Also:
Constant Field Values

WINDOW_CLOSED

public static final int WINDOW_CLOSED
The window closed id.

See Also:
Constant Field Values

WINDOW_ACTIVATED

public static final int WINDOW_ACTIVATED
The window activated id.

See Also:
Constant Field Values

WINDOW_DEACTIVATED

public static final int WINDOW_DEACTIVATED
The window deactivated id.

See Also:
Constant Field Values

WINDOW_GAINED_FOCUS

public static final int WINDOW_GAINED_FOCUS
The window focus gained id.

See Also:
Constant Field Values

WINDOW_LOST_FOCUS

public static final int WINDOW_LOST_FOCUS
The window focus lost id.

See Also:
Constant Field Values

WINDOW_STATE_CHANGED

public static final int WINDOW_STATE_CHANGED
The window state changed id.

See Also:
Constant Field Values
Constructor Detail

WindowEvent

public WindowEvent(JQWindow source,
                   int id,
                   int oldState,
                   int newState)
Constructs new WindowEvent object.

Parameters:
source - the source of the event
id - the event type
oldState - the old state of the window
newState - the new state of the window
Throws:
java.lang.IllegalArgumentException - if the source is null

WindowEvent

public WindowEvent(JQWindow source,
                   int id)
Constructs new WindowEvent object.

Parameters:
source - the source of the event
id - the event type
Throws:
java.lang.IllegalArgumentException - if the source is null
Method Detail

getWindow

public JQWindow getWindow()
Returns the source window of the event.

Returns:
the source window of the event

getOldState

public int getOldState()
Returns old window state.

Returns:
old window state

getNewState

public int getNewState()
Returns new window state.

Returns:
new window state

stateString

protected java.lang.String stateString(int state)
Returns string representation of the window state.

Parameters:
state - the window state
Returns:
string representation of the window state

paramString

public java.lang.String paramString()
Returns string representation of the event.

Overrides:
paramString in class ComponentEvent


Copyright © 2007 ETF and contributors. All Rights Reserved.