class SwingListbox extends AbstractSwingContainer implements XulListbox, ListSelectionListener {

  public <T> void setElements( Collection<T> elements ) {
    this.suppressEvents = true;
    boundElements = elements;

    logger.info( "SetElements on listbox called: collection has " + elements.size() + " rows" );

    this.model.removeAllElements();
    this.removeItems();
    for ( T t : elements ) {
      SwingListitem item = new SwingListitem( null, this, this.xulDomContainer, null );

      String attribute = getBinding();
      item.setLabel( extractLabel( t ) );

      this.addChild( item );
    }
    this.suppressEvents = false;
    layout();

  }

  public  SwingListbox( Element self, XulComponent parent, XulDomContainer container, String tagName );

}