Search in sources :

Example 1 with Grid

use of com.google.gwt.user.client.ui.Grid in project zxing by zxing.

the class TextGenerator method getWidget.

@Override
public Grid getWidget() {
    if (table != null) {
        // early termination if the table has already been constructed
        return table;
    }
    table = new Grid(1, 2);
    table.getColumnFormatter().addStyleName(0, "firstColumn");
    table.setText(0, 0, "Text content");
    table.setWidget(0, 1, text);
    return table;
}
Also used : Grid(com.google.gwt.user.client.ui.Grid)

Example 2 with Grid

use of com.google.gwt.user.client.ui.Grid in project zxing by zxing.

the class UrlGenerator method getWidget.

@Override
public Grid getWidget() {
    if (table != null) {
        // early termination if the table has already been constructed
        return table;
    }
    table = new Grid(1, 2);
    table.getColumnFormatter().addStyleName(0, "firstColumn");
    url.setText("http://");
    table.setText(0, 0, "URL");
    table.setWidget(0, 1, url);
    return table;
}
Also used : Grid(com.google.gwt.user.client.ui.Grid)

Example 3 with Grid

use of com.google.gwt.user.client.ui.Grid in project zxing by zxing.

the class CalendarEventGenerator method getWidget.

@Override
public Grid getWidget() {
    if (table != null) {
        return table;
    }
    datePicker1.setValue(new Date());
    datePicker2.setValue(new Date());
    table = new Grid(10, 2);
    table.setText(0, 0, "All day event");
    table.setWidget(0, 1, fullDay);
    table.setText(1, 0, "Event title");
    table.setWidget(1, 1, eventName);
    table.setText(2, 0, "Start date");
    table.setWidget(2, 1, datePicker1);
    table.setText(3, 0, "Time");
    table.setWidget(3, 1, timePicker1);
    table.setText(4, 0, "End date");
    table.setWidget(4, 1, datePicker2);
    table.setText(5, 0, "Time");
    table.setWidget(5, 1, timePicker2);
    table.setText(6, 0, "Time zone");
    table.setWidget(6, 1, timeZones);
    table.setText(7, 0, "Daylight savings");
    table.setWidget(7, 1, summerTime);
    table.setText(8, 0, "Location");
    table.setWidget(8, 1, location);
    table.setText(9, 0, "Description");
    table.setWidget(9, 1, description);
    table.getRowFormatter().getElement(3).setId(FULL_DAY_ONLY_IDS[0]);
    table.getRowFormatter().getElement(5).setId(FULL_DAY_ONLY_IDS[1]);
    table.getRowFormatter().getElement(6).setId(FULL_DAY_ONLY_IDS[2]);
    table.getRowFormatter().getElement(7).setId(FULL_DAY_ONLY_IDS[3]);
    fullDay.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            CheckBox cb = (CheckBox) event.getSource();
            for (String s : FULL_DAY_ONLY_IDS) {
                Element element = DOM.getElementById(s);
                String style = cb.getValue() ? "none" : "";
                element.getStyle().setProperty("display", style);
            }
        }
    });
    return table;
}
Also used : ClickHandler(com.google.gwt.event.dom.client.ClickHandler) CheckBox(com.google.gwt.user.client.ui.CheckBox) Grid(com.google.gwt.user.client.ui.Grid) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) Element(com.google.gwt.dom.client.Element) Date(java.util.Date)

Example 4 with Grid

use of com.google.gwt.user.client.ui.Grid in project zxing by zxing.

the class ContactInfoGenerator method getWidget.

@Override
public Grid getWidget() {
    if (table != null) {
        // early termination if the table has already been constructed
        return table;
    }
    table = new Grid(10, 2);
    table.setText(0, 0, "Name");
    table.setWidget(0, 1, name);
    table.setText(1, 0, "Company");
    table.setWidget(1, 1, company);
    table.setText(2, 0, "Title");
    table.setWidget(2, 1, title);
    table.setText(3, 0, "Phone number");
    table.setWidget(3, 1, tel);
    table.setText(4, 0, "Email");
    table.setWidget(4, 1, email);
    table.setText(5, 0, "Address");
    table.setWidget(5, 1, address);
    table.setText(6, 0, "Address 2");
    table.setWidget(6, 1, address2);
    table.setText(7, 0, "Website");
    table.setWidget(7, 1, url);
    table.setText(8, 0, "Memo");
    table.setWidget(8, 1, memo);
    table.setText(9, 0, "Encoding");
    table.setWidget(9, 1, encoding);
    name.addStyleName(StylesDefs.INPUT_FIELD_REQUIRED);
    return table;
}
Also used : Grid(com.google.gwt.user.client.ui.Grid)

Example 5 with Grid

use of com.google.gwt.user.client.ui.Grid in project zxing by zxing.

the class EmailGenerator method getWidget.

@Override
public Grid getWidget() {
    if (table != null) {
        return table;
    }
    table = new Grid(1, 2);
    table.setText(0, 0, "Address");
    table.setWidget(0, 1, email);
    return table;
}
Also used : Grid(com.google.gwt.user.client.ui.Grid)

Aggregations

Grid (com.google.gwt.user.client.ui.Grid)38 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)10 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)9 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)9 Label (com.google.gwt.user.client.ui.Label)7 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)7 Button (com.google.gwt.user.client.ui.Button)6 CellFormatter (com.google.gwt.user.client.ui.HTMLTable.CellFormatter)6 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)6 ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)5 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)5 ColumnFormatter (com.google.gwt.user.client.ui.HTMLTable.ColumnFormatter)4 Image (com.google.gwt.user.client.ui.Image)4 CheckBox (com.google.gwt.user.client.ui.CheckBox)3 TextBox (com.google.gwt.user.client.ui.TextBox)3 GerritUiExtensionPoint (com.google.gerrit.client.GerritUiExtensionPoint)2 NativeString (com.google.gerrit.client.rpc.NativeString)2 HintTextBox (com.google.gerrit.client.ui.HintTextBox)2 OnEditEnabler (com.google.gerrit.client.ui.OnEditEnabler)2 KeyPressEvent (com.google.gwt.event.dom.client.KeyPressEvent)2