Example usage for com.google.gwt.user.client.ui ListBox clear

List of usage examples for com.google.gwt.user.client.ui ListBox clear

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui ListBox clear.

Prototype

public void clear() 

Source Link

Document

Removes all items from the list box.

Usage

From source file:co.edu.udea.iw.rtf.client.activity.AsignarSolicitudActivity.java

License:Open Source License

/**
 * Mtodo usado para inicializar la vista asociada con esta actividad.
 * */// w w  w .  j  ava  2 s  .c om
public void bind() {
    if (solicitudListado == null) {
        return;
    }
    AsignarSolicitudView view = clientFactory.getAsignarSolicitudView();
    view.getListBoxUsuario().clear();
    view.getTextBoxCelular().setText(solicitudListado.getCelular());
    view.getTextBoxCorreoElectronico().setText(solicitudListado.getCorreoElectronico());
    view.getTextBoxNombreCompleto().setText(solicitudListado.getNombreCompletoSolicitante());
    view.getTextBoxNombreProducto().setText(solicitudListado.getNombreProducto());
    view.getTextBoxNombreSucursal().setText(solicitudListado.getNombreSucursal());
    view.getTextBoxNombreTipoSolicitud().setText(solicitudListado.getNombreTipoSolicitud());
    view.getTextBoxTelefono().setText(solicitudListado.getTelefono());
    view.getTextBoxTextoSolicitud().setText(solicitudListado.getTextoSolicitud());
    final ListBox listBoxUsuarios = view.getListBoxUsuario();
    // llena la lista de los usuarios disponibles para ser asignados
    // para responder una solicitud
    SolicitudesService.Util.getInstance().getUsuarios(new AsyncCallback<List<UsuarioListado>>() {
        @Override
        public void onSuccess(List<UsuarioListado> result) {
            listBoxUsuarios.clear();
            listBoxUsuarios.addItem("Lista de usuarios");
            for (UsuarioListado usuarioListado : result) {
                listBoxUsuarios.addItem(usuarioListado.getLogin());
            }
        }

        @Override
        public void onFailure(Throwable caught) {
        }
    });
}

From source file:com.dawg6.web.dhcalc.client.SkillsPanel.java

License:Open Source License

private void setRunes(Anchor anchor2, ListBox list2, ActiveSkill skill) {

    list2.clear();

    if (skill != null) {
        for (Rune r : skill.getRunes()) {
            list2.addItem(r.getLongName(), r.name());
        }/* w w w.  j  a  va2 s . c  o m*/
    } else {
        list2.addItem("None", Rune.None.name());
    }

    list2.setSelectedIndex(0);
    setRuneAnchor(skill, anchor2, Rune.None);
}

From source file:com.dawg6.web.dhcalc.client.StatsPanel.java

License:Open Source License

private void populateSkills(int i) {
    ListBox list = skills[i];
    list.clear();

    list.addItem(ActiveSkill.Any.getLongName(), ActiveSkill.Any.name());
    list.addItem("None", "");

    for (ActiveSkill a : spenders)
        list.addItem(a.getLongName(), a.name());

    list.setSelectedIndex(0);/*from  www  . java2  s .  c  o  m*/
}

From source file:com.dawg6.web.dhcalc.client.StatsPanel.java

License:Open Source License

private void populateRunes(ListBox list, ActiveSkill skill) {
    list.clear();

    if (skill == null) {
        list.addItem(Rune.None.getLongName(), Rune.None.name());
    } else {/*from   w w  w.  ja v a2s. com*/
        list.addItem(Rune.All_Runes.getLongName(), Rune.All_Runes.name());

        if (skill != ActiveSkill.Any) {
            for (Rune r : skill.getRunes()) {
                list.addItem(r.getLongName(), r.name());
            }
        }
    }

    list.setSelectedIndex(0);
}

From source file:com.ephesoft.dcma.gwt.core.client.view.MultipleSelectTwoSidedListBox.java

License:Open Source License

public void populateListBoxWithValues(ListBox listBox, List<String> values) {

    listBox.clear();
    if (values != null) {
        int index = 0;
        for (String value : values) {
            listBox.addItem(value);/*from w w w .j a v  a  2s .  c o  m*/
            listBox.getElement().getElementsByTagName(OPTION).getItem(index++).setTitle(value);
        }
    }
}

From source file:com.ephesoft.dcma.gwt.customworkflow.client.view.dependencies.DependencyManagementView.java

License:Open Source License

public void populateListBoxWithValuesMap(ListBox listBox, Map<Integer, String> values) {

    listBox.clear();
    if (values != null) {
        for (Entry<Integer, String> pluginEntry : values.entrySet()) {
            listBox.addItem(pluginEntry.getValue(), pluginEntry.getKey().toString());
        }/*from w w  w  .  j  av a2  s. c  om*/
    }
}

From source file:com.ephesoft.dcma.gwt.customworkflow.client.view.dependencies.EditDependencyView.java

License:Open Source License

public void populateListBoxWithValues(ListBox listBox, List<String> values) {

    listBox.clear();
    if (values != null) {
        for (String value : values) {
            listBox.addItem(value);//from w  ww  .j  a v a 2 s  . c o  m
        }
    }
}

From source file:com.ephesoft.dcma.gwt.customworkflow.client.view.dependencies.EditDependencyView.java

License:Open Source License

public void populateListBoxWithValuesMap(ListBox listBox, Map<Integer, String> values) {

    listBox.clear();
    if (values != null) {
        int index = 0;
        for (Entry<Integer, String> pluginEntry : values.entrySet()) {
            listBox.addItem(pluginEntry.getValue(), pluginEntry.getKey().toString());
            listBox.getElement().getElementsByTagName(CustomWorkflowConstants.OPTION).getItem(index++)
                    .setTitle(pluginEntry.getValue());
        }//from w  ww.  j  av  a  2s  .  c  o m
    }
}

From source file:com.eucalyptus.webui.client.view.ReportViewImpl.java

License:Open Source License

private void initList(ListBox l, String[] list) {
    l.clear();
    if (list == null || list.length < 1) {
        l.addItem("None");
    } else {/*from   w  ww . j a v  a2 s  . c om*/
        for (final String aList : list) {
            l.addItem(aList);
        }
    }
}

From source file:com.github.gwtbootstrap.client.ui.ValueListBox.java

License:Apache License

public void setAcceptableValues(Collection<T> newValues) {

    valueList.clear();//from   w  w  w  . j a  v a  2s . c  o m

    valueKeyToIndex.clear();

    ListBox listBox = getListBox();

    listBox.clear();

    for (T nextNewValue : newValues) {
        addValue(nextNewValue);
    }

    updateListBox();
}