Package org.apache.harmony.awt.wtk

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


        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

        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

    public void removeNotify() {
        if (nativeWindow == null) {
            return;
        }
        component.toolkit.removeNativeWindow(nativeWindow);
        NativeWindow temp = nativeWindow;
        nativeWindow = null;

        if (!(component instanceof Window)) {
            // dispose only if HW ancestor is not disposed already
            Component hwAncestor = component.getHWAncestor();
            if ((hwAncestor == null) || !hwAncestor.isDisplayable()) {
                return;
            }
        }
        temp.dispose();

    }
View Full Code Here

                  component.h, NativeWindow.BOUNDS_NOSIZE);

    }

    public void setZOrder(int newIndex, int oldIndex) {
        NativeWindow win = null;
        Container par = component.getParent();
        if (par != null) {
            int size = par.getComponentCount();
            for (int i = Math.min(newIndex - 1, size - 1);  i >= 0; i--) {
                Component comp = par.getComponent(i);
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

        public void setDefaultMinimumSize(Dimension size) {
        }

        public long getWindowId() {
            NativeWindow win = comp.getNativeWindow();
            return (win != null) ? win.getId() : 0;
        }
View Full Code Here

    }

    public void toFront() {
        toolkit.lockAWT();
        try {
            NativeWindow win = getNativeWindow();
            if (win != null) {
                win.toFront();
            }
        } finally {
            toolkit.unlockAWT();
        }
    }
View Full Code Here

            if (sm != null) {
                sm.checkPermission(AWTPermissionCollection.SET_WINDOW_ALWAYS_ON_TOP_PERMISSION);
            }
            wasAlwaysOnTop = this.alwaysOnTop;
            this.alwaysOnTop = alwaysOnTop;
            NativeWindow win = getNativeWindow();
            if (win != null) {
                win.setAlwaysOnTop(alwaysOnTop);
            }
        } finally {
            toolkit.unlockAWT();
        }
        firePropertyChange("alwaysOnTop", wasAlwaysOnTop, alwaysOnTop); //$NON-NLS-1$
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.