Examples of BoxPoint


Examples of tripleplay.ui.util.BoxPoint

            initChildren(new Label(label),
                new Group(AxisLayout.horizontal()).add(new Label("N:"), nx, ny),
                new Group(AxisLayout.horizontal()).add(new Label("O:"), ox, oy));
            UnitSlot update = new UnitSlot() {
                @Override public void onEmit () {
                    point.update(new BoxPoint(
                        nx.value.get(), ny.value.get(), ox.value.get(), oy.value.get()));
                }
            };
            nx.value.connect(update);
            ny.value.connect(update);
View Full Code Here

Examples of tripleplay.ui.util.BoxPoint

        return "UI: Menu";
    }

    @Override protected Group createIface () {
        final MenuHost menuHost = new MenuHost(iface, _root);
        BoxPoint popRight = new BoxPoint(1, 0, 2, 0);
        BoxPoint popUnder = new BoxPoint(0, 1, 0, 2);
        Button direction = new Button("Select a direction \u25BC").
            addStyles(MenuHost.TRIGGER_POINT.is(MenuHost.relative(popRight))).
            onClick(new Slot<Button>() {
                @Override public void onEmit (Button self) {
                    MenuHost.Pop pop = new MenuHost.Pop(self,
View Full Code Here

Examples of tripleplay.ui.util.BoxPoint

            // get the trigger point from the trigger
            TriggerPoint position = resolveStyle(pop.trigger, TRIGGER_POINT);

            // get the origin point from the menu
            BoxPoint origin = resolveStyle(pop.trigger, POPUP_ORIGIN);

            // get the desired position, may be relative to trigger or pointer
            Point tpos = position.getLocation(pop.trigger, pop.pointer);
            Point mpos = origin.resolve(0, 0, width, height, new Point());

            // figure out the best place to put the menu, in screen coordinates; starting with
            // the requested popup position
            Rectangle bounds = new Rectangle(tpos.x - mpos.x, tpos.y - mpos.y, width, height);
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.