Package org.apache.harmony.awt.wtk

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


    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


                        WindowProcHandler.windowClassName, title, style,
                        rect.x, rect.y, rect.width, rect.height,
                        p.parentId, 0, 0, null);

                creationParams = null;
                NativeWindow win = getWindowById(hwnd);
                assert win != null;

                returnValue = win;
            }
        };
View Full Code Here

                    newState |= MAXIMIZED_HORIZ;
                }
            }

            if (newState != oldState) {
                NativeWindow window = behaviour.getNativeWindow();

                this.state = newState;
                if (window != null) {
                    window.setState(state);
                }
                postStateEvents(oldState);
            }
        } finally {
            toolkit.unlockAWT();
View Full Code Here

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

        case WindowsDefs.WM_NCACTIVATE:
            // prevent non-focusable window's non-client area from being
            // changed to indicate its active state
            long hwndOther = lParam;
            NativeWindow wnd = factory.getWindowById(hwnd);
            NativeWindow otherWnd = factory.getWindowById(hwndOther);
            if (wParam != 0 && !wnd.isFocusable() ||
                    wParam == 0 && wnd.isFocusable() &&
                    otherWnd != null && !otherWnd.isFocusable() ) {

                result[0] = 0;
                return true;
            }
            break;
View Full Code Here

    public void setMaximizedBounds(Rectangle bounds) {
        toolkit.lockAWT();
        try {
            maximizedBounds = bounds;
            NativeWindow win = getNativeWindow();
            if (win != null) {
                win.setMaximizedBounds(bounds);
            }
        } finally {
            toolkit.unlockAWT();
        }
    }
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

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.