Package docking.widgets
Class PopupWindow
java.lang.Object
docking.widgets.PopupWindow
A generic window intended to be used as a temporary window to show information. This window is
designed to stay open as long as the user mouses over the window. Once the user mouses away,
the window will be closed.
-
Constructor Summary
ConstructorDescriptionPopupWindow
(Component sourceComponent, JComponent displayComponent) PopupWindow
(Window parentWindow, JComponent displayComponent) PopupWindow
(JComponent displayComponent) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addComponentListener
(ComponentListener listener) void
dispose()
void
hide()
static void
boolean
void
pack()
void
setCloseWindowDelay
(int delayInMillis) Sets the amount of time that will pass before the popup window is closed after the user moves away from the popup window and out of the neutral zonevoid
setPopupPlacer
(PopupWindowPlacer popupWindowPlacer) Sets the object that decides where to place the popup window.void
setWindowName
(String name) void
showOffsetPopup
(MouseEvent e, Rectangle keepVisibleArea, boolean forceShow) void
Shows this popup window unless popups are disabled as reported byDockingUtils.isTipWindowEnabled()
.void
Shows this popup window unless popups are disabled as reported byDockingUtils.isTipWindowEnabled()
.void
showPopup
(MouseEvent e, boolean forceShow) Shows this popup window unless popups are disabled as reported byDockingUtils.isTipWindowEnabled()
.
-
Constructor Details
-
PopupWindow
-
PopupWindow
-
PopupWindow
-
-
Method Details
-
hideAllWindows
public static void hideAllWindows() -
getDisplayComponent
-
setWindowName
-
addComponentListener
-
isShowing
public boolean isShowing() -
hide
public void hide() -
dispose
public void dispose() -
pack
public void pack() -
setCloseWindowDelay
public void setCloseWindowDelay(int delayInMillis) Sets the amount of time that will pass before the popup window is closed after the user moves away from the popup window and out of the neutral zone- Parameters:
delayInMillis
- the timer delay
-
setPopupPlacer
Sets the object that decides where to place the popup window.- Parameters:
popupWindowPlacer
- the placer
-
showOffsetPopup
-
showPopup
Shows this popup window unless popups are disabled as reported byDockingUtils.isTipWindowEnabled()
. IfforceShow
is true, then the popup will be shown regardless of the state returned byDockingUtils.isTipWindowEnabled()
.- Parameters:
e
- the eventforceShow
- true to show the popup even popups are disabled application-wide
-
showPopup
Shows this popup window unless popups are disabled as reported byDockingUtils.isTipWindowEnabled()
. IfforceShow
is true, then the popup will be shown regardless of the state returned byDockingUtils.isTipWindowEnabled()
.Note: the component passed in is the component to which the
location
the location belongs. In the example below, the component used to get the location is to the component passed to this method. This is because the location is relative to the parent's coordinate space. Thus, when calling this method, make sure to use the correct component.Point location = textField.getLocation(); // this is relative to the text field's parent Component parent = textField.getParent(); PopupWindow.showPopup(parent, location, true);
- Parameters:
component
- the component whose coordinate space the location belongslocation
- the location to show the popupforceShow
- true to show the popup even popups are disabled application-wide
-
showPopup
Shows this popup window unless popups are disabled as reported byDockingUtils.isTipWindowEnabled()
.- Parameters:
e
- the event
-