@@ -0,0 +1,1837 @@
+/*%0D%0A * Copyright 2008 Sander Berents%0D%0A *%0D%0A * Licensed under the Apache License, Version 2.0 (the %22License%22); you may not%0D%0A * use this file except in compliance with the License. You may obtain a copy of%0D%0A * the License at%0D%0A *%0D%0A * http://www.apache.org/licenses/LICENSE-2.0%0D%0A *%0D%0A * Unless required by applicable law or agreed to in writing, software%0D%0A * distributed under the License is distributed on an %22AS IS%22 BASIS, WITHOUT%0D%0A * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the%0D%0A * License for the specific language governing permissions and limitations under%0D%0A * the License.%0D%0A */%0D%0Apackage org.gwtlib.client.ui;%0D%0A%0D%0Aimport com.google.gwt.user.client.DOM;%0D%0Aimport com.google.gwt.user.client.Element;%0D%0Aimport com.google.gwt.user.client.ui.ListBox;%0D%0A%0D%0A/**%0D%0A * A ListBox with styles attached to each item.%0D%0A *%0D%0A * @author Sander Berents%0D%0A */%0D%0Apublic class StyledListBox extends ListBox %7B%0D%0A  public StyledListBox() %7B%0D%0A  %7D%0D%0A%0D%0A  public StyledListBox(boolean isMultipleSelect) %7B%0D%0A    super(isMultipleSelect);%0D%0A  %7D%0D%0A%0D%0A  /**%0D%0A   * Clears all of the item's style names and sets it to the given style. %0D%0A   * @param index%0D%0A   * @param style%0D%0A   */%0D%0A  public void setStyleName(int index, String style) %7B%0D%0A    Element child = DOM.getChild(getElement(), index);%0D%0A    setStyleName(child, style);%0D%0A  %7D%0D%0A%0D%0A  /**%0D%0A   * Adds a secondary or dependent style name to an item.%0D%0A   * @param index%0D%0A   * @param style%0D%0A   */%0D%0A  public void addStyleName(int index, String style) %7B%0D%0A    Element child = DOM.getChild(getElement(), index);%0D%0A    setStyleName(child, style, true);%0D%0A  %7D%0D%0A%0D%0A  /**%0D%0A   * Removes a style name from an item.%0D%0A   * @param index%0D%0A   * @param style%0D%0A   */%0D%0A  public void removeStyleName(int index, String style) %7B%0D%0A    Element child = DOM.getChild(getElement(), index);%0D%0A    setStyleName(child, style, false);%0D%0A  %7D%0D%0A%7D%0D%0A

Add StyledListBox.