Package org.apache.harmony.awt.wtk

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


        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


        public Dimension getSize() {
            return new Dimension(w, h);
        }

        public long getWindowId() {
            NativeWindow win = getNativeWindow();
            return (win != null) ? win.getId() : 0;
        }
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

     */
    private void activateAncestor(Window wnd) {

        Window decorWnd = wnd.getFrameDialogOwner();
        if ((decorWnd != null) && (decorWnd != nativeFocusedWindow)) {
            NativeWindow nativeWnd = decorWnd.getNativeWindow();
            if (nativeWnd != null) {
                NativeWindow focusProxyWnd = decorWnd.getFocusProxy();

                if ((focusProxyWnd != null)) {
                    focusProxyWnd.setFocus(true);
                }
            }
        }
    }
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

    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

    }

    void removeNotify() {
        if (nativeWindow != null) {
            toolkit.removePopupNativeWindow(nativeWindow);
            NativeWindow temp = nativeWindow;
            nativeWindow = null;
            temp.dispose();
        }
    }
View Full Code Here

            if (nativeGrabOwner != null) {
                // awt.12F=Attempt to start nested mouse grab
                throw new RuntimeException(Messages.getString("awt.12F")); //$NON-NLS-1$
            }

            NativeWindow win = grabWindow.getNativeWindow();
            if (win == null) {
                // awt.130=Attempt to grab mouse in not displayable window
                throw new RuntimeException(Messages.getString("awt.130")); //$NON-NLS-1$
            }

            nativeGrabOwner = grabWindow;
            this.whenCanceled = whenCanceled;
            win.grabMouse();
        }
View Full Code Here

                return;
            }

            Window grabWindow = nativeGrabOwner;
            nativeGrabOwner = null;
            NativeWindow win = grabWindow.getNativeWindow();

            if (win != null) {
                win.ungrabMouse();
                if (whenCanceled != null) {
                    whenCanceled.run();
                    whenCanceled = null;
                }
            }
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.