Examples of width()


Examples of pythagoras.f.IDimension.width()

            dim = c.adjust(dim, bounds);
            float x = bounds.x;
            if (p == Position.WEST) {
                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);
        }
View Full Code Here

Examples of pythagoras.f.IDimension.width()

            if (p == Position.WEST) {
                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.width()

            for (; elemIdx < m.rowBreaks.get(row).intValue(); ++elemIdx) {
                Element<?> elem = elems.childAt(elemIdx);
                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;
View Full Code Here

Examples of pythagoras.f.IDimension.width()

                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.width()

                    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.width()

        Dimension rowSize = new Dimension();
        for (int ii = 0, ll = elems.childCount(); ii < ll; ++ii) {
            Element<?> elem = elems.childAt(ii);
            if (!elem.isVisible()) continue;
            IDimension esize = preferredSize(elem, width, 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);
View Full Code Here

Examples of pythagoras.f.IDimension.width()

            IDimension esize = preferredSize(elem, width, 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.width()

            Column ccfg = _columns[col];
            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);
View Full Code Here

Examples of pythagoras.f.IDimension.width()

                // 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) {
                    metrics.columnWidths[col] = Math.max(metrics.columnWidths[col], psize.width());
                }
            }
            ii += colspan(elem);
        }
View Full Code Here

Examples of pythagoras.f.IDimension.width()

            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);
        }

        return metrics;
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.