Package com.ponysdk.ui.server.list2.renderer.header

Examples of com.ponysdk.ui.server.list2.renderer.header.SortableHeaderCellRenderer


        // Register handler
        addHandler(SubmitFormEvent.TYPE, this);

        final Pager<Pony> pager = new Pager<Pony>(new DefaultPagerView());
        dataGrid = new DataGridActivity<Pony>(new DefaultSimpleListView());

        final DefaultActionSelectorView actionSelectorView = new DefaultActionSelectorView();
        final DefaultInfoSelectorView infoSelectorView = new DefaultInfoSelectorView();
        final CompositeSelectorView selectorView = new CompositeSelectorView(actionSelectorView, infoSelectorView);
        final Selector<Pony> selector = new Selector<Pony>(selectorView);
View Full Code Here


            public PHTML render(final int row, final Data value) {
                return new PHTML(value.v1);
            }
        });

        datagrid = new RefreshableDataGrid<String, Data>(new DefaultSimpleListView());
        datagrid.addDataGridColumnDescriptor(descriptor);
    }
View Full Code Here

        examplePanel.setWidget(scroll);

        // Register handler
        addHandler(SubmitFormEvent.TYPE, this);

        final Pager<Pony> pager = new Pager<Pony>(new DefaultPagerView());
        dataGrid = new DataGridActivity<Pony>(new DefaultSimpleListView());

        final DefaultActionSelectorView actionSelectorView = new DefaultActionSelectorView();
        final DefaultInfoSelectorView infoSelectorView = new DefaultInfoSelectorView();
        final CompositeSelectorView selectorView = new CompositeSelectorView(actionSelectorView, infoSelectorView);
View Full Code Here

                return new PLabel();
            }
        });

        final DataGridColumnDescriptor<Pony, String> nameColumnDescriptor = new DataGridColumnDescriptor<Pony, String>();
        final ComplexHeaderCellRenderer nameHeaderCellRender = new FilterableHeaderCellRenderer("Name", new StringTextBoxFormField(), "name");
        nameHeaderCellRender.addFilterListener(dataProvider);
        nameColumnDescriptor.setHeaderCellRenderer(nameHeaderCellRender);
        nameColumnDescriptor.setValueProvider(new BeanValueProvider<Pony, String>("name"));
        nameColumnDescriptor.setCellRenderer(new LabelCellRenderer<String>());
        nameColumnDescriptor.setSubCellRenderer(new LabelCellRenderer<String>());

        nameColumnDescriptor.setSubCellRenderer(new LabelCellRenderer<String>());

        final PListBox ageListBox = new PListBox(true);
        for (int i = 0; i < 30; i++)
            ageListBox.addItem(i + " year", i);

        final DataGridColumnDescriptor<Pony, String> ageColumnDescriptor = new DataGridColumnDescriptor<Pony, String>();
        ageColumnDescriptor.setValueProvider(new BeanValueProvider<Pony, String>("age"));
        final ComplexHeaderCellRenderer ageHeaderCellRender = new ComplexHeaderCellRenderer("Age", new ListBoxFormField<Integer>(ageListBox), "age");
        ageHeaderCellRender.addFilterListener(dataProvider);
        ageColumnDescriptor.setHeaderCellRenderer(ageHeaderCellRender);
        ageColumnDescriptor.setCellRenderer(new LabelCellRenderer<String>());
        ageColumnDescriptor.setSubCellRenderer(new LabelCellRenderer<String>());

        final DataGridColumnDescriptor<Pony, String> raceColumnDescriptor = new DataGridColumnDescriptor<Pony, String>();
        raceColumnDescriptor.setValueProvider(new BeanValueProvider<Pony, String>("race"));
        final ComplexHeaderCellRenderer raceHeaderCellRender = new ComplexHeaderCellRenderer("Race", new StringTextBoxFormField(), "race");
        raceHeaderCellRender.addFilterListener(dataProvider);
        raceColumnDescriptor.setHeaderCellRenderer(raceHeaderCellRender);
        raceColumnDescriptor.setCellRenderer(new LabelCellRenderer<String>());
        raceColumnDescriptor.setSubCellRenderer(new LabelCellRenderer<String>());

        dataGrid.addDataGridColumnDescriptor(selectColumnDescriptor);
View Full Code Here

                return new PLabel();
            }
        });

        final DataGridColumnDescriptor<Pony, String> nameColumnDescriptor = new DataGridColumnDescriptor<Pony, String>();
        final ComplexHeaderCellRenderer nameHeaderCellRender = new FilterableHeaderCellRenderer("Name", new StringTextBoxFormField(), "name");
        nameHeaderCellRender.addFilterListener(dataProvider);
        nameColumnDescriptor.setHeaderCellRenderer(nameHeaderCellRender);
        nameColumnDescriptor.setValueProvider(new BeanValueProvider<Pony, String>("name"));
        nameColumnDescriptor.setCellRenderer(new LabelCellRenderer<String>());
        nameColumnDescriptor.setSubCellRenderer(new LabelCellRenderer<String>());
View Full Code Here

        };
        selectColumnDescriptor.setCellRenderer(selectCellRenderer);
        selectColumnDescriptor.setSubCellRenderer(selectCellRenderer);

        final DataGridColumnDescriptor<Pony, Pony> descriptor = new DataGridColumnDescriptor<Pony, Pony>();
        descriptor.setHeaderCellRenderer(new HeaderCellRenderer() {

            @Override
            public IsPWidget render() {
                return new PLabel();
            }
View Full Code Here

        txn.begin(new EmptyTxnContext());
        PPusher.initialize();

        final RefreshableDataGridColumnDescriptor<Data, Data, PHTML> descriptor = new RefreshableDataGridColumnDescriptor<Data, Data, PHTML>();
        descriptor.setValueProvider(new IdentityValueProvider<Data>());
        descriptor.setHeaderCellRenderer(new HeaderCellRenderer() {

            @Override
            public IsPWidget render() {
                return new PLabel("The header");
            }
View Full Code Here

    protected void onPonyStock(final PonyStock data) {}

    protected RefreshableDataGridColumnDescriptor<PonyStock, PonyStock, PHTML> newCountDescriptor() {
        final RefreshableDataGridColumnDescriptor<PonyStock, PonyStock, PHTML> countDescriptor = new RefreshableDataGridColumnDescriptor<PonyStock, PonyStock, PHTML>();
        countDescriptor.setHeaderCellRenderer(new StringHeaderCellRenderer("Stock"));
        countDescriptor.setValueProvider(new IdentityValueProvider<PonyStock>());
        countDescriptor.setCellRenderer(new RefreshableCellRenderer<PonyStock, PHTML>() {

            @Override
            public PHTML render(final int row, final PonyStock value) {
View Full Code Here

        return countDescriptor;
    }

    protected RefreshableDataGridColumnDescriptor<PonyStock, PonyStock, PHTML> newPriceDescriptor() {
        final RefreshableDataGridColumnDescriptor<PonyStock, PonyStock, PHTML> priceDescriptor = new RefreshableDataGridColumnDescriptor<PonyStock, PonyStock, PHTML>();
        priceDescriptor.setHeaderCellRenderer(new StringHeaderCellRenderer("Price"));
        priceDescriptor.setValueProvider(new IdentityValueProvider<PonyStock>());
        priceDescriptor.setCellRenderer(new RefreshableCellRenderer<PonyStock, PHTML>() {

            @Override
            public PHTML render(final int row, final PonyStock value) {
View Full Code Here

        return priceDescriptor;
    }

    protected RefreshableDataGridColumnDescriptor<PonyStock, PonyStock, PHTML> newRaceDescriptor() {
        final RefreshableDataGridColumnDescriptor<PonyStock, PonyStock, PHTML> raceDescriptor = new RefreshableDataGridColumnDescriptor<PonyStock, PonyStock, PHTML>();
        raceDescriptor.setHeaderCellRenderer(new StringHeaderCellRenderer("Race"));
        raceDescriptor.setValueProvider(new IdentityValueProvider<PonyStock>());
        raceDescriptor.setCellRenderer(new RefreshableCellRenderer<PonyStock, PHTML>() {

            @Override
            public PHTML render(final int row, final PonyStock value) {
View Full Code Here

TOP

Related Classes of com.ponysdk.ui.server.list2.renderer.header.SortableHeaderCellRenderer

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.