Package tripleplay.ui

Examples of tripleplay.ui.Group


    @Override protected String title () {
        return "Asteroids Demo";
    }

    @Override protected Group createIface () {
        return new Group(AxisLayout.vertical()) {
            @Override protected void layout () {
                super.layout();
                if (_world == null) {
                    _world = new AsteroidsWorld(layer, size().width(), size().height());
                    _world.attract();
View Full Code Here


                                            inset(5, 10)));
        _root.setSize(width(), height());

        _root.add(new Label("Triple Play Demos").addStyles(Style.FONT.is(DemoScreen.TITLE_FONT)));

        Group grid = new Group(new TableLayout(
                                   TableLayout.COL.alignRight(),
                                   TableLayout.COL.stretch(),
                                   TableLayout.COL.stretch(),
                                   TableLayout.COL.stretch()).gaps(10, 10));
        _root.add(grid);

        int shown = 0, toShow = (TripleDemo.mainArgs.length == 0) ? -1 :
            Integer.parseInt(TripleDemo.mainArgs[0]);

        for (int ii = 0; ii < _screens.length; ii++) {
            if (ii%3 == 0) grid.add(new Label(_rlabels[ii/3]));
            final DemoScreen screen = _screens[ii];
            if (screen == null) {
                grid.add(new Shim(1, 1));
            } else {
                grid.add(new Button(screen.name()).onClick(new UnitSlot() { public void onEmit () {
                    _stack.push(screen);
                    screen.back.clicked().connect(new UnitSlot() { public void onEmit () {
                        _stack.remove(screen);
                    }});
                }}));
View Full Code Here

TOP

Related Classes of tripleplay.ui.Group

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.