Package org.apache.harmony.awt.wtk

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


                    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


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

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

    public WinDropTarget(WinDTK dtk, DropTargetContext context) {
        this.dtk = dtk;
        this.context = context;

        ComponentInternals ci = ComponentInternals.getComponentInternals();
        NativeWindow w = ci.getNativeWindow(context.getComponent());
        hwnd = w.getId();
        dropTargetPtr = registerDropTarget();
    }
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

        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

        void startGrab(Window grabWindow, Runnable whenCanceled) {
            if (nativeGrabOwner != null) {
                throw new RuntimeException("Attempt to start nested mouse grab");
            }

            NativeWindow win = grabWindow.getNativeWindow();
            if (win == null) {
                throw new RuntimeException(
                        "Attempt to grab mouse in not displayable window");
            }

            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

                    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

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.