AwtFactory.javaAPI DocAndroid 1.5 API1741Wed May 06 22:41:54 BST


public class AwtFactory extends Object

Fields Summary
private static org.apache.harmony.awt.wtk.GraphicsFactory
Constructors Summary
Methods Summary
public static java.awt.Graphics2DgetAwtGraphics( c, p)
Use this method to get acces to AWT drawing primitives and to render into the surface area of a Android widget. Origin and clip of the returned graphics object are the same as in the corresponding Android widget.

c Canvas of the android widget to draw into
p The default drawing parameters such as font, stroke, foreground and background colors, etc.
The AWT Graphics object that makes all AWT drawing primitives available in the androind world.

        // AWT?? TODO: test it!
        if (null == gf) {
            Toolkit tk = Toolkit.getDefaultToolkit();
            gf = tk.getGraphicsFactory();
        return gf.getGraphics2D(c, p);