@@ -0,0 +1,2999 @@
+/**%0A * The MIT License (MIT)%0A * %0A * Copyright (c) 2014 mcflugen%0A * %0A * Permission is hereby granted, free of charge, to any person obtaining a copy%0A * of this software and associated documentation files (the %22Software%22), to deal%0A * in the Software without restriction, including without limitation the rights%0A * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0A * copies of the Software, and to permit persons to whom the Software is%0A * furnished to do so, subject to the following conditions:%0A * %0A * The above copyright notice and this permission notice shall be included in%0A * all copies or substantial portions of the Software.%0A * %0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0A * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE%0A * SOFTWARE.%0A */%0Apackage edu.colorado.csdms.wmt.client.ui.widgets;%0A%0Aimport com.google.gwt.dom.client.Style.Unit;%0Aimport com.google.gwt.event.dom.client.ClickEvent;%0Aimport com.google.gwt.event.dom.client.ClickHandler;%0Aimport com.google.gwt.user.client.ui.Button;%0Aimport com.google.gwt.user.client.ui.HasHorizontalAlignment;%0Aimport com.google.gwt.user.client.ui.Label;%0Aimport com.google.gwt.user.client.ui.PopupPanel;%0Aimport com.google.gwt.user.client.ui.VerticalPanel;%0A%0A/**%0A * A %7B@link PopupPanel%7D displayed with a %22glass%22 element to gray out the widgets%0A * behind it.%0A * %0A * @author Mark Piper (mark.piper@colorado.edu)%0A */%0Apublic class DesensitizingPopupPanel extends PopupPanel %7B%0A%0A  private String message;%0A  %0A  /**%0A   * Makes a %7B@link DesensitizingPopupPanel%7D with a default message.%0A   */%0A  public DesensitizingPopupPanel() %7B%0A    this(%22Click to close this dialog.%22);%0A  %7D%0A%0A  /**%0A   * Makes a %7B@link DesensitizingPopupPanel%7D with a user-defined default%0A   * message.%0A   * %0A   * @param message a String displayed in the panel%0A   */%0A  public DesensitizingPopupPanel(String message) %7B%0A    super();%0A    this.setAutoHideEnabled(false);%0A    this.setGlassEnabled(true);%0A    this.setStyleName(%22wmt-DialogBox%22);    %0A%0A    this.message = message;%0A    %0A    Label messageLabel = new Label(this.message);%0A    messageLabel.getElement().getStyle().setMargin(10.0, Unit.PX);%0A    %0A    Button okButton = new Button(%22OK%22);%0A    okButton.setStyleName(%22wmt-Button%22);%0A    %0A    VerticalPanel panel = new VerticalPanel();%0A    panel.setSpacing(5); // px%0A    panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);%0A    panel.add(messageLabel);%0A    panel.add(okButton);%0A    %0A    this.setWidget(panel);%0A    %0A    okButton.addClickHandler(new ClickHandler() %7B%0A      @Override%0A      public void onClick(ClickEvent event) %7B%0A        DesensitizingPopupPanel.this.hide();%0A      %7D%0A    %7D);%0A  %7D%0A%7D%0A

Add desensitizing panel