net.infonode.gui
public class ComponentUtil extends Object
Method Summary | |
---|---|
static int | countComponents(Container c) |
static Component | findComponentUnderGlassPaneAt(Point p, Component top) |
static Component | findFirstComponentOfType(Component comp, Class c) |
static Color | getBackgroundColor(Component component) |
static String | getBorderLayoutOrientation(Direction d) |
static Component | getChildAt(Container container, Point p) |
static Component | getChildAtLine(Container container, Point p, boolean horizontal) |
static int | getComponentIndex(Component component) |
static void | getComponentTreePosition(Component c, ArrayList pos) |
static int | getPreferredMaxHeight(Component[] components)
Calculates preferred max height for the given components without checking
isVisible.
|
static int | getPreferredMaxWidth(Component[] components)
Calculates preferred max width for the given components without checking
isVisible.
|
static Component | getTopLevelAncestor(Component c) |
static Component | getVisibleChildAt(Container container, Point p) |
static int | getVisibleChildrenCount(Component c) |
static boolean | hasVisibleChildren(Component c) |
static boolean | isFocusable(Component c) |
static boolean | isOnlyVisibleComponent(Component c) |
static boolean | isOnlyVisibleComponents(Component[] c) |
static boolean | requestFocus(Component component)
Requests focus unless the component already has focus. |
static void | setAllOpaque(Container c, boolean opaque) |
static Component | smartRequestFocus(Component component)
Requests focus for a component. |
static void | validate(JComponent c) |
static void | validate(Component c) |
Parameters: components Components to check
Returns: max height
Parameters: components Components to check
Returns: max width
Parameters: component the component to request focus for
Returns: true if the component has focus or probably will get focus, otherwise false
Parameters: component the component to request focus for
Returns: the component which has focus or probably will obtain focus, null if no component will receive focus