Package org.apache.harmony.awt.wtk

Examples of org.apache.harmony.awt.wtk.NativeWindow


            cp.name = c.getName();
            //set location relative to the nearest heavy weight ancestor
            location = MouseDispatcher.convertPoint(c, 0, 0, parent);
        }
        if (parent != null) {
            NativeWindow nativeParent = parent.getNativeWindow();
            if (nativeParent == null) {
                if (cp.child) {
                    return null; //component's window will be created when its parent is created ???
                }
                parent.mapToDisplay(true); //TODO: verify it
                nativeParent = parent.getNativeWindow();
            }
            cp.parentId = nativeParent.getId();
        }
        cp.x = location.x;
        cp.y = location.y;
        cp.w = c.getWidth();
        cp.h = c.getHeight();
        recentNativeWindowComponent = c;
        NativeWindow win = getWindowFactory().createWindow(cp);
        nativeWindowCreated(win);
        if (c instanceof Window) {
            shutdownWatchdog.setWindowListEmpty(false);
        }
        return win;
View Full Code Here


        cp.undecorated = true;
        cp.iconified = false;
        cp.visible = false;
        cp.maximizedState = 0;
        cp.decorType = CreationParams.DECOR_TYPE_POPUP;
        NativeWindow nativeParent;
        if (popup.getParent() != null) {
            nativeParent = popup.getParent().getNativeWindow();
        } else {
            nativeParent = popup.getOwner().getNativeWindow();
        }
        assert nativeParent != null;
        cp.parentId = nativeParent.getId();
        cp.x = popup.getLocation().x;
        cp.y = popup.getLocation().y;
        cp.w = popup.getSize().width;
        cp.h = popup.getSize().height;
        recentNativeWindowComponent = popup;
        NativeWindow win = getWindowFactory().createWindow(cp);
        nativeWindowCreated(win);
        return win;
    }
View Full Code Here

        cp.parentId = owner.getNativeWindow().getId();
        cp.x = -10;
        cp.y = -10;
        cp.w = 1;
        cp.h = 1;
        NativeWindow win = getWindowFactory().createWindow(cp);
        windowFocusProxyMap.put(win, owner);
        return win;
    }
View Full Code Here

        private void setDefaultCursor() {
            Window topLevel = getWindowAncestor();
            if (topLevel == null) {
                return;
            }
            NativeWindow wnd = topLevel.getNativeWindow();
            if (wnd == null) {
                return;
            }
            Cursor.getDefaultCursor().getNativeCursor().setCursor(wnd.getId());
        }
View Full Code Here

            comp.setMouseExitedExpected(false);
        }
    }

    private PointerInfo findComponentUnderPointer() {
        NativeWindow nativeWindow = toolkit.getWindowFactory().
        getWindowFromPoint(lastScreenPos);

        if (nativeWindow != null) {
            Component comp = toolkit.getComponentById(nativeWindow.getId());

            if (comp != null) {
                Window window = comp.getWindowAncestor();
                Point pointerPos = convertPoint(null, lastScreenPos.x,
                                                lastScreenPos.y, window);
View Full Code Here

        return info;
    }

    Window findWindowAt(Point p) {
        NativeWindow nativeWindow =
            toolkit.getWindowFactory().getWindowFromPoint(p);

        Window window = null;
        if (nativeWindow != null) {
            Component comp = toolkit.getComponentById(nativeWindow.getId());

            if (comp != null) {
                window = comp.getWindowAncestor();
            }
        }
View Full Code Here

                    Point pointerPos = MouseDispatcher.convertPoint(null, absPointerPos,
                            topLevelWnd);
                    Component compUnderCursor = topLevelWnd.findComponentAt(pointerPos);
                    // if (compUnderCursor == this ||
                    // compUnderCursor.getCursorAncestor() == this) {
                    NativeWindow wnd = topLevelWnd.getNativeWindow();
                    if (compUnderCursor != null && wnd != null) {
                        compUnderCursor.getRealCursor().getNativeCursor()
                                .setCursor(wnd.getId());
                    }
                    // }
                }
            }
        }
View Full Code Here

        cp.y = 0;
        Dimension size = getWindowFactory().getWindowSizeById(ew.nativeWindowId);
        cp.w = size.width;
        cp.h = size.height;
        recentNativeWindowComponent = ew;
        NativeWindow win = getWindowFactory().createWindow(cp);
        nativeWindowCreated(win);
        shutdownWatchdog.setWindowListEmpty(false);
        return win;
    }
View Full Code Here

            cp.name = c.getName();
            //set location relative to the nearest heavy weight ancestor
            location = MouseDispatcher.convertPoint(c, 0, 0, parent);
        }
        if (parent != null) {
            NativeWindow nativeParent = parent.getNativeWindow();
            if (nativeParent == null) {
                if (cp.child) {
                    return null; //component's window will be created when its parent is created ???
                }
                parent.mapToDisplay(true); //TODO: verify it
                nativeParent = parent.getNativeWindow();
            }
            cp.parentId = nativeParent.getId();
        }
        cp.x = location.x;
        cp.y = location.y;
        cp.w = c.getWidth();
        cp.h = c.getHeight();
        recentNativeWindowComponent = c;
        NativeWindow win = getWindowFactory().createWindow(cp);
        nativeWindowCreated(win);
        if (c instanceof Window) {
            shutdownWatchdog.setWindowListEmpty(false);
        }
        return win;
View Full Code Here

        cp.undecorated = true;
        cp.iconified = false;
        cp.visible = false;
        cp.maximizedState = 0;
        cp.decorType = CreationParams.DECOR_TYPE_POPUP;
        NativeWindow nativeParent;
        if (popup.getParent() != null) {
            nativeParent = popup.getParent().getNativeWindow();
        } else {
            nativeParent = popup.getOwner().getNativeWindow();
        }
        assert nativeParent != null;
        cp.parentId = nativeParent.getId();
        cp.x = popup.getLocation().x;
        cp.y = popup.getLocation().y;
        cp.w = popup.getSize().width;
        cp.h = popup.getSize().height;
        recentNativeWindowComponent = popup;
        NativeWindow win = getWindowFactory().createWindow(cp);
        nativeWindowCreated(win);
        return win;
    }
View Full Code Here

TOP

Related Classes of org.apache.harmony.awt.wtk.NativeWindow

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.