Package pythagoras.f

Examples of pythagoras.f.IPoint.y()


    /** Updates the position of the content to match the flicker. If force is set, then the
     * relevant values will be updated even if there was no change. */
    protected void update (boolean force) {
        IPoint pos = _flicker.position();
        boolean dx = hrange.set(pos.x()), dy = vrange.set(pos.y());
        if (dx || dy || force) {
            _clippable.setPosition(-pos.x(), -pos.y());

            // now check the child elements for visibility
            if (!force) updateVisibility();
View Full Code Here


     * relevant values will be updated even if there was no change. */
    protected void update (boolean force) {
        IPoint pos = _flicker.position();
        boolean dx = hrange.set(pos.x()), dy = vrange.set(pos.y());
        if (dx || dy || force) {
            _clippable.setPosition(-pos.x(), -pos.y());

            // now check the child elements for visibility
            if (!force) updateVisibility();

            firePositionChange();
View Full Code Here

        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

                    // set up the fingerprint
                    float fingerRadius = touch().hasTouch() ? 10 : 3;
                    IPoint fingerPos = pop.pointer == null ? tpos : pop.pointer;
                    Rectangle fingerBox = new Rectangle(
                        fingerPos.x() - fingerRadius, fingerPos.y() - fingerRadius,
                        fingerRadius * 2, fingerRadius * 2);

                    // try and place the menu so it isn't under the finger
                    if (!avoidPoint(pop.bounds, ibounds, fingerBox)) {
                        log.warning("Oh god, menu doesn't fit", "menu", pop.menu);
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.