Package org.jdesktop.swingx
Class SwingXUtilities
- java.lang.Object
-
- org.jdesktop.swingx.SwingXUtilities
-
public final class SwingXUtilities extends java.lang.Object
A collection of utility methods for Swing(X) classes.-
PENDING JW: think about location of this class and/or its methods, Options:
- move this class to the swingx utils package which already has a bunch of xxUtils
- move methods between xxUtils classes as appropriate (one window/comp related util)
- keep here in swingx (consistent with swingutilities in core)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
isDescendingFrom(java.awt.Component focusOwner, java.awt.Component parent)
Returns whether the component is part of the parent's container hierarchy.void
setComponentTreeEnabled(java.awt.Component c, boolean enabled)
Enables or disables of the components in the tree starting withc
.void
setComponentTreeLocale(java.awt.Component c, java.util.Locale locale)
Sets the locale for an entire component hierarchy to the specified locale.static void
updateAllComponentTreeUIs()
Updates the componentTreeUI of all toplevel windows of the current application.static void
updateAllComponentTreeUIs(java.awt.Window window)
Updates the componentTreeUI of the given window and all its owned windows, recursively.
-
-
-
Method Detail
-
setComponentTreeEnabled
public void setComponentTreeEnabled(java.awt.Component c, boolean enabled)
Enables or disables of the components in the tree starting withc
.- Parameters:
c
- the starting componentenabled
-true
if the component is to enabled;false
otherwise
-
setComponentTreeLocale
public void setComponentTreeLocale(java.awt.Component c, java.util.Locale locale)
Sets the locale for an entire component hierarchy to the specified locale.- Parameters:
c
- the starting componentlocale
- the locale to set
-
updateAllComponentTreeUIs
public static void updateAllComponentTreeUIs()
Updates the componentTreeUI of all toplevel windows of the current application.
-
updateAllComponentTreeUIs
public static void updateAllComponentTreeUIs(java.awt.Window window)
Updates the componentTreeUI of the given window and all its owned windows, recursively.- Parameters:
window
- the window to update
-
isDescendingFrom
public static boolean isDescendingFrom(java.awt.Component focusOwner, java.awt.Component parent)
Returns whether the component is part of the parent's container hierarchy. If a parent in the chain is of type JPopupMenu, the parent chain of its invoker is walked.- Parameters:
focusOwner
-parent
-- Returns:
- true if the component is contained under the parent's hierachy, coping with JPopupMenus.
-
-