Package org.rstudio.core.client.widget

Examples of org.rstudio.core.client.widget.TextEntryModalDialog


                             int selectionLength,
                             String okButtonCaption,
                             ProgressOperationWithInput<String> okOperation,
                             Operation cancelOperation)
   {
      new TextEntryModalDialog(title,
                               label,
                               initialValue,
                               usePasswordMask,
                               null,
                               false,
View Full Code Here


      // This variable introduces a level of pointer indirection that lets us
      // get around passing TextEntryModalDialog a reference to itself in its
      // own constructor.
      final Value<TextEntryModalDialog> pDialog = new Value<TextEntryModalDialog>(null);

      final TextEntryModalDialog dialog = new TextEntryModalDialog(
            title,
            label,
            initialValue,
            usePasswordMask,
            extraOptionPrompt,
            extraOptionDefault,
            false,
            selectionStart,
            selectionLength,
            okButtonCaption,
            300,
            new ProgressOperationWithInput<String>()
            {
               @Override
               public void execute(String input, ProgressIndicator indicator)
               {
                  PromptWithOptionResult result = new PromptWithOptionResult();
                  result.input = input;
                  result.extraOption = pDialog.getValue().getExtraOption();
                  okOperation.execute(result, indicator);
               }
            },
            cancelOperation)  {
        
            @Override
            protected void positionAndShowDialog(final Command onCompleted)
            {
               setPopupPositionAndShow(new PositionCallback() {
  
                  @Override
                  public void setPosition(int offsetWidth, int offsetHeight)
                  {
                     int left = (Window.getClientWidth()/2) - (offsetWidth/2);
                     int top = (Window.getClientHeight()/2) - (offsetHeight/2);
                    
                     if (usePasswordMask)
                        top = 50;
                    
                     setPopupPosition(left, top);
                    
                     onCompleted.execute();
                  }
                 
               });
            }
        
      };

      pDialog.setValue(dialog, false);

      dialog.showModal();
   }
View Full Code Here

TOP

Related Classes of org.rstudio.core.client.widget.TextEntryModalDialog

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.