Example usage for com.google.gwt.user.datepicker.client DateBox DateBox

List of usage examples for com.google.gwt.user.datepicker.client DateBox DateBox

Introduction

In this page you can find the example usage for com.google.gwt.user.datepicker.client DateBox DateBox.

Prototype

public DateBox(DatePicker picker, Date date, Format format) 

Source Link

Document

Create a new date box.

Usage

From source file:bz.davide.dmweb.shared.view.DMDateBoxFactory.java

License:Open Source License

@Override
public Widget create() {
    DatePicker datePicker = new DatePicker();
    DateTimeFormat dateTimeFormat = DateTimeFormat.getFormat(this.dmDateBox.format);
    DateBox dateBox = new DateBox(datePicker, new Date(this.dmDateBox.timestamp),
            new DateBox.DefaultFormat(dateTimeFormat));
    this.dmDateBox.dateBox = dateBox;
    this.dmDateBox.timestamp = 0;
    return dateBox;
}

From source file:com.tractionsoftware.gwt.demo.utcdatebox.client.UTCDateBoxDemo.java

License:Apache License

@Override
public void onModuleLoad() {

    eventListBox = new ListBox(true);
    eventListBox.setVisibleItemCount(20);
    eventListBox.setWidth("800px");
    RootPanel.get("eventlog").add(eventListBox);

    datebox = new DateBox(new DatePicker(), null,
            new DateBox.DefaultFormat(DateTimeFormat.getFormat("MMM dd, yyyy")));
    datebox.addValueChangeHandler(new ValueChangeHandler<Date>() {
        @Override/*w  w w.ja v  a2  s.  c om*/
        public void onValueChange(ValueChangeEvent<Date> event) {
            addEvent("DateBox", event.getValue(), event.getValue().getTime());
        }
    });
    RootPanel.get("datebox").add(datebox);

    utcdatebox = new UTCDateBox();
    utcdatebox.addValueChangeHandler(new ValueChangeHandler<Long>() {
        @Override
        public void onValueChange(ValueChangeEvent<Long> event) {
            addEvent("UTCDateBox", new Date(event.getValue()), event.getValue());
        }
    });
    RootPanel.get("utcdatebox").add(utcdatebox);

    CheckBox enabled = new CheckBox("Enabled");
    enabled.setValue(true);
    RootPanel.get("utcdatebox-enabled").add(enabled);
    enabled.addValueChangeHandler(new ValueChangeHandler<Boolean>() {

        @Override
        public void onValueChange(ValueChangeEvent<Boolean> event) {
            utcdatebox.setEnabled(event.getValue());
        }

    });

}

From source file:com.webgocommerce.client.uiutil.UIActDes.java

private void initComponents() {
    pnlContenedor = new HorizontalPanel();
    lblFecha = new Label("FECHA");
    dbFecha = new DateBox(new DatePicker(), UISesion.beanInitParam.getFechaServer(), defaultFormat);
    btnProcess = new Button("PROCESO");
    pnlContenedor.add(lblFecha);//from  ww w .j  a  v a2 s  . co  m
    pnlContenedor.add(new UISeparador().isSpace());
    pnlContenedor.add(dbFecha);
    pnlContenedor.add(new UISeparador().isSpace());
    pnlContenedor.add(btnProcess);
    this.add(pnlContenedor);
    this.setGlassEnabled(true);
    this.setAnimationEnabled(true);
    this.setModal(true);
    this.setAutoHideEnabled(true);
    this.setSize("100px", "30px");
    this.center();
}

From source file:com.webgocommerce.client.view.uidocventa.UIDocVenta.java

private void initComponents() {
    btnCambiarEstado = new Button("Ver estado");
    btnExportar = new Button("Exportar");
    lstFiltro = new ListBox();
    lstFiltro.addItem("DOC. CLIENTE", "RUCCLIENTE");
    lstFiltro.addItem("NOM. CLIENTE", "DESCCLIENTE");
    lstFiltro.addItem("CORRELATIVO", "CORRELATIVO");
    pnlSearch = new FlexTable();
    chkExcluirFechas = new CheckBox();
    chkSoloAnulados = new CheckBox();
    boxDateIni = new DateBox(new DatePicker(), UISesion.beanInitParam.getFechaServer(), defaultFormat);
    boxDateFin = new DateBox(new DatePicker(), UISesion.beanInitParam.getFechaServer(), defaultFormat);
    lblDesde = new Label("Fecha Emision:  Desde");
    lblHasta = new Label("Hasta");
    lblExcluirFechas = new Label("ExcluirFechas");
    lblSoloAnulados = new Label("Mostrar solo Anulados");
    pnlSearch.setWidget(0, 0, lblDesde);
    pnlSearch.setWidget(0, 1, boxDateIni);
    pnlSearch.setWidget(0, 2, lblHasta);
    pnlSearch.setWidget(0, 3, boxDateFin);
    pnlSearch.setWidget(0, 4, lblExcluirFechas);
    pnlSearch.setWidget(0, 5, chkExcluirFechas);
    pnlSearch.setWidget(0, 6, new UISeparador());
    pnlSearch.setWidget(0, 7, lblSoloAnulados);
    pnlSearch.setWidget(0, 8, chkSoloAnulados);
    lblSeparador = new Label("-");
    lblTipoDoc = new Label("");
    lblSerie = new Label("");
    lblPreImpreso = new Label("");
    lblDocumento = new Label("Detalle del documento:");
    txtBuscar = new MSearchBox();
    txtBuscar.setPlaceHolder("Buscar");
    pnlToolDoc = new HorizontalPanel();
    pnlToolDoc.add(lblDocumento);//from   ww w  .  j  a va2  s  . c om
    pnlToolDoc.add((new UISeparador()).isSpace());
    pnlToolDoc.add(lblTipoDoc);
    pnlToolDoc.add((new UISeparador()).isSpace());
    pnlToolDoc.add(lblSerie);
    pnlToolDoc.add(lblSeparador);
    pnlToolDoc.add(lblPreImpreso);
    pnlData = new FlexTable();
    grid = new GridCabeceraVenta();
    grid.setMinimumTableWidth(1024, Style.Unit.PX);
    grid2 = new GridDetailVenta();
    grid2.setMinimumTableWidth(1024, Style.Unit.PX);
    pnlData.setWidget(0, 0, grid);
    pnlData.setWidget(1, 0, pnlToolDoc);
    pnlData.setWidget(2, 0, grid2);
    this.getPnlTabla().add(pnlData);
    pnlSearch.setWidget(1, 0, lstFiltro);
    pnlSearch.setWidget(1, 1, txtBuscar);
    pnlSearch.getFlexCellFormatter().setColSpan(1, 1, 8);
    pnlSearch.setCellSpacing(5);
    this.getPnlBusqueda().add(pnlSearch);
    this.btnOper1.setVisible(false);
    this.btnOper2.setVisible(false);
    this.btnOper3.setVisible(false);
    this.addComponent(btnCambiarEstado);
    btnCambiarEstado.setVisible(false);
    this.addComponent(btnExportar);
    Window.addResizeHandler(new ResizeHandler() {

        @Override
        public void onResize(ResizeEvent event) {
            reCalcularWindows();
        }
    });
}

From source file:com.webgocommerce.client.view.uimantcoordinador.UIMantCoordinador.java

private void initComponents() {
    dtFechaIncorporacion = new DateBox(new DatePicker(), UISesion.beanInitParam.getFechaServer(),
            defaultFormat);/*from  ww  w  .  jav  a2  s  .c om*/
    txtCelular = new TextBox();
    txtId = new TextBox();
    txtDni = new TextBox();
    txtDni.getElement().setAttribute("required", "required");
    txtNombres = new TextBox();
    txtNombres.getElement().setAttribute("required", "required");
    txtApellidos = new TextBox();
    txtApellidos.getElement().setAttribute("required", "required");
    txtCorreo = new TextBox();
    //this.addWidget("ID", txtId);
    this.addWidget("INCORPORACION (*)", dtFechaIncorporacion);
    this.addWidget("DNI (*)", txtDni);
    this.addWidget("NOMBRES (*)", txtNombres);
    this.addWidget("APELLIDOS (*)", txtApellidos);
    this.addWidget("CORREO ELECTRONICO ", txtCorreo);
    this.addWidget("CELULAR ", txtCelular);
    Window.addResizeHandler(new ResizeHandler() {

        @Override
        public void onResize(ResizeEvent event) {
            reCalcularWindows();
        }

    });
}

From source file:com.webgocommerce.client.view.uimantsupervisor.UIMantSupervisor.java

private void initComponents() {
    dtFechaIncorporacion = new DateBox(new DatePicker(), UISesion.beanInitParam.getFechaServer(),
            defaultFormat);//www.  jav a 2s  .  com
    txtCelular = new TextBox();
    lstCanal = new ListBox();
    lstCanal.addItem("CANAL PERSONAS Y EMPRESAS");
    lstCanal.addItem("CANAL PERSONAS");
    lstCanal.addItem("CANAL EMPRESAS");
    lstMesa = new ListModelMesa();
    lstSucursal = new ListModelSucursal();
    lstTienda = new ListModelTienda();
    lstPtoEmision = new ListModelPuntoEmision();
    txtId = new TextBox();
    txtAlterno = new TextBox();
    txtDni = new TextBox();
    txtDni.getElement().setAttribute("required", "required");
    txtNombres = new TextBox();
    txtNombres.getElement().setAttribute("required", "required");
    txtApellidos = new TextBox();
    txtApellidos.getElement().setAttribute("required", "required");
    txtCorreo = new TextBox();
    //this.addWidget("ID", txtId);
    this.addWidget("INCORPORACION (*)", dtFechaIncorporacion);
    this.addWidget("CANAL (*)", lstCanal);
    this.addWidget("SUCURSAL (*)", lstSucursal);
    this.addWidget("TIENDA (*)", lstTienda);
    this.addWidget("PTO. EMISION (*)", lstPtoEmision);
    this.addWidget("CODIGO ALTERNO ", txtAlterno);
    this.addWidget("DNI (*)", txtDni);
    this.addWidget("NOMBRES (*)", txtNombres);
    this.addWidget("APELLIDOS (*)", txtApellidos);
    this.addWidget("CORREO ELECTRONICO ", txtCorreo);
    this.addWidget("CELULAR ", txtCelular);
    Window.addResizeHandler(new ResizeHandler() {

        @Override
        public void onResize(ResizeEvent event) {
            reCalcularWindows();
        }

    });
}

From source file:com.webgocommerce.client.view.uimantvendedor.UIMantVendedor.java

private void initComponents() {
    dtFechaIncorporacion = new DateBox(new DatePicker(), UISesion.beanInitParam.getFechaServer(),
            defaultFormat);/* w  w w.j  av  a 2s.co  m*/
    txtCelular = new TextBox();
    lstCanal = new ListBox();
    lstCanal.addItem("CANAL PERSONAS Y EMPRESAS");
    lstCanal.addItem("CANAL PERSONAS");
    lstCanal.addItem("CANAL EMPRESAS");
    lstMesa = new ListModelMesa();
    lstSucursal = new ListModelSucursal();
    lstTienda = new ListModelTienda();
    lstPtoEmision = new ListModelPuntoEmision();
    txtId = new TextBox();
    txtAlterno = new TextBox();
    txtDescripcion = new TextBox();
    txtDescripcion.getElement().setAttribute("required", "required");
    txtDni = new TextBox();
    txtDni.getElement().setAttribute("required", "required");
    txtDni.setMaxLength(8);
    txtPrimerNom = new TextBox();
    txtPrimerNom.getElement().setAttribute("required", "required");
    txtSegundoNom = new TextBox();
    txtApPaterno = new TextBox();
    txtApPaterno.getElement().setAttribute("required", "required");
    txtApMaterno = new TextBox();
    txtCorreo = new TextBox();
    //this.addWidget("ID", txtId);
    //this.addWidget("MESA (*)", lstMesa);
    this.addWidget("INCORPORACION (*)", dtFechaIncorporacion);
    this.addWidget("CANAL (*)", lstCanal);
    this.addWidget("SUCURSAL (*)", lstSucursal);
    this.addWidget("TIENDA (*)", lstTienda);
    this.addWidget("PTO. EMISION (*)", lstPtoEmision);
    this.addWidget("CODIGO ALTERNO ", txtAlterno);
    this.addWidget("DNI (*)", txtDni);
    this.addWidget("PRIMER NOMBRE (*)", txtPrimerNom);
    this.addWidget("SEGUNDO NOMBRE ", txtSegundoNom);
    this.addWidget("APELLIDO PATERNO (*)", txtApPaterno);
    this.addWidget("APELLIDO MATERNO ", txtApMaterno);
    this.addWidget("CORREO ELECTRONICO ", txtCorreo);
    this.addWidget("CELULAR ", txtCelular);
    //this.addWidget("DESC. NAVA (*)", txtDescripcion);
    Window.addResizeHandler(new ResizeHandler() {

        @Override
        public void onResize(ResizeEvent event) {
            reCalcularWindows();
        }
    });
}

From source file:com.webgocommerce.client.view.uirvsalida.UIrvSalida.java

private void initComponents() {
    txtSupervisor = new TextBox();
    txtSupervisor.setEnabled(false);//w w  w .j  a va  2s . c o  m
    txtProy = new TextBox();
    lstEstadoActual = new ListBox();
    lstEstadoActual.addItem("APROBADO");
    lstEstadoActual.addItem("ENVIADO A CREDITOS");
    lstEstadoActual.addItem("OBSERVADO");
    lstEstadoActual.addItem("OBSERVADO POR ACTIVACIONES");
    lstEstadoActual.addItem("PENDIENTE SUBSANACION");
    lstEstadoActual.addItem("APROBADO Y ENVIADO A ACTIVACIONES");
    lstEstadoActual.addItem("ENVIADO A POOL DE PORTABILIDAD");
    lstEstadoActual.addItem("APROB X ACTIVACIONES Y ENVIADO A DESPACHO");
    lstEstadoActual.addItem("APROB X DESPACHOS Y ENVIADO A ALMACEN");
    lstEstadoActual.addItem("ACTIVACION Y DESPACHO DE PORTABILIDAD");
    lstEstadoActual.addItem("RECHAZADO");
    lstEstadoActual.addItem("ANULADO");
    lstEstadoActual.addItem("PENDIENTE EN EJECUCION");
    lstEstadoActual.addItem("ATENDIDOS FIJA");
    lstCategoriaVenta = new ListBox();
    lstCategoriaVenta.addItem("ALTA NUEVA CLIENTE NUEVO");
    lstCategoriaVenta.addItem("ALTA NUEVA CLIENTE ACTUAL");
    lstCategoriaVenta.addItem("ADICIONAL/ UP GRADE");
    lstCategoriaVenta.addItem("PORTABILIDAD ENTEL");
    lstCategoriaVenta.addItem("PORTABILIDAD MOVISTAR");
    lstCategoriaVenta.addItem("PORTABILIDAD BITEL");
    lstCategoriaVenta.addItem("SERVICIOS ADICIONALES");
    dtFechaEmsion = new DateBox(new DatePicker(), UISesion.beanInitParam.getFechaServer(), defaultFormat);
    FlexTable monDoc = new FlexTable();
    contentForm = new FlexTable();
    lstVendedor = new ListModelVendedor();
    lstMonCancela = new ListBox();
    lstMonCancela.addItem("Nuevos Soles", "S");
    lstMonCancela.addItem("Dolares", "D");
    lstMonCancela.setEnabled(false);
    txtPlan = new TextBox();
    txtPlan.setEnabled(false);
    txtEquipos = new TextBox();
    txtEquipos.setEnabled(false);
    contentForm.setWidget(0, 0, new Label("PROY / SEC"));
    contentForm.setWidget(0, 1, txtProy);
    contentForm.setWidget(1, 0, new Label("FECHA EMISION"));
    contentForm.setWidget(1, 1, dtFechaEmsion);
    contentForm.setWidget(2, 0, new Label("ESTADO PROY."));
    contentForm.setWidget(2, 1, lstEstadoActual);
    contentForm.setWidget(3, 0, new Label("VENDEDOR"));
    contentForm.setWidget(3, 1, lstVendedor);
    contentForm.setWidget(4, 0, new Label("SUPERVISOR"));
    contentForm.setWidget(4, 1, txtSupervisor);
    contentForm.setWidget(5, 0, new Label("TIPO DE VENTA"));
    contentForm.setWidget(5, 1, lstCategoriaVenta);
    contentForm.setWidget(6, 0, new Label("MONEDA"));
    contentForm.setWidget(6, 1, lstMonCancela);
    contentForm.setWidget(7, 0, new Label("TOTAL PLAN"));
    contentForm.setWidget(7, 1, txtPlan);
    contentForm.setWidget(8, 0, new Label("TOTAL EQUIPOS"));
    contentForm.setWidget(8, 1, txtEquipos);
    flexBoton = new FlexTable();
    btnGenerar = new Button("Generar");
    btnCancelar = new Button("Cancelar");
    flexBoton.setWidget(0, 0, btnGenerar);
    flexBoton.setWidget(0, 1, btnCancelar);
    contenedor = new BorderLayout();
    pnlHead = new VerticalPanel();
    uiSearchCliente = new UISearchCliente(false);
    uiSearchCliente.btnBuscar.setVisible(false);
    uiSearchCliente.txtRucFacturacion.setEnabled(false);
    uiInfoDoc = new UIInfoDoc();
    uiInfoDoc.lstSerieCorre.setEnabled(false);
    uiInfoDoc.lstTipoDoc.setEnabled(false);
    uiInfoDoc.txtPreImpreso.setEnabled(false);
    uiInfoDoc.lblDocumento.setVisible(false);
    uiInfoMoneda = new UIInfoMoneda();
    uiInfoMoneda.lstMoneda.setEnabled(false);
    pnlHead.add(uiSearchCliente);
    monDoc.setWidget(0, 1, uiInfoDoc);
    monDoc.setWidget(0, 2, uiInfoMoneda);
    pnlHead.add(monDoc);
    //pnlHead.add(uiInfoDoc);
    //pnlHead.add(uiInfoMoneda);
    contenedor.add(BorderLayout.NORTE, pnlHead);
    contenedor.add(BorderLayout.CENTRO, contentForm);
    contenedor.add(BorderLayout.SUR, flexBoton);
    this.add(contenedor);
    this.setGlassEnabled(true);
    this.setAnimationEnabled(true);
    this.setModal(true);
    this.setAutoHideEnabled(true);
    this.setSize("600px", "460px");
    this.center();
}

From source file:com.webgocommerce.client.view.uivdsalida.UIvdSalida.java

private void initComponents() {
    lstCategoriaVenta = new ListBox();
    lstCategoriaVenta.addItem("VENTA NUEVA");
    lstCategoriaVenta.addItem("PORTABILIDAD");
    lstCategoriaVenta.addItem("RENOVACION");
    dtFechaEmsion = new DateBox(new DatePicker(), UISesion.beanInitParam.getFechaServer(), defaultFormat);
    FlexTable monDoc = new FlexTable();
    contentForm = new FlexTable();
    lstVendedor = new ListModelVendedor();
    lstTipoVenta = new ListModelTipoVenta();
    lstCondVenta = new ListModelCondicionVenta();
    lstMonCancela = new ListBox();
    lstMonCancela.addItem("Nuevos Soles", "S");
    lstMonCancela.addItem("Dolares", "D");
    lstMonCancela.setEnabled(false);/* ww  w. j av a  2 s . c o  m*/
    txtRecibido = new TextBox();
    txtAcobrar = new TextBox();
    txtAcobrar.setEnabled(false);
    txtVuelto = new TextBox();
    txtVuelto.setEnabled(false);
    contentForm.setWidget(0, 0, new Label("FECHA EMISION"));
    contentForm.setWidget(0, 1, dtFechaEmsion);
    contentForm.setWidget(1, 0, new Label("VENDEDOR"));
    contentForm.setWidget(1, 1, lstVendedor);
    contentForm.setWidget(2, 0, new Label("TIPO DE VENTA"));
    contentForm.setWidget(2, 1, lstTipoVenta);
    contentForm.setWidget(3, 0, new Label("CATEGORIA DE VENTA"));
    contentForm.setWidget(3, 1, lstCategoriaVenta);
    contentForm.setWidget(4, 0, new Label("CONDICION VENTA"));
    contentForm.setWidget(4, 1, lstCondVenta);
    contentForm.setWidget(5, 0, new Label("CANCELA EN"));
    contentForm.setWidget(5, 1, lstMonCancela);
    contentForm.setWidget(6, 0, new Label("RECIBIDO"));
    contentForm.setWidget(6, 1, txtRecibido);
    contentForm.setWidget(7, 0, new Label("A COBRAR"));
    contentForm.setWidget(7, 1, txtAcobrar);
    contentForm.setWidget(8, 0, new Label("VUELTO"));
    contentForm.setWidget(8, 1, txtVuelto);
    flexBoton = new FlexTable();
    btnGenerar = new Button("Generar");
    btnCancelar = new Button("Cancelar");
    flexBoton.setWidget(0, 0, btnGenerar);
    flexBoton.setWidget(0, 1, btnCancelar);
    contenedor = new BorderLayout();
    pnlHead = new VerticalPanel();
    uiSearchCliente = new UISearchCliente(false);
    uiSearchCliente.btnBuscar.setVisible(false);
    uiSearchCliente.txtRucFacturacion.setEnabled(false);
    uiInfoDoc = new UIInfoDoc();
    uiInfoDoc.lstSerieCorre.setEnabled(false);
    uiInfoDoc.lstTipoDoc.setEnabled(false);
    uiInfoDoc.txtPreImpreso.setEnabled(false);
    uiInfoDoc.lblDocumento.setVisible(false);
    uiInfoMoneda = new UIInfoMoneda();
    uiInfoMoneda.lstMoneda.setEnabled(false);
    pnlHead.add(uiSearchCliente);
    monDoc.setWidget(0, 1, uiInfoDoc);
    monDoc.setWidget(0, 2, uiInfoMoneda);
    pnlHead.add(monDoc);
    //pnlHead.add(uiInfoDoc);
    //pnlHead.add(uiInfoMoneda);
    contenedor.add(BorderLayout.NORTE, pnlHead);
    contenedor.add(BorderLayout.CENTRO, contentForm);
    contenedor.add(BorderLayout.SUR, flexBoton);
    this.add(contenedor);
    this.setGlassEnabled(true);
    this.setAnimationEnabled(true);
    this.setModal(true);
    this.setAutoHideEnabled(true);
    this.setSize("600px", "460px");
    this.center();
}

From source file:es.upm.fi.dia.oeg.map4rdf.client.view.FiltersView.java

License:Open Source License

private void addYearDatePicker() {
    dateFilterPanel = new FlowPanel();
    dateFilterPanel.setStyleName(resources.css().dateFilterPanel());
    panel.add(dateFilterPanel);/*from  w  w w.jav  a 2s.  c  o  m*/
    DateTimeFormat dateFormat = DateTimeFormat.getFormat("dd-MM-yyyy");
    DateBox dateBox = new DateBox(new DatePickerWithYearSelector(), new Date(),
            new DateBox.DefaultFormat(dateFormat));
    final ListBox comboBox = new ListBox();
    comboBox.setMultipleSelect(false);
    comboBox.addItem(messages.equalsTo(), DateFilter.DateFilterType.EQUAL.name());
    comboBox.addItem(messages.beforeTo(), DateFilter.DateFilterType.BEFORE.name());
    comboBox.addItem(messages.afterTo(), DateFilter.DateFilterType.AFTER.name());
    comboBox.addItem(messages.beforeOrEqualsTo(), DateFilter.DateFilterType.BEFORE_OR_EQUAL.name());
    comboBox.addItem(messages.afterOrEqualsTo(), DateFilter.DateFilterType.AFTER_OR_EQUAL.name());
    Button addFilterButton = new Button(messages.addFilter());
    Label title = new Label(messages.addADateFilter());
    title.setStyleName(resources.css().dateFilterTitle());
    dateFilterPanel.add(title);
    dateFilterPanel.add(comboBox);
    dateFilterPanel.add(dateBox);
    dateFilterPanel.add(addFilterButton);
    FlowPanel filtersPanel = new FlowPanel();
    dateFilterPanel.add(filtersPanel);
    addFilterChange(filtersPanel, addFilterButton, comboBox, dateBox);

}