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

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


        base.getFlexCellFormatter().setColSpan(2, 0, 2);
        base.setWidget(3, 0, notes);
        base.getFlexCellFormatter().setColSpan(3, 0, 2);
        p.add(base);
        p.add(new Label("Addresses:"));
        addressCols[0] = new Field("type", "Type");
        addressCols[1] = new Field("address1", "Address");
        addressCols[2] = new Field("address2", "");
        addressCols[3] = new Field("city", "City");
        addressCols[4] = new Field("state", "State");
        addressCols[5] = new Field("zip", "Zip");

        factory.add(StateLookup.class,
            new BoundWidgetProvider() {
                public BoundWidget get() {
                    Label label = new Label();
                    label.setRenderer(new Renderer() {
                            public Object render(Object o) {
                                return (o == null) ? "" : ((StateLookup) o).code;
                            }
                        });

                    return label;
                }
            });

        factory.add(TypeLookup.class,
            new BoundWidgetProvider() {
                public BoundWidget get() {
                    TextBox label = new TextBox();
                    label.setRenderer(new Renderer() {
                            public Object render(Object o) {
                                return (o == null) ? "" : ((TypeLookup) o).name;
                            }
                        });

                    return label;
                }
            });
        factory.add(String.class, BoundWidgetTypeFactory.LABEL_PROVIDER);
        factory.add(Address.class,
            new BoundWidgetProvider() {
                public BoundWidget get() {
                    AddressEdit e = new AddressEdit();
                    e.setAction(new AddressEditAction());

                    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 +
View Full Code Here


    private boolean initted = false;
    private boolean loaded = false;

/** Creates a new instance of ContactBrowserAction */
    public ContactBrowserAction() {
        tableCols[0] = new Field("lastName", "Last Name");
        tableCols[1] = new Field("firstName", "First Name");
        tableCols[2] = new Field("notes", "Notes");
    }
View Full Code Here

  private final BoundTable table;
  public ClientStorageExample(){
    super(new BoundWidgetTypeFactory(), null);
   
    Field[] cols = new Field[2];
        cols[0] = new Field("name", "Name", null,
                "A name", null, new CompositeValidator()
                  .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);
View Full Code Here

 
  public GridFormExample(){
    super(new BoundWidgetTypeFactory(), null);
   
    final Field[] mcf = new Field[10];
        mcf[0] = new Field("someInteger", "An Integer", null,
                "This is an Integer Value", null, IntegerValidator.INSTANCE,
                new PopupValidationFeedback(PopupValidationFeedback.BOTTOM));
        mcf[1] = new Field("name", "Name", null,
                "A name value <br /> who cares?");
        mcf[2] = new Field("firstName", "First Name", null,
                "Somebody's first name.");
        mcf[3] = new Field("lastName", "Last Name", null,
                "Somebody's last name.");
        mcf[4] = new Field("emailAddress", "Email Address", null,
                "Somebody's email.");

        Converter doubleConverter = new Converter<Double, String>() {
                public String convert(Double original) {
                    return "" + original;
                }
            };

        mcf[6] = new Field("price", "Price", null, "This is an decimal Value",
                doubleConverter, DoubleValidator.INSTANCE,
                new PopupValidationFeedback(PopupValidationFeedback.BOTTOM));
        mcf[7] = new Field("homeTown", "Home Town", null,
                "Somebody's place of origin.");
        mcf[8] = new Field("zipCode", "Postal Code", null, "A USPS Postal Code");
        mcf[9] = new Field("birthDate", "Birth Date", null, "Day of Birth");

        final GridForm form = new GridForm(mcf, 3);
        form.setValue(new MyClass());

        GridForm form2 = new GridForm(mcf, 3);
View Full Code Here

public class TableExample extends BoundVerticalPanel<Object> {
 
  public TableExample(){
    super(new BoundWidgetTypeFactory(), null);
    Field[] cols = new Field[6];
        cols[0] = new Field("someInteger", "An Integer", null,
                "This is an Integer Value", null, IntegerValidator.INSTANCE,
                new PopupValidationFeedback(PopupValidationFeedback.BOTTOM));
        cols[1] = new Field("name", "Name", null,
                "A name value <br /> who cares?");
        cols[2] = new Field("firstName", "First Name", null,
                "Somebody's first name.");
        cols[3] = new Field("lastName", "Last Name", null,
                "Somebody's last name.");
        cols[4] = new Field("emailAddress", "Email Address", null,
                "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 +
View Full Code Here

TOP

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

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.