public class WindowEvent extends Event
| Modifier and Type | Field and Description |
|---|---|
static EventType<WindowEvent> |
ANY
Common supertype for all window event types.
|
static EventType<WindowEvent> |
WINDOW_CLOSE_REQUEST
This event is delivered to a
window when there is an external request to close that window.
|
static EventType<WindowEvent> |
WINDOW_HIDDEN
This event occurs on window just after it is hidden.
|
static EventType<WindowEvent> |
WINDOW_HIDING
This event occurs on window just before it is hidden.
|
static EventType<WindowEvent> |
WINDOW_SHOWING
This event occurs on window just before it is shown.
|
static EventType<WindowEvent> |
WINDOW_SHOWN
This event occurs on window just after it is shown.
|
consumed, eventType, NULL_SOURCE_TARGET, targetsource| Constructor and Description |
|---|
WindowEvent(Window source,
EventType<? extends Event> eventType)
Construct a new
Event with the specified event source, target
and type. |
| Modifier and Type | Method and Description |
|---|---|
WindowEvent |
copyFor(Object newSource,
EventTarget newTarget)
Creates and returns a copy of this event with the specified event source
and target.
|
WindowEvent |
copyFor(Object newSource,
EventTarget newTarget,
EventType<WindowEvent> type)
Creates a copy of the given event with the given fields substituted.
|
EventType<WindowEvent> |
getEventType()
Gets the event type of this event.
|
String |
toString()
Returns a string representation of this
WindowEvent object. |
getSourcepublic static final EventType<WindowEvent> ANY
public static final EventType<WindowEvent> WINDOW_SHOWING
public static final EventType<WindowEvent> WINDOW_SHOWN
public static final EventType<WindowEvent> WINDOW_HIDING
public static final EventType<WindowEvent> WINDOW_HIDDEN
public static final EventType<WindowEvent> WINDOW_CLOSE_REQUEST
public WindowEvent(Window source, EventType<? extends Event> eventType)
Event with the specified event source, target
and type. If the source or target is set to null, it is replaced
by the NULL_SOURCE_TARGET value.source - the event source which sent the eventeventType - the event typepublic String toString()
WindowEvent object.toString in class EventObjectWindowEvent object.public WindowEvent copyFor(Object newSource, EventTarget newTarget)
Eventnull, it is
replaced by the NULL_SOURCE_TARGET value.public WindowEvent copyFor(Object newSource, EventTarget newTarget, EventType<WindowEvent> type)
source - the new source of the copied eventtarget - the new target of the copied eventeventType - the new eventTypepublic EventType<WindowEvent> getEventType()
EventEvent
class can have different event types. These event types further specify
what kind of event occurred.getEventType in class EventCopyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.