Package pivot.wtk

Examples of pivot.wtk.Dimensions


    public Dimensions getPreferredSize() {
        ImageView imageView = (ImageView)getComponent();
        Image image = imageView.getImage();

        return (image == null) ? new Dimensions(0, 0) : new Dimensions(image.getWidth(),
            image.getHeight());
    }
View Full Code Here


            graphics.setPaint(backgroundColor);
            graphics.fillRect(0, 0, width, height);
        }

        if (image != null) {
            Dimensions imageSize = image.getSize();

            int imageX, imageY;
            float scaleX, scaleY;

            if (horizontalAlignment == HorizontalAlignment.JUSTIFY) {
View Full Code Here

                preferredWidth += item.getPreferredWidth(-1);
                preferredHeight = Math.max(item.getPreferredHeight(-1), preferredHeight);
            }
        }

        return new Dimensions(preferredWidth, preferredHeight);
    }
View Full Code Here

        this.height = height;
    }

    public Dimensions getSize() {
        return new Dimensions(getWidth(), getHeight());
    }
View Full Code Here

            return image;
        }
    }

    public Dimensions getSize() {
        return new Dimensions(getWidth(), getHeight());
    }
View Full Code Here

            }
        }
    };

    public Dimensions getSize() {
        return new Dimensions(getWidth(), getHeight());
    }
View Full Code Here

    }

    protected ImageListenerList imageListeners = new ImageListenerList();

    public Dimensions getSize() {
        return new Dimensions(getWidth(), getHeight());
    }
View Full Code Here

        this.width = width;
        this.height = height;
    }

    public Dimensions getPreferredSize() {
        return new Dimensions(getPreferredWidth(-1), getPreferredHeight(-1));
    }
View Full Code Here

                Display display = menuButton.getDisplay();

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

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

                int x = buttonLocation.x;
                if (popupSize.width > width
                    && x + popupSize.width > displaySize.width) {
View Full Code Here

    public int getPreferredHeight(int width) {
        return thumbHeight;
    }

    public Dimensions getPreferredSize() {
        return new Dimensions(getPreferredWidth(-1), getPreferredHeight(-1));
    }
View Full Code Here

TOP

Related Classes of pivot.wtk.Dimensions

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.