Examples of width()


Examples of pythagoras.f.IDimension.width()

     * this SizableWidget's {@link #preferredSize}. If that size is 0 in either dimension, a warning
     * is logged and null is returned.
     */
    protected Glyph prepareGlyph (Glyph glyph) {
        IDimension size = preferredSize.get();
        if (size.width() == 0 || size.height() == 0) {
            log.warning("SizableWidget cannot prepare a glyph with a 0 dimension", "size", size);
            return null;
        }

        glyph = glyph == null ? new Glyph(layer) : glyph;
View Full Code Here

Examples of pythagoras.f.IDimension.width()

    /**
     * Sizes this element to its preferred size, computed using the supplied hints.
     */
    public Root pack (float widthHint, float heightHint) {
        IDimension psize = preferredSize(widthHint, heightHint);
        setSize(psize.width(), psize.height());
        return this;
    }

    /**
     * Sizes this root element to the specified width and its preferred height.
View Full Code Here

Examples of pythagoras.f.IDimension.width()

    /**
     * Sizes this root element to the specified height and its preferred width.
     */
    public Root packToHeight (float height) {
        IDimension psize = preferredSize(0, height);
        setSize(psize.width(), height);
        return this;
    }

    /**
     * Sets the size of this root element.
View Full Code Here

Examples of pythagoras.f.IDimension.width()

                toPoint(event, drag);
                if (_hoverLimit != null) {
                    float lim = _hoverLimit;
                    IDimension size = _owner.size();
                    cancel = drag.x + lim < 0 || drag.y + lim < 0 ||
                            drag.x - lim >= size.width() || drag.y - lim >= size.height();
                }
                maxDistanceSq = Math.max(maxDistanceSq, press.distanceSq(drag));
                onTrack(press, cancel ? press : drag);
            }
        }
View Full Code Here

Examples of pythagoras.f.IRectangle.width()

            boolean underlined, float x, float y) {
            canvas.save();
            if (underlined) {
                IRectangle bounds = text.bounds();
                float sx = x + bounds.x() + 1, sy = y + bounds.y() + bounds.height() + 2;
                canvas.setFillColor(outlineColor).fillRect(sx-1, sy-1, bounds.width()+3, 3);
                canvas.setFillColor(textColor).fillRect(sx, sy, bounds.width(), 1);
            }
            canvas.setFillColor(outlineColor);
            canvas.fillText(text, x+0, y+0);
            canvas.fillText(text, x+0, y+1);
View Full Code Here

Examples of pythagoras.f.IRectangle.width()

            canvas.save();
            if (underlined) {
                IRectangle bounds = text.bounds();
                float sx = x + bounds.x() + 1, sy = y + bounds.y() + bounds.height() + 2;
                canvas.setFillColor(outlineColor).fillRect(sx-1, sy-1, bounds.width()+3, 3);
                canvas.setFillColor(textColor).fillRect(sx, sy, bounds.width(), 1);
            }
            canvas.setFillColor(outlineColor);
            canvas.fillText(text, x+0, y+0);
            canvas.fillText(text, x+0, y+1);
            canvas.fillText(text, x+0, y+2);
View Full Code Here

Examples of pythagoras.f.IRectangle.width()

            canvas.fillText(text, x+outlineWidth, y+outlineWidth);
            if (underlined) {
                IRectangle bounds = text.bounds();
                float sx = x + bounds.x() + outlineWidth;
                float sy = y + bounds.y() + bounds.height() + outlineWidth + 1;
                canvas.fillRect(sx, sy, bounds.width(), 1);
            }
            canvas.restore();
        }

        @Override public boolean equals (Object obj) {
View Full Code Here

Examples of pythagoras.f.IRectangle.width()

            float sx = (shadowX < 0) ? 0 : shadowX, sy = (shadowY < 0) ? 0 : shadowY;
            canvas.save();
            if (underlined) {
                IRectangle bounds = text.bounds();
                canvas.setFillColor(shadowColor).fillRect(
                    sx+bounds.x()+x, sy+bounds.y()+bounds.height()+1, bounds.width()+1, 1);
                canvas.setFillColor(textColor).fillRect(
                    tx+bounds.x()+x, ty+bounds.y()+bounds.height()+1, bounds.width()+1, 1);
            }
            canvas.setFillColor(shadowColor);
            canvas.fillText(text, x+sx, y+sy);
View Full Code Here

Examples of tripleplay.ui.util.Insets.width()

    protected Rectangle getNativeFieldBounds () {
        Insets insets = resolveStyle(Style.BACKGROUND).insets;
        Point screenCoords = Layer.Util.layerToScreen(layer, insets.left(), insets.top());
        return new Rectangle(screenCoords.x, screenCoords.y,
                             _size.width - insets.width(), _size.height - insets.height());
    }

    protected void updateMode (boolean nativeField) {
        if (!hasNative()) return;
        if (nativeField) {
View Full Code Here

Examples of tripleplay.ui.util.Insets.width()

     * direction to the specified height.
     */
    protected Dimension computeSize (float hintX, float hintY) {
        LayoutData ldata = _ldata = createLayoutData(hintX, hintY);
        Insets insets = ldata.bg.insets;
        Dimension size = ldata.computeSize(hintX - insets.width(), hintY - insets.height());
        return insets.addTo(size);
    }

    /**
     * Handles common element layout (background), then calls {@link LayoutData#layout} to do the
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.