Class BasicPopupPanelUI.WindowTracker
java.lang.Object
org.pushingpixels.radiance.component.internal.ui.common.popup.BasicPopupPanelUI.WindowTracker
- All Implemented Interfaces:
AWTEventListener
,ComponentListener
,WindowListener
,EventListener
,PopupPanelManager.PopupListener
- Enclosing class:
BasicPopupPanelUI
protected static class BasicPopupPanelUI.WindowTracker
extends Object
implements PopupPanelManager.PopupListener, AWTEventListener, ComponentListener, WindowListener
This class is used to dismiss popup panels on the following events:
- Mouse click outside any shown popup panel.
- Closing, iconifying or deactivation of a top-level window.
- Any change in the component hierarchy of a top-level window.
Only one top-level window is tracked at any time. The assumption is that
the PopupPanelManager
only shows popup panels originating from
one top-level window.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Window
The currently tracked window.(package private) List
<PopupPanelManager.PopupInfo> Last selected path in thePopupPanelManager
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
(package private) void
grabWindow
(List<PopupPanelManager.PopupInfo> shownPath) Grabs the window of the first popup panel in the specified popup panel sequence.void
Fired when a popup panel has been hidden.void
Fired when a popup panel has been shown.(package private) void
Ungrabs the currently tracked window.void
void
void
void
void
void
void
-
Field Details
-
grabbedWindow
Window grabbedWindowThe currently tracked window. It is the window of the originating component of the first popup panel in the currently shown sequence ofPopupPanelManager
. -
lastPathSelected
List<PopupPanelManager.PopupInfo> lastPathSelectedLast selected path in thePopupPanelManager
.
-
-
Constructor Details
-
WindowTracker
public WindowTracker()Creates the new window tracker.
-
-
Method Details
-
grabWindow
Grabs the window of the first popup panel in the specified popup panel sequence.- Parameters:
shownPath
- Sequence of the currently shown popup panels.
-
ungrabWindow
void ungrabWindow()Ungrabs the currently tracked window. -
popupShown
Description copied from interface:PopupPanelManager.PopupListener
Fired when a popup panel has been shown.- Specified by:
popupShown
in interfacePopupPanelManager.PopupListener
- Parameters:
event
- Popup event.
-
popupHidden
Description copied from interface:PopupPanelManager.PopupListener
Fired when a popup panel has been hidden.- Specified by:
popupHidden
in interfacePopupPanelManager.PopupListener
- Parameters:
event
- Popup event.
-
eventDispatched
- Specified by:
eventDispatched
in interfaceAWTEventListener
-
componentResized
- Specified by:
componentResized
in interfaceComponentListener
-
componentMoved
- Specified by:
componentMoved
in interfaceComponentListener
-
componentShown
- Specified by:
componentShown
in interfaceComponentListener
-
componentHidden
- Specified by:
componentHidden
in interfaceComponentListener
-
windowClosing
- Specified by:
windowClosing
in interfaceWindowListener
-
windowClosed
- Specified by:
windowClosed
in interfaceWindowListener
-
windowIconified
- Specified by:
windowIconified
in interfaceWindowListener
-
windowDeactivated
- Specified by:
windowDeactivated
in interfaceWindowListener
-
windowOpened
- Specified by:
windowOpened
in interfaceWindowListener
-
windowDeiconified
- Specified by:
windowDeiconified
in interfaceWindowListener
-
windowActivated
- Specified by:
windowActivated
in interfaceWindowListener
-