@@ -0,0 +1,1832 @@
+/**%0A * %3CLicense%3E%0A */%0Apackage edu.colorado.csdms.wmt.client.ui;%0A%0Aimport com.google.gwt.dom.client.Style.Cursor;%0Aimport com.google.gwt.user.client.ui.HTML;%0Aimport com.google.gwt.user.client.ui.PopupPanel;%0Aimport com.google.gwt.user.client.ui.ScrollPanel;%0Aimport com.google.gwt.user.client.ui.VerticalPanel;%0A%0Aimport edu.colorado.csdms.wmt.client.control.DataManager;%0A%0A/**%0A * Encapsulates a scrollable list of labels used to tag and classify models.%0A * This menu is modeled on the %22Labels%22 menu in Gmail.%0A * %0A * @author Mark Piper (mark.piper@colorado.edu)%0A */%0Apublic class LabelsMenu extends PopupPanel %7B%0A%0A  @SuppressWarnings(%22unused%22)%0A  private DataManager data;%0A  %0A  /**%0A   * Makes a new %7B@link LabelsMenu%7D.%0A   * %0A   * @param data the DataManager object for the WMT session%0A   */%0A  public LabelsMenu(DataManager data) %7B%0A%0A    super(true); // autohide%0A    this.getElement().getStyle().setCursor(Cursor.POINTER); // use pointer%0A    this.data = data;%0A    %0A    // All the labels are listed on the labelPanel, which sits on a ScrollPanel.%0A    VerticalPanel labelPanel = new VerticalPanel();%0A    ScrollPanel scroller = new ScrollPanel(labelPanel);%0A    %0A    // XXX Temporary labels.%0A    HTML label0 = new HTML(%22low avulsion%22);%0A    labelPanel.add(label0);%0A    HTML label1 = new HTML(%22Ganges%22);%0A    labelPanel.add(label1);%0A    HTML label2 = new HTML(%22thesis%22);%0A    labelPanel.add(label2);%0A    HTML label3 = new HTML(%22AGU talk%22);%0A    labelPanel.add(label3);%0A    HTML label4 = new HTML(%222013%22);%0A    labelPanel.add(label4);%0A    %0A    // These two menu items are always visible on the bottom of the menu.%0A    HTML addNewHtml = new HTML(%22Add new label%22);%0A    HTML manageHtml = new HTML(%22Manage labels%22);%0A%0A    VerticalPanel contents = new VerticalPanel();%0A    contents.add(scroller);%0A    contents.add(addNewHtml);%0A    contents.add(manageHtml);%0A  %7D%0A%7D%0A

Add new LabelsMenu popup panel