com.alee.managers.popup
Class PopupManager

java.lang.Object
  extended by com.alee.managers.popup.PopupManager

public final class PopupManager
extends java.lang.Object

This manager allows you to add your own popups within the window/applet root pane bounds.

Author:
Mikle Garin
See Also:
PopupLayer, WebPopup, WebButtonPopup, WebNotificationPopup

Constructor Summary
PopupManager()
           
 
Method Summary
static Painter getDefaultPopupPainter()
          Returns default popup painter.
static PopupStyle getDefaultPopupStyle()
          Returns default popup style.
static PopupLayer getPopupLayer(java.awt.Component component)
          Returns cached popup layer for root pane containing specified component.
static PopupLayer getPopupLayer(javax.swing.JRootPane rootPane)
          Returns cached popup layer for the specified root pane.
static Painter getPopupPainter(PopupStyle style)
          Returns popup painter for the specified popup style.
static ShadeLayer getShadeLayer(javax.swing.JRootPane rootPane)
          Returns cached shade layer for the specified root pane.
static void hideAllPopups()
          Hides all visible popups on all cached popup layers.
static void hideAllPopups(javax.swing.JComponent component)
          Hides all visible popups for the root pane under the specified component.
static void hideAllPopups(javax.swing.JRootPane rootPane)
          Hides all visible popups for the specified root pane.
static void setDefaultPopupStyle(PopupStyle style)
          Sets default popup style.
static void showModalPopup(java.awt.Component component, WebPopup popup, boolean hfill, boolean vfill)
          Displays popup as modal for the root pane containing specified component.
static void showModalPopup(java.awt.Component component, WebPopup popup, boolean hfill, boolean vfill, boolean blockClose)
          Displays popup as modal for the root pane containing specified component.
static void showModalPopup(javax.swing.JRootPane rootPane, WebPopup popup, boolean hfill, boolean vfill)
          Displays popup as modal for the specified root pane.
static void showModalPopup(javax.swing.JRootPane rootPane, WebPopup popup, boolean hfill, boolean vfill, boolean blockClose)
          Displays popup as modal for the specified root pane.
static void showPopup(java.awt.Component component, WebPopup popup)
          Displays popup for the root pane containing specified component.
static void showPopup(java.awt.Component component, WebPopup popup, boolean transferFocus)
          Displays popup for the root pane containing specified component.
static void showPopup(javax.swing.JRootPane rootPane, WebPopup popup, boolean transferFocus)
          Displays popup for the specified root pane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopupManager

public PopupManager()
Method Detail

hideAllPopups

public static void hideAllPopups()
Hides all visible popups on all cached popup layers.


hideAllPopups

public static void hideAllPopups(javax.swing.JComponent component)
Hides all visible popups for the root pane under the specified component.

Parameters:
component - component to process

hideAllPopups

public static void hideAllPopups(javax.swing.JRootPane rootPane)
Hides all visible popups for the specified root pane.

Parameters:
rootPane - root pane to process

getDefaultPopupStyle

public static PopupStyle getDefaultPopupStyle()
Returns default popup style.

Returns:
default popup style

setDefaultPopupStyle

public static void setDefaultPopupStyle(PopupStyle style)
Sets default popup style.

Parameters:
style - default popup style

getDefaultPopupPainter

public static Painter getDefaultPopupPainter()
Returns default popup painter.

Returns:
default popup painter

getPopupPainter

public static Painter getPopupPainter(PopupStyle style)
Returns popup painter for the specified popup style.

Parameters:
style - popup style
Returns:
popup painter for the specified popup style

showPopup

public static void showPopup(java.awt.Component component,
                             WebPopup popup)
Displays popup for the root pane containing specified component.

Parameters:
component - component used to determine root pane for which modal popup will be displayed
popup - popup to display

showPopup

public static void showPopup(java.awt.Component component,
                             WebPopup popup,
                             boolean transferFocus)
Displays popup for the root pane containing specified component.

Parameters:
component - component used to determine root pane for which modal popup will be displayed
popup - popup to display
transferFocus - whether to transfer focus to content of the displayed popup or not

showPopup

public static void showPopup(javax.swing.JRootPane rootPane,
                             WebPopup popup,
                             boolean transferFocus)
Displays popup for the specified root pane.

Parameters:
rootPane - root pane used to display popup
popup - popup to display
transferFocus - whether to transfer focus to content of the displayed popup or not

getPopupLayer

public static PopupLayer getPopupLayer(java.awt.Component component)
Returns cached popup layer for root pane containing specified component.

Parameters:
component - component used to determine root pane for popup layer
Returns:
cached popup layer for root pane containing specified component

getPopupLayer

public static PopupLayer getPopupLayer(javax.swing.JRootPane rootPane)
Returns cached popup layer for the specified root pane.

Parameters:
rootPane - root pane for popup layer
Returns:
cached popup layer for the specified root pane

showModalPopup

public static void showModalPopup(java.awt.Component component,
                                  WebPopup popup,
                                  boolean hfill,
                                  boolean vfill)
Displays popup as modal for the root pane containing specified component.

Parameters:
component - component used to determine root pane for which modal popup will be displayed
popup - popup to display
hfill - whether popup should fill the whole available width or not
vfill - whether popup should fill the whole available height or not

showModalPopup

public static void showModalPopup(java.awt.Component component,
                                  WebPopup popup,
                                  boolean hfill,
                                  boolean vfill,
                                  boolean blockClose)
Displays popup as modal for the root pane containing specified component.

Parameters:
component - component used to determine root pane for which modal popup will be displayed
popup - popup to display
hfill - whether popup should fill the whole available width or not
vfill - whether popup should fill the whole available height or not

showModalPopup

public static void showModalPopup(javax.swing.JRootPane rootPane,
                                  WebPopup popup,
                                  boolean hfill,
                                  boolean vfill)
Displays popup as modal for the specified root pane.

Parameters:
rootPane - root pane used to display modal popup
popup - popup to display
hfill - whether popup should fill the whole available width or not
vfill - whether popup should fill the whole available height or not

showModalPopup

public static void showModalPopup(javax.swing.JRootPane rootPane,
                                  WebPopup popup,
                                  boolean hfill,
                                  boolean vfill,
                                  boolean blockClose)
Displays popup as modal for the specified root pane.

Parameters:
rootPane - root pane used to display modal popup
popup - popup to display
hfill - whether popup should fill the whole available width or not
vfill - whether popup should fill the whole available height or not

getShadeLayer

public static ShadeLayer getShadeLayer(javax.swing.JRootPane rootPane)
Returns cached shade layer for the specified root pane.

Parameters:
rootPane - root pane for the shade layer
Returns:
cached shade layer for the specified root pane