Package pivot.wtk.content

Examples of pivot.wtk.content.TableViewRowEditor


    public void startup(Display display, Dictionary<String, String> properties)
        throws Exception {
        bind();

        TableViewRowEditor tableViewRowEditor = new TableViewRowEditor();
        tableView.setRowEditor(tableViewRowEditor);

        // Date uses a Spinner with a CalendarDateSpinnerData model
        Spinner dateSpinner = new Spinner(new CalendarDateSpinnerData());
        dateSpinner.setSelectedItemKey("date");
        tableViewRowEditor.getCellEditors().put("date", dateSpinner);

        // Expense type uses a ListButton that presents the expense types
        ListButton typeListButton = new ListButton(new EnumList<ExpenseType>(ExpenseType.class));
        typeListButton.setSelectedItemKey("type");
        tableViewRowEditor.getCellEditors().put("type", typeListButton);

        // Amount uses a TextInput with strict currency validation
        TextInput amountTextInput = new TextInput();
        amountTextInput.setValidator(new CurrencyValidator());
        amountTextInput.getStyles().put("strictValidation", true);
        amountTextInput.setTextKey("amount");
        tableViewRowEditor.getCellEditors().put("amount", amountTextInput);

        window.open(display);
    }
View Full Code Here

TOP

Related Classes of pivot.wtk.content.TableViewRowEditor

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.