Package com.totsp.gwittir.client.ui.table

Examples of com.totsp.gwittir.client.ui.table.BoundTable


                    return e;
                }
            });

        addresses = new BoundTable(BoundTable.HEADER_MASK +
                BoundTable.SORT_MASK + BoundTable.NO_SELECT_CELL_MASK +
                BoundTable.NO_SELECT_COL_MASK//+ BoundTable.MULTIROWSELECT_MASK
                 + BoundTable.INSERT_WIDGET_MASK, factory);
        addresses.setColumns(addressCols);

        addresses.setWidth("500px");
        p.add(addresses);
        p.add(this.newAddress);
        p.add(new Label("Phone Numbers: "));

        phoneCols[0] = new Field("type", "Type");
        phoneCols[1] = new Field("number", "Number");

        BoundWidgetTypeFactory phoneFactory = new BoundWidgetTypeFactory(true);
        phoneFactory.add(TypeLookup.class, TypeSelectorProvider.INSTANCE);

        this.phoneNumbers = new BoundTable(BoundTable.HEADER_MASK +
                BoundTable.SORT_MASK + BoundTable.NO_SELECT_CELL_MASK +
                BoundTable.NO_SELECT_COL_MASK, phoneFactory);
        phoneNumbers.setColumns(phoneCols);
        p.add(this.phoneNumbers);
        p.add(this.newPhone);
View Full Code Here


     * create a new contact and move on to EDIT.
     *
     */
    public void execute(BoundWidget model) {
        if (model instanceof BoundTable) {
            BoundTable contacts = (BoundTable) model;
            Contact c = (Contact) contacts.getSelected().get(0);
            FlowController.call(contacts, ContactsEntryPoint.EDIT, c);
        }

        if (model instanceof Button) {
            Contact c = new Contact();
View Full Code Here

                  .add( NotNullValidator.INSTANCE )
                  .add( NAME_VALIDATOR ),
                new PopupValidationFeedback(PopupValidationFeedback.BOTTOM));
        cols[1] = new Field("value", "Value", null,
                "The Value of the field");
        table = new BoundTable(BoundTable.HEADER_MASK +
               BoundTable.NO_SELECT_COL_MASK +
               BoundTable.NO_SELECT_ROW_MASK
               , factory, cols, this.model);
        table.setWidth("400px");
       
View Full Code Here

                "Somebody's email.");
        cols[5] = new Field("birthDate", "Birth Date", null, "Day of Birth");

        ChangeMarkedTypeFactory factory = new ChangeMarkedTypeFactory();

        final BoundTable t = new BoundTable(BoundTable.HEADER_MASK +
                BoundTable.SORT_MASK + BoundTable.ROW_HANDLE_MASK +
                BoundTable.NO_SELECT_COL_MASK + BoundTable.NO_SELECT_CELL_MASK +
                BoundTable.MULTIROWSELECT_MASK +
                BoundTable.MULTI_REQUIRES_SHIFT, factory, cols);
        ArrayList<MyClass> list = new ArrayList<MyClass>();
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());
        list.add(new MyClass());

        try {
            t.addKeyBinding(new SuggestedKeyBinding('N', true, false, false),
                new Task() {
                    public void run() {
                        MyClass newClass = new MyClass();
                        t.add(newClass);

                        List select = new ArrayList();
                        select.add(newClass);
                        t.setSelected(select);
                    }
                });
            t.addKeyBinding(new SuggestedKeyBinding(KeyBinding.DELETE, true,
                    false, false),
                new Task() {
                    public void run() {
                        List selected = t.getSelected();
                        List value = (List) t.getValue();
                        value.removeAll(selected);
                        t.setValue(value);
                    }
                });
        } catch (Exception e) {
            e.printStackTrace();
        }

        t.setValue(list);

        add(t);

        Button hide = new Button("Hide",
                new ClickListener() {
                    public void onClick(Widget sender) {
                        t.setVisible(!t.isVisible());
                        GWT.log(t.isAttached() + "", null);
                    }
                });
        add(hide);
        factory.setMarking(true);
View Full Code Here

TOP

Related Classes of com.totsp.gwittir.client.ui.table.BoundTable

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.