Examples of width()


Examples of pythagoras.f.IDimension.width()

                             valign.offset(m.fixHeight + m.gaps(_gap), height));
            for (Element<?> elem : elems) {
                if (!elem.isVisible()) continue;
                IDimension psize = preferredSize(elem, width, height); // will be cached
                Constraint c = constraint(elem);
                float ewidth = _offPolicy.computeSize(psize.width(), m.maxWidth, width);
                float eheight = c.computeSize(psize.height(), m.totalWeight, stretchHeight);
                setBounds(elem, left + halign.offset(ewidth, width), y, ewidth, eheight);
                y += (eheight + _gap);
            }
        }
View Full Code Here

Examples of pythagoras.f.IDimension.width()

                              halign.offset(m.fixWidth + m.gaps(_gap), width));
            for (Element<?> elem : elems) {
                if (!elem.isVisible()) continue;
                IDimension psize = preferredSize(elem, width, height); // will be cached
                Constraint c = constraint(elem);
                float ewidth = c.computeSize(psize.width(), m.totalWeight, stretchWidth);
                float eheight = _offPolicy.computeSize(psize.height(), m.maxHeight, height);
                setBounds(elem, x, top + valign.offset(eheight, height), ewidth, eheight);
                x += (ewidth + _gap);
            }
        }
View Full Code Here

Examples of pythagoras.f.IDimension.width()

        for (Element<?> elem : elems) {
            if (!elem.isVisible()) continue;
            Constraint c = constraint(elem);
            IDimension psize = c.psize(this, elem); // this should return a cached size
            IPoint pos = c.pos(width, height, psize);
            setBounds(elem, left + pos.x(), top + pos.y(), psize.width(), psize.height());
        }
    }

    protected static Constraint constraint (Element<?> elem) {
        assert elem.constraint() != null : "Elements in AbsoluteLayout must have a constraint.";
View Full Code Here

Examples of pythagoras.f.IDimension.width()

            float fwidth = size.width(), fheight = size.height();
            if (fwidth > 0 && fheight > 0) return size;
            // if either forced width or height is zero, use preferred size in that dimension
            IDimension psize = layout.preferredSize(elem, fwidth, fheight);
            if (fwidth > 0) return new Dimension(fwidth, psize.height());
            else if (fheight > 0) return new Dimension(psize.width(), fheight);
            else return psize;
        }

        public IPoint pos (float width, float height, IDimension prefSize) {
            Point position = this.position.resolve(0, 0, width, height, new Point());
View Full Code Here

Examples of pythagoras.f.IDimension.width()

        }

        Constraint c = slots.constraint(p);
        dim = c.adjust(dim, bounds);
        slots.setBounds(p,
            c.align(bounds.x, halign.offset(dim.width(), bounds.width)),
            c.align(bounds.y, valign.offset(dim.height(), bounds.height)), dim);
    }

    protected class Slots
    {
View Full Code Here

Examples of pythagoras.f.IDimension.width()

                IDimension dim = size(pos, hintX, 0);
                if (dim == null) {
                    continue;
                }
                nsSize.height += dim.height();
                nsSize.width = Math.max(nsSize.width, dim.width());
                if (wce > 0) {
                    nsSize.height += vgap;
                }
            }
View Full Code Here

Examples of pythagoras.f.IDimension.width()

            for (Position pos : WE) {
                IDimension dim = size(pos, 0, ehintY);
                if (dim == null) {
                    continue;
                }
                weSize.width += dim.width();
                weSize.height = Math.max(weSize.height, dim.height());
            }

            weSize.width += Math.max(wce - 1, 0) * hgap;
            float ehintX = Math.max(0, hintX - weSize.width);
View Full Code Here

Examples of pythagoras.f.IDimension.width()

            weSize.width += Math.max(wce - 1, 0) * hgap;
            float ehintX = Math.max(0, hintX - weSize.width);

            IDimension csize = size(Position.CENTER, ehintX, ehintY);
            if (csize != null) {
                weSize.width += csize.width();
                nsSize.height += csize.height();
            }
            return new Dimension(
                Math.max(weSize.width, nsSize.width),
                Math.max(weSize.height, nsSize.height));
View Full Code Here

Examples of pythagoras.f.IDimension.width()

                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);
            if (dim == null) {
View Full Code Here

Examples of pythagoras.f.IDimension.width()

            }
            Constraint c = constraint(p);
            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
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.