Package pythagoras.f

Examples of pythagoras.f.IDimension.height()


        for (Element<?> elem : elems) {
            int col = ii % columns, row = ii / columns;
            if (elem.isVisible() && _columns[col]._weight > 0) {
                // TODO: supply sane y hint?
                IDimension psize = preferredSize(elem, freeHintX, hintY);
                metrics.rowHeights[row] = Math.max(metrics.rowHeights[row], psize.height());
                metrics.columnWidths[col] = Math.max(metrics.columnWidths[col], psize.width());
            }
            ii += colspan(elem);
        }
View Full Code Here


     * 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

    /**
     * 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

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

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

                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

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.