All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.GraphicsUtils
java.lang.Object
|
+----com.sun.java.swing.GraphicsUtils
- public class GraphicsUtils
- extends Object
- implements SwingConstants
-
GraphicsUtils()
-
-
computeStringWidth(FontMetrics, String)
-
-
layoutCompoundLabel(FontMetrics, String, Icon, int, int, int, int, Rectangle, Rectangle, Rectangle, int)
-
Compute and return the location of the icons origin, the
location of origin of the text baseline, and a possibly clipped
version of the compound labels string.
-
layoutMenuItem(FontMetrics, String, Icon, Icon, Icon, int, int, int, int, Rectangle, Rectangle, Rectangle, Rectangle, Rectangle, int, int)
-
Compute and return the location of the icons origin, the
location of origin of the text baseline, and a possibly clipped
version of the compound labels string.
-
paintComponent(Graphics, Component, Container, int, int, int, int)
-
Paint a component c on an abitrary graphics g in the
specified rectangle.
-
paintComponent(Graphics, Component, Container, Rectangle)
-
GraphicsUtils
public GraphicsUtils()
computeStringWidth
public static int computeStringWidth(FontMetrics fm,
String str)
layoutCompoundLabel
public static String layoutCompoundLabel(FontMetrics fm,
String text,
Icon icon,
int verticalAlignment,
int horizontalAlignment,
int verticalTextPosition,
int horizontalTextPosition,
Rectangle viewR,
Rectangle iconR,
Rectangle textR,
int textIconGap)
- Compute and return the location of the icons origin, the
location of origin of the text baseline, and a possibly clipped
version of the compound labels string. Locations are computed
relative to the viewR rectangle.
layoutMenuItem
public static String layoutMenuItem(FontMetrics fm,
String text,
Icon icon,
Icon checkIcon,
Icon arrowIcon,
int verticalAlignment,
int horizontalAlignment,
int verticalTextPosition,
int horizontalTextPosition,
Rectangle viewR,
Rectangle iconR,
Rectangle textR,
Rectangle checkIconR,
Rectangle arrowIconR,
int textIconGap,
int menuItemGap)
- Compute and return the location of the icons origin, the
location of origin of the text baseline, and a possibly clipped
version of the compound labels string. Locations are computed
relative to the viewR rectangle.
paintComponent
public static void paintComponent(Graphics g,
Component c,
Container p,
int x,
int y,
int w,
int h)
- Paint a component c on an abitrary graphics g in the
specified rectangle. The component is reparented to a private
container (whose parent becomes p) which prevents c.validate() and
and c.repaint() calls from propogating up the tree. The intermediate
container has no other effect.
paintComponent
public static void paintComponent(Graphics g,
Component c,
Container p,
Rectangle r)
All Packages Class Hierarchy This Package Previous Next Index