Package pivot.wtk

Examples of pivot.wtk.Point


                        if (image != null) {
                            imageView.setImage((Image)null);
                            content = new LocalManifest();
                            content.putImage(image);
                            offset = new Point(x - (imageView.getWidth() - image.getWidth()) / 2,
                                y - (imageView.getHeight() - image.getHeight()) / 2);
                        }

                        return (image != null);
                    }
View Full Code Here


                if (image != null) {
                    imageView.setImage((Image)null);
                    content = new LocalManifest();
                    content.putImage(image);
                    offset = new Point(x - (imageView.getWidth() - image.getWidth()) / 2,
                        y - (imageView.getHeight() - image.getHeight()) / 2);
                }

                return (image != null);
            }
View Full Code Here

            if (Mouse.getCapturer() == component) {
                Slider slider = (Slider)TerraSliderSkin.this.getComponent();
                int sliderWidth = slider.getWidth();
                int thumbWidth = thumb.getWidth();

                Point sliderCoordinates = thumb.mapPointToAncestor(slider, x, y);

                int minX = dragOffset.x;
                if (sliderCoordinates.x < minX) {
                    sliderCoordinates.x = minX;
                }
View Full Code Here

      @Override
      public boolean mouseDown(Component component, Mouse.Button button, int x, int y) {
          boolean consumed = super.mouseDown(component, button, x, y);

          if (button == Mouse.Button.LEFT) {
            dragOffset = new Point(x, y);
            Mouse.capture(component);
                repaintComponent();

                consumed = true;
          }
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.x = Math.min(Math.max(location.x, 0), display.getWidth() - 1);
            location.y = Math.min(Math.max(location.y, 0), display.getHeight() - 1);
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);
            } else {
                Bounds resizeHandleBounds = resizeHandle.getBounds();

                if (resizeHandleBounds.contains(x, y)) {
                    resizeOffset = new Point(getWidth() - x, getHeight() - y);
                    Mouse.capture(component);
                }
            }
        }
View Full Code Here

        public int getY() {
            return y;
        }

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

                    int height = getHeight();

                    Component content = listViewPopup.getContent();

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

                    Dimensions displaySize = display.getSize();
                    Dimensions popupSize = content.getPreferredSize();

                    int x = buttonLocation.x;
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 x = buttonLocation.x;
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.x = Math.min(Math.max(location.x, 0), display.getWidth() - 1);
            location.y = Math.min(Math.max(location.y, 0), display.getHeight() - 1);
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.