Package org.jnode.awt

Examples of org.jnode.awt.JNodeToolkit


        int xx = x + origin.x;
        int yy = y + origin.y;
        try {
            final Font font = getFont();
            if (font != null) {
                JNodeToolkit tk = ((JNodeToolkit) Toolkit.getDefaultToolkit());
                if (tk == null) {
                    System.err.println("Toolkit is null");
                    return;
                }
                if (tk.getFontManager() == null) {
                    System.err.println("FontManager is null");
                    return;
                }

                tk.getFontManager().drawText(surface, this.clip, null, str, font, xx, yy, getColor());
            }
        } catch (Throwable t) {
            t.printStackTrace();
        }
    }
View Full Code Here


     */
    public void drawString(String str, float x, float y) {
        // we should call "simpleGraphics.drawString(str, (int) x, (int) y);"
        // but since it doesn't handle transform, we have to implement ourself the rendering
        // TODO should we move that code to simpleGraphics implementation ?
        JNodeToolkit tk = (JNodeToolkit) Toolkit.getDefaultToolkit();
        FontManager fm = tk.getFontManager();
        fm.drawText(surface, getClip(), getTransform(), str, getFont(), (int) x, (int) y, getColor());
    }
View Full Code Here

    public void drawString(final SunGraphics2D g2d, String s, double x, double y) {
        Color co = g2d.getColor();
        Font font = g2d.getFont();
        if (font != null) {
            JNodeToolkit tk = ((JNodeToolkit) Toolkit.getDefaultToolkit());
            if (tk == null) {
                System.err.println("Toolkit is null");
                return;
            }
            if (tk.getFontManager() == null) {
                System.err.println("FontManager is null");
                return;
            }
            tk.getFontManager().drawText(new Surface() {
                public void copyArea(int x, int y, int width, int height, int dx, int dy) {
                    org.jnode.vm.Unsafe.debug("DTP copyArea()\n");
                    g2d.copyArea(x, y, width, height, dx, dy);
                }
View Full Code Here

    public void drawString(String text, int x, int y) {
        try {
            //System.out.println("drawText():" + text);
            final Font font = getFont();
            if (font != null) {
                JNodeToolkit tk = ((JNodeToolkit) Toolkit.getDefaultToolkit());
                if (tk == null) {
                    System.err.println("Toolkit is null");
                    return;
                }
                if (tk.getFontManager() == null) {
                    System.err.println("FontManager is null");
                    return;
                }

                tk.getFontManager().drawText(surface, this.clip, this.transform, text, font, x, y, getColor());
            }
        } catch (Throwable t) {
            log.error("error in drawString", t);
        }
    }
View Full Code Here

        try {

            //System.out.println("drawText():" + text);
            final Font font = getFont();
            if (font != null) {
                JNodeToolkit tk = ((JNodeToolkit) Toolkit.getDefaultToolkit());
                if (tk == null) {
                    System.err.println("Toolkit is null");
                    return;
                }
                if (tk.getFontManager() == null) {
                    System.err.println("FontManager is null");
                    return;
                }
                // fontmanager == org.jnode.awt.font.def.DefaultFontManager
                tk.getFontManager().drawText(surface, getClip(), this.transform, text, font, x, y, getColor());
            }
        } catch (Throwable t) {
            log.error("error in drawString", t);
        }
    }
View Full Code Here

        } else {
            throw new AWTError("Need to be loaded using a plugin classloader");
        }
        this.controlBar = new ControlBar(appsEP);

        final JNodeToolkit tk = JNodeToolkit.getJNodeToolkit();
        final JNodeAwtContext ctx = tk.getAwtContext();
        final JDesktopPane desktop = ctx.getDesktop();
        final Container awtRoot = ctx.getAwtRoot();

        controlBar.getApplicationBar().addApp("Halt", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
View Full Code Here

                    throw new AWTError("Need to be loaded using a plugin classloader");
                }
                Desktop.this.taskBar = new TaskBar(Desktop.this, appsEP);


                final JNodeToolkit tk = JNodeToolkit.getJNodeToolkit();
                desktopFrame = tk.getAwtContext();
                desktopPane = desktopFrame.getDesktop();
                final Container awtRoot = desktopFrame.getAwtRoot();

                if (desktopFrame instanceof JFrame) {
                    ((JFrame) desktopFrame).addWindowListener(new WindowAdapter() {
View Full Code Here

TOP

Related Classes of org.jnode.awt.JNodeToolkit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.