Package org.pentaho.gwt.widgets.client.dialogs

Examples of org.pentaho.gwt.widgets.client.dialogs.IDialogCallback


    final PromptDialogBox fileMoveToTrashWarningDialogBox =
        new PromptDialogBox( Messages.getString( "confirmSwitchTheme.title" ), Messages.getString( "confirmSwitchTheme.ok" ), Messages
            .getString( "confirmSwitchTheme.cancel" ), true, true );
    fileMoveToTrashWarningDialogBox.setContent( messageTextBox );

    final IDialogCallback callback = new IDialogCallback() {

      public void cancelPressed() {
      }

      public void okPressed() {
View Full Code Here


    Button browseButton = new Button( Messages.getString( "select" ) );
    browseButton.addClickHandler( new ClickHandler() {

      public void onClick( ClickEvent event ) {
        final SelectFolderDialog selectFolder = new SelectFolderDialog();
        selectFolder.setCallback( new IDialogCallback() {
          public void okPressed() {
            scheduleLocationTextBox.setText( selectFolder.getSelectedPath() );
          }

          public void cancelPressed() {
View Full Code Here

      vp.add( new Label( Messages.getString( "openWindowQuestion" ) ) ); //$NON-NLS-1$

      final PromptDialogBox openNewWindowConfirmDialog =
          new PromptDialogBox(
              Messages.getString( "openWindowConfirm" ), Messages.getString( "yes" ), Messages.getString( "no" ), false, true, vp ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      final IDialogCallback callback = new IDialogCallback() {

        public void cancelPressed() {
          openNewWindowConfirmDialog.hide();
        }
View Full Code Here

      vp.add( new Label( Messages.getString( "reloadQuestion" ) ) ); //$NON-NLS-1$

      final PromptDialogBox reloadConfirmDialog =
          new PromptDialogBox(
              Messages.getString( "reloadConfirm" ), Messages.getString( "yes" ), Messages.getString( "no" ), false, true, vp ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      final IDialogCallback callback = new IDialogCallback() {

        public void cancelPressed() {
          reloadConfirmDialog.hide();
        }
View Full Code Here

                PromptDialogBox overWriteDialog =
                  new PromptDialogBox(
                    Messages.getString( "question" ), Messages.getString( "yes" ), Messages.getString( "no" ), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
                    false, true );
                overWriteDialog.setContent( new Label( Messages.getString( "fileExistsOverwrite" ), false ) ); //$NON-NLS-1$
                overWriteDialog.setCallback( new IDialogCallback() {
                  public void okPressed() {
                    doSaveAs( navigatorPerspective.getContentTabPanel().getCurrentFrameElementId(), name, path, type,
                      true );
                    Window.setTitle( Messages.getString( "productName" ) + " - " + name ); //$NON-NLS-1$ //$NON-NLS-2$
                    FileChooserDialog.setIsDirty( Boolean.TRUE );
View Full Code Here

  public FormPanel getForm() {
    return form;
  }

  protected void onOk() {
    IDialogCallback callback = this.getCallback();
    IDialogValidatorCallback validatorCallback = this.getValidatorCallback();
    if ( validatorCallback == null || ( validatorCallback != null && validatorCallback.validate() ) ) {
      try {
        if ( callback != null ) {
          setFormAction();
          callback.okPressed();
        }
      } catch ( Throwable dontCare ) {
        // ignored
      }
    }
View Full Code Here

          new PromptDialogBox(
              Messages.getString( "permDelete" ), Messages.getString( "yesPermDelete" ), Messages.getString( "no" ), false, true, vp ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    }
    vp.add( new HTML( deleteMessage ) ); //$NON-NLS-1$

    final IDialogCallback callback = new IDialogCallback() {

      public void cancelPressed() {
        deleteConfirmDialog.hide();
      }

      public void okPressed() {
        String temp = "";

        // Add js file list
        temp = temp + fileList;

        // remove trailing ","
        temp = temp.substring( 0, temp.length() - 1 );

        final String filesList = temp;

        String deleteFilesURL = contextURL + "api/repo/files/deletepermanent"; //$NON-NLS-1$
        RequestBuilder deleteFilesRequestBuilder = new RequestBuilder( RequestBuilder.PUT, deleteFilesURL );
        deleteFilesRequestBuilder.setHeader( "Content-Type", "text/plain" ); //$NON-NLS-1$//$NON-NLS-2$
        deleteFilesRequestBuilder.setHeader( "If-Modified-Since", "01 Jan 1970 00:00:00 GMT" );
        try {
          deleteFilesRequestBuilder.sendRequest( filesList, new RequestCallback() {

            @Override
            public void onError( Request request, Throwable exception ) {
              MessageDialogBox dialogBox =
                  new MessageDialogBox( Messages.getString( "error" ), Messages.getString( "couldNotDeleteFile" ), //$NON-NLS-1$ //$NON-NLS-2$
                      false, false, true );
              dialogBox.center();
              event.setMessage( Messages.getString( "couldNotDeleteFile" ) );
              EventBusUtil.EVENT_BUS.fireEvent( event );
            }

            @Override
            public void onResponseReceived( Request request, Response response ) {
              if ( response.getStatusCode() == 200 ) {
                new RefreshRepositoryCommand().execute( false );
                event.setMessage( "Success" );
                FileChooserDialog.setIsDirty( Boolean.TRUE );
                setBrowseRepoDirty( Boolean.TRUE );
                EventBusUtil.EVENT_BUS.fireEvent( event );
              } else {

                event.setMessage( Messages.getString( "couldNotDeleteFile" ) );
                EventBusUtil.EVENT_BUS.fireEvent( event );
              }
            }

          } );
        } catch ( RequestException e ) {
          MessageDialogBox dialogBox =
              new MessageDialogBox( Messages.getString( "error" ), Messages.getString( "couldNotDeleteFile" ), //$NON-NLS-1$ //$NON-NLS-2$
                  false, false, true );
          dialogBox.center();
          event.setMessage( Messages.getString( "couldNotDeleteFile" ) );
          EventBusUtil.EVENT_BUS.fireEvent( event );
        }
      }
    };
    if ( !feedback ) {
      callback.okPressed();
    } else {
      deleteConfirmDialog.setCallback( callback );
      deleteConfirmDialog.center();
    }
  }
View Full Code Here

        new PromptDialogBox(
            Messages.getString( "newFolder" ), Messages.getString( "ok" ), Messages.getString( "cancel" ), false, true, vp ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    newFolderDialog.setFocusWidget( folderNameTextBox );
    folderNameTextBox.setFocus( true );

    final IDialogCallback callback = new IDialogCallback() {

      public void cancelPressed() {
        newFolderDialog.hide();
      }
View Full Code Here

    final PromptDialogBox folderDeleteWarningDialogBox =
        new PromptDialogBox( Messages.getString( "moveToTrash" ), Messages.getString( "yesMoveToTrash" ), Messages
            .getString( "no" ), true, true );
    folderDeleteWarningDialogBox.setContent( messageTextBox );

    final IDialogCallback callback = new IDialogCallback() {

      public void cancelPressed() {
        folderDeleteWarningDialogBox.hide();
      }
View Full Code Here

  protected void performOperation( boolean feedback ) {
    final TextBox textBox = new TextBox();
    textBox.setText( "http://" ); //$NON-NLS-1$
    textBox.setWidth( "500px" ); //$NON-NLS-1$
    textBox.setVisibleLength( 72 );
    IDialogCallback callback = new IDialogCallback() {

      public void cancelPressed() {
      }

      public void okPressed() {
View Full Code Here

TOP

Related Classes of org.pentaho.gwt.widgets.client.dialogs.IDialogCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.