Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2012 JBoss Inc
   *
   * Licensed under the Apache License, Version 2.0 (the "License"); you may not
   * use this file except in compliance with the License. You may obtain a copy of
   * the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  * License for the specific language governing permissions and limitations under
  * the License.
  */
 
 package org.uberfire.client.common;
 
 import  org.uberfire.mvp.Command;
 
 public class YesNoCancelPopup extends Modal {
 
     interface YesNoCancelPopupWidgetBinder
             extends
             UiBinder<WidgetYesNoCancelPopup> {
 
     }
 
 
     @UiField
     protected HTML message;
 
     protected YesNoCancelPopup(final String title,
                                final String content,
                                final Command yesCommand,
                                final String yesButtonText,
                                final ButtonType yesButtonType,
                                final IconType yesButtonIconType,
                                final Command noCommand,
                                final String noButtonText,
                                final ButtonType noButtonType,
                                final IconType noButtonIconType,
                                final Command cancelCommand,
                                final String cancelButtonText,
                                final ButtonType cancelButtonType,
                                final IconType cancelButtonIconType) {
 
         setTitletitle );
         setMaxHeigth( ( Window.getClientHeight() * 0.75 ) + "px" );
         setBackdrop. );
         setKeyboardtrue );
         setAnimationtrue );
         setDynamicSafetrue );
         setHideOthersfalse );
 
         add.createAndBindUithis ) );
         addnew ModalFooterYesNoCancelButtonsthisyesCommandyesButtonTextyesButtonTypeyesButtonIconType,
                                                 noCommandnoButtonTextnoButtonTypenoButtonIconType,
                                                 cancelCommandcancelButtonTextcancelButtonTypecancelButtonIconType ) );
 
         .setHTML( SafeHtmlUtils.fromTrustedString(content) );
     }
 
     protected YesNoCancelPopup(final String title,
                                final String content,
                                final Command yesCommand,
                                final Command noCommand,
                                final Command cancelCommand) {
         this(titlecontentyesCommandnullnullnullnoCommandnullnullnullcancelCommandnullnullnull);
 
     }
 
     public static YesNoCancelPopup newYesNoCancelPopup(final String title,
                                       final String content,
                                       final Command yesCommand,
                                       final String yesButtonText,
                                       final ButtonType yesButtonType,
                                       final IconType yesButtonIconType,
                                       final Command noCommand,
                                       final String noButtonText,
                                       final ButtonType noButtonType,
                                       final IconType noButtonIconType,
                                       final Command cancelCommand,
                                       final String cancelButtonText,
                                       final ButtonType cancelButtonType,
                                       final IconType cancelButtonIconType) {
        return new YesNoCancelPopup(titlecontentyesCommandyesButtonTextyesButtonTypeyesButtonIconType,
                noCommandnoButtonTextnoButtonTypenoButtonIconType,
                cancelCommandcancelButtonTextcancelButtonTypecancelButtonIconType);
    }
    public static YesNoCancelPopup newYesNoCancelPopup(final String title,
                                                       final String content,
                                                       final Command yesCommand,
                                                       final Command noCommand,
                                                       final Command cancelCommand) {
        return new YesNoCancelPopup(titlecontentyesCommandnullnullnullnoCommandnullnullnull,
                cancelCommandnullnullnull);
    }
    public static YesNoCancelPopup newYesNoCancelPopup(final String title,
                                                       final String content,
                                                       final Command yesCommand,
                                                       final String yesButtonText,
                                                       final Command noCommand,
                                                       final String noButtonText,
                                                       final Command cancelCommand,
                                                       final String cancelButtonText) {
        return new YesNoCancelPopup(titlecontentyesCommandyesButtonTextnullnull,
                noCommandnoButtonTextnullnull,
                cancelCommandcancelButtonTextnullnull);
    }
    public static YesNoCancelPopup newYesNoCancelPopup(final String title,
                                                       final String content,
                                                       final Command yesCommand,
                                                       final String yesButtonText,
                                                       final ButtonType yesButtonType,
                                                       final Command noCommand,
                                                       final String noButtonText,
                                                       final ButtonType noButtonType,
                                                       final Command cancelCommand,
                                                       final String cancelButtonText,
                                                       final ButtonType cancelButtonType) {
        return new YesNoCancelPopup(titlecontent,
                yesCommandyesButtonTextyesButtonTypenull,
                noCommandnoButtonTextnoButtonTypenull,
                cancelCommandcancelButtonTextcancelButtonTypenull);
    }
New to GrepCode? Check out our FAQ X