Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.uberfire.ext.widgets.common.client.common.popups.footers;
  
  import  com.github.gwtbootstrap.client.ui.Button;
  import  com.github.gwtbootstrap.client.ui.Modal;
  import  com.github.gwtbootstrap.client.ui.ModalFooter;
  import  com.github.gwtbootstrap.client.ui.constants.ButtonType;
  import  com.github.gwtbootstrap.client.ui.constants.IconType;
  import  com.google.gwt.core.client.GWT;
  import  com.google.gwt.event.dom.client.ClickEvent;
 import  com.google.gwt.uibinder.client.UiBinder;
 import  com.google.gwt.uibinder.client.UiField;
 import  com.google.gwt.uibinder.client.UiHandler;
 import  com.google.gwt.user.client.ui.Widget;
 import  org.uberfire.mvp.Command;
 
 public class ModalFooterYesNoCancelButtons extends ModalFooter {
 
 
     private final Command yesCommand;
 
     private final Command cancelCommand;
 
     private final Command noCommand;
 
     private final Modal panel;
 
             extends
             UiBinder<Widget, ModalFooterYesNoCancelButtons> {
 
     }
 
     @UiField
     Button yesButton;
 
     @UiField
     Button noButton;
 
     @UiField
     Button cancelButton;
 
     public ModalFooterYesNoCancelButtonsfinal Modal panel,
                                           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) {
 
         this. = yesCommand;
         this. = noCommand;
         this. = cancelCommand;
 
         add( .createAndBindUithis ) );
 
         if (yesCommand == null.setVisible(false);
         if (noCommand == null.setVisible(false);
         if (cancelCommand == null.setVisible(false);
 
         if (yesButtonType != null.setType(yesButtonType);
         if (yesButtonText != null.setText(yesButtonText);
         if (yesButtonIconType != null.setIcon(yesButtonIconType);
 
         if (noButtonType != null.setType(noButtonType);
         if (noButtonText != null.setText(noButtonText);
         if (noButtonIconType != null.setIcon(noButtonIconType);
 
         if (cancelButtonType != null.setType(cancelButtonType);
         if (cancelButtonText != null.setText(cancelButtonText);
         if (cancelButtonIconType != null.setIcon(cancelButtonIconType);
 
         this. = panel;
     }
 
     public ModalFooterYesNoCancelButtonsfinal Modal panel,
                                           final Command yesCommand,
                                           final ButtonType yesButtonType,
                                           final Command noCommand,
                                           final ButtonType noButtonType,
                                           final Command cancelCommand,
                                           final ButtonType cancelButtonType) {
         this(panelyesCommandnullyesButtonTypenullnoCommandnullnoButtonTypenullcancelCommandnullcancelButtonTypenull);
     }
 
     public ModalFooterYesNoCancelButtonsfinal Modal panel,
                                           final Command yesCommand,
                                           final Command noCommand,
                                           final Command cancelCommand) {
         this(panelyesCommandnullnullnullnoCommandnullnullnullcancelCommandnullnullnull);
     }
 
     @UiHandler("yesButton")
    public void onYesButtonClickfinal ClickEvent e ) {
        if ( != null.execute();
        .hide();
    }
    @UiHandler("noButton")
    public void onNoButtonClickfinal ClickEvent e ) {
        if ( != null.execute();
        .hide();
    }
    @UiHandler("cancelButton")
    public void onCancelButtonClickfinal ClickEvent e ) {
        if ( != null.execute();
        .hide();
    }
New to GrepCode? Check out our FAQ X