Package org.apache.harmony.awt.wtk

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


        toolkit.lockAWT();
        try {
            oldState = focusableWindowState;
            focusableWindowState = state;
            // call cb here to make window natively non-focusable
            NativeWindow win = getNativeWindow();
            if (win != null) {
                win.setFocusable(state);
            }
            if (!state) {
                moveFocusToOwner();
            }
        } finally {
View Full Code Here


    }

    public void toBack() {
        toolkit.lockAWT();
        try {
            NativeWindow win = getNativeWindow();
            if (win != null) {
                win.toBack();
            }
            // TODO?: reset the focused Window(this or any of owners) to the
            // top-most Window in the VM
        } finally {
            toolkit.unlockAWT();
View Full Code Here

    void setResizable(boolean resizable) {
        if (this.resizable == resizable) {
            return;
        }
        this.resizable = resizable;
        NativeWindow win = getNativeWindow();
        if (win != null && !undecorated && !popup) {
            win.setResizable(resizable);
        }
    }
View Full Code Here

    void setTitle(String title) {
        String oldTitle = this.title;
        toolkit.lockAWT();
        try {
            this.title = (title == null) ? "" : title; //$NON-NLS-1$
            NativeWindow win = getNativeWindow();
            if (win != null) {
                win.setTitle(title);
            }
        } finally {
            toolkit.unlockAWT();
        }
        firePropertyChange("title", oldTitle, title); //$NON-NLS-1$
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

        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

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.