Package react

Examples of react.IntValue


            }
        }
        final ThrobButton throbber = new ThrobButton("Throbber");

        final Label pressResult = new Label();
        final IntValue clickCount = new IntValue(0);
        final Box box = new Box();
        return new Group(AxisLayout.vertical().offEqualize()).add(
            new Group(AxisLayout.horizontal().gap(15), GREENBG).add(
                toggle3, AxisLayout.stretch(disabled)),
            new Group(AxisLayout.horizontal().gap(15), GREENBG).add(
                new LongPressButton("Long Pressable").onLongPress(new UnitSlot() {
                    @Override public void onEmit () { pressResult.text.update("Long pressed"); }
                }).onClick(new UnitSlot() {
                    @Override public void onEmit () { pressResult.text.update("Clicked"); }
                }), AxisLayout.stretch(pressResult)),
            new Group(AxisLayout.horizontal().gap(15), GREENBG).add(
                new Label("Image button"),
                new ImageButton(tile(squares, 0), tile(squares, 1)).onClick(new UnitSlot() {
                    @Override public void onEmit () { clickCount.increment(1); }
                }),
                new ValueLabel(clickCount)),
            new Group(AxisLayout.horizontal().gap(15), GREENBG).add(
                new Button("Fill Box").onClick(new UnitSlot() {
                    @Override public void onEmit () {
View Full Code Here


     * storage system. Note that each call to this method yields a new {@link IntValue} and those
     * values will not coordinate with one another, so the caller must be sure to only call this
     * method once for a given property and share that value properly.
     */
    public IntValue valueFor (final String key, int defval) {
        IntValue value = new IntValue(get(key, defval));
        value.connect(new Slot<Integer>() {
            @Override public void onEmit (Integer value) {
                set(key, value);
            }
        });
        return value;
View Full Code Here

TOP

Related Classes of react.IntValue

Copyright © 2018 www.massapicom. 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.