public class AWTUtilities extends Object
Modifier and Type | Method and Description |
---|---|
static Point |
calculateCenter(Component comp,
Point point)
Calculates the center of a Component.
|
static Rectangle |
calculateInnerArea(Container c,
Rectangle r)
Stores the position and size of
the inner painting area of the specified container
in
r and returns r . |
public static Rectangle calculateInnerArea(Container c, Rectangle r)
r
and returns r
.
The position and size specify the bounds of the container,
adjusted so as not to include the insets.
This method is useful for classes
that implement painting code.
Copied from SwingUtilities which uses JComponent instead of Container :-(c
- the Container in question; if null, this method returns nullr
- the Rectangle instance to be modified;
may be nullCopyright © 2002–2017 SoftSmithy. All rights reserved.