Package pivot.wtk

Examples of pivot.wtk.Point


        if (menu != null
            && !menuPopup.isOpen()) {
            // Determine the popup's location and preferred size, relative
            // to the menu item
            Display display = menuItem.getDisplay();
            Point menuItemLocation = menuItem.mapPointToAncestor(display, getWidth(), 0);

            // TODO Ensure that the popup remains within the bounds of the display

            menuPopup.setLocation(menuItemLocation.x, menuItemLocation.y);
            menuPopup.open(menuItem);
View Full Code Here


        if (Mouse.getCapturer() == component) {
            Window window = (Window)getComponent();
            Display display = window.getDisplay();

            Point location = window.mapPointToAncestor(display, x, y);

            // Pretend that the mouse can't move off screen (off the display)
            location = new Point(Math.min(Math.max(location.x, 0), display.getWidth() - 1),
                Math.min(Math.max(location.y, 0), display.getHeight() - 1));

            if (dragOffset != null) {
                // Move the window
                window.setLocation(location.x - dragOffset.x, location.y - dragOffset.y);
View Full Code Here

        if (button == Mouse.Button.LEFT
            && !maximized) {
            Bounds titleBarBounds = titleBarFlowPane.getBounds();

            if (titleBarBounds.contains(x, y)) {
                dragOffset = new Point(x, y);
                Mouse.capture(component);
            }
        }

        return consumed;
View Full Code Here

                int height = getHeight();

                Component content = calendarPopup.getContent();

                // Ensure that the popup remains within the bounds of the display
                Point buttonLocation = calendarButton.mapPointToAncestor(display, 0, 0);

                Dimensions displaySize = display.getSize();
                Dimensions popupSize = content.getPreferredSize();
                int popupHeight = popupSize.height;
View Full Code Here

        public int getY() {
            return y;
        }

        public Point getLocation() {
            return new Point(x, y);
        }
View Full Code Here

TOP

Related Classes of pivot.wtk.Point

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.