Examples of height()


Examples of pythagoras.f.IDimension.height()

            dim = c.adjust(dim, bounds);
            float y = bounds.y;
            if (p == Position.NORTH) {
                bounds.y += dim.height() + vgap;
            } else {
                y += bounds.height - dim.height();
            }
            bounds.height -= dim.height() + vgap;
            setBounds(p, c.align(bounds.x, halign.offset(dim.width(), bounds.width)), y, dim);
        }
View Full Code Here

Examples of pythagoras.f.IDimension.height()

            if (p == Position.NORTH) {
                bounds.y += dim.height() + vgap;
            } else {
                y += bounds.height - dim.height();
            }
            bounds.height -= dim.height() + vgap;
            setBounds(p, c.align(bounds.x, halign.offset(dim.width(), bounds.width)), y, dim);
        }

        void layoutWe (Position p, Style.VAlign valign, Rectangle bounds) {
            IDimension dim = size(p, 0, bounds.height);
View Full Code Here

Examples of pythagoras.f.IDimension.height()

                bounds.x += dim.width() + hgap;
            } else {
                x += bounds.width - dim.width();
            }
            bounds.width -= dim.width() + hgap;
            setBounds(p, x, c.align(bounds.y, valign.offset(dim.height(), bounds.height)), dim);
        }

        void setBounds (Position p, float x, float y, IDimension dim) {
            BorderLayout.this.setBounds(get(p), x, y, dim.width(), dim.height());
        }
View Full Code Here

Examples of pythagoras.f.IDimension.height()

                if (!elem.isVisible()) continue;
                IDimension esize = preferredSize(elem, width, height);
                if (_valign == null) {
                    setBounds(elem, x, y, esize.width(), rowSize.height());
                } else {
                    setBounds(elem, x, y + _valign.offset(esize.height(), rowSize.height()),
                        esize.width(), esize.height());
                }
                x += esize.width() + _hgap;
            }
            y += _vgap + rowSize.height;
View Full Code Here

Examples of pythagoras.f.IDimension.height()

                IDimension esize = preferredSize(elem, width, height);
                if (_valign == null) {
                    setBounds(elem, x, y, esize.width(), rowSize.height());
                } else {
                    setBounds(elem, x, y + _valign.offset(esize.height(), rowSize.height()),
                        esize.width(), esize.height());
                }
                x += esize.width() + _hgap;
            }
            y += _vgap + rowSize.height;
        }
View Full Code Here

Examples of pythagoras.f.IDimension.height()

            if (rowSize.width > 0 && width > 0 && rowSize.width + _hgap + esize.width() > width) {
                m.addBreak(ii, rowSize);
                rowSize = new Dimension(esize);
            } else {
                rowSize.width += (rowSize.width > 0 ? _hgap : 0) + esize.width();
                rowSize.height = Math.max(esize.height(), rowSize.height);
            }
        }
        m.addBreak(elems.childCount(), rowSize);
        return m;
    }
View Full Code Here

Examples of pythagoras.f.IDimension.height()

            float rowHeight = m.rowHeights[row];
            if (colWidth > 0 && elem.isVisible()) {
                IDimension psize = preferredSize(elem, 0, 0); // will be cached, hints ignored
                float elemWidth = (colspan > 1 || ccfg._stretch) ? colWidth :
                    Math.min(psize.width(), colWidth);
                float elemHeight = _vstretch ? rowHeight : Math.min(psize.height(), rowHeight);
                setBounds(elem, x + ccfg._halign.offset(elemWidth, colWidth),
                          y + _rowVAlign.offset(elemHeight, rowHeight), elemWidth, elemHeight);
            }
            x += (colWidth + _colgap);
            if ((col += colspan) == columns) {
View Full Code Here

Examples of pythagoras.f.IDimension.height()

        int ii = 0;
        for (Element<?> elem : elems) {
            int col = ii % columns, row = ii / columns;
            if (elem.isVisible() && _columns[col]._weight == 0) {
                IDimension psize = preferredSize(elem, hintX, hintY);
                metrics.rowHeights[row] = Math.max(metrics.rowHeights[row], psize.height());

                // Elements which stretch across multiple columns shouldn't force their first column
                //  to have a large size. Ideally, this should somehow force the sum of the columns
                //  to be as wide as itself.
                if (colspan(elem) == 1) {
View Full Code Here

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

Examples of pythagoras.f.IDimension.height()

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