Trait

com.google.appsscript.base

Ui

Related Doc: package base

Permalink

trait Ui extends Object

Ui An instance of the user-interface environment for a Google App that allows the script to add features like menus, dialogs, and sidebars. A script can only interact with the UI for the current instance of an open editor, and only if the script is container-bound to the editor. // Display a dialog box with a title, message, input field, and "Yes" and "No" buttons. The // user can also close the dialog by clicking the close button in its title bar. var ui = SpreadsheetApp.getUi(); var response = ui.prompt('Getting to know you', 'May I know your name?', ui.ButtonSet.YES_NO);

// Process the user's response. if (response.getSelectedButton() == ui.Button.YES) { Logger.log('The user\'s name is %s.', response.getResponseText()); } else if (response.getSelectedButton() == ui.Button.NO) { Logger.log('The user didn\'t want to provide a name.'); } else { Logger.log('The user clicked the close button in the dialog\'s title bar.'); }

Annotations
@RawJSType()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Ui
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def alert(title: String, prompt: String, buttons: ButtonSet): Button

    Permalink

    Opens a dialog box in the user's editor with the given title, message, and set of buttons.

    Opens a dialog box in the user's editor with the given title, message, and set of buttons. This method suspends the server-side script while the dialog is open. The script will resume after the user dismisses the dialog, but Jdbc connections will not persist across the suspension. For more information, see the guide to dialogs and sidebars.

  5. def alert(prompt: String, buttons: ButtonSet): Button

    Permalink

    Opens a dialog box in the user's editor with the given message and set of buttons.

    Opens a dialog box in the user's editor with the given message and set of buttons. This method suspends the server-side script while the dialog is open. The script will resume after the user dismisses the dialog, but Jdbc connections will not persist across the suspension. For more information, see the guide to dialogs and sidebars.

  6. def alert(prompt: String): Button

    Permalink

    Opens a dialog box in the user's editor with the given message and an "OK" button.

    Opens a dialog box in the user's editor with the given message and an "OK" button. This method suspends the server-side script while the dialog is open. The script will resume after the user dismisses the dialog, but Jdbc connections will not persist across the suspension. For more information, see the guide to dialogs and sidebars.

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def createAddonMenu(): Menu

    Permalink

    Creates a builder that can be used to insert a sub-menu into the editor's Add-on menu.

    Creates a builder that can be used to insert a sub-menu into the editor's Add-on menu. The menu will not actually be updated until Menu.addToUi() is called. If the script is running as an add-on, the sub-menu name will match the add-on's name in the web store; if the script is bound to the document directly, the sub-menu name will match the script's name. For more information, see the guide to menus.

  10. def createMenu(caption: String): Menu

    Permalink

    Creates a builder that can be used to add a menu to the editor's user interface.

    Creates a builder that can be used to add a menu to the editor's user interface. The menu will not actually be added until Menu.addToUi() is called. For more information, see the guide to menus. The label for a top-level menu should be in headline case (all major words capitalized), although the label for a sub-menu should be in sentence case (only the first word capitalized). If the script is published as an add-on, the caption parameter is ignored and the menu is added as a sub-menu of the Add-ons menu, equivalent to createAddonMenu().

  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def prompt(title: String, prompt: String, buttons: ButtonSet): PromptResponse

    Permalink

    Opens an input dialog box in the user's editor with the given title, message, and set of buttons.

    Opens an input dialog box in the user's editor with the given title, message, and set of buttons. This method suspends the server-side script while the dialog is open. The script will resume after the user dismisses the dialog, but Jdbc connections will not persist across the suspension. For more information, see the guide to dialogs and sidebars.

  23. def prompt(prompt: String, buttons: ButtonSet): PromptResponse

    Permalink

    Opens an input dialog box in the user's editor with the given message and set of buttons.

    Opens an input dialog box in the user's editor with the given message and set of buttons. This method suspends the server-side script while the dialog is open. The script will resume after the user dismisses the dialog, but Jdbc connections will not persist across the suspension. For more information, see the guide to dialogs and sidebars.

  24. def prompt(prompt: String): PromptResponse

    Permalink

    Opens an input dialog box in the user's editor with the given message and an "OK" button.

    Opens an input dialog box in the user's editor with the given message and an "OK" button. This method suspends the server-side script while the dialog is open. The script will resume after the user dismisses the dialog, but Jdbc connections will not persist across the suspension. For more information, see the guide to dialogs and sidebars.

  25. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  26. def showDialog(userInterface: AnyRef): Unit

    Permalink

    Deprecated.

    Deprecated. As of March 2014, this method is deprecated. The direct replacement is showModelessDialog(userInterface, title), but showModalDialog(userInterface, title) is a better choice in almost all cases.

  27. def showModalDialog(userInterface: AnyRef, title: String): Unit

    Permalink

    Opens a modal dialog box in the user's editor with custom client-side content.

    Opens a modal dialog box in the user's editor with custom client-side content. This method does not suspend the server-side script while the dialog is open. To communicate with the server-side script, the client-side component must make asynchronous callbacks using either the google.script API for HtmlService or server handlers for UiApp. To close the dialog programmatically, call google.script.host.close() on the client side of an HtmlService web app or UiInstance.close() from a UiApp web app. For more information, see the guide to dialogs and sidebars.

  28. def showModelessDialog(userInterface: AnyRef, title: String): Unit

    Permalink

    Opens a modeless dialog box in the user's editor with custom client-side content.

    Opens a modeless dialog box in the user's editor with custom client-side content. This method does not suspend the server-side script while the dialog is open. To communicate with the server-side script, the client-side component must make asynchronous callbacks using either the google.script API for HtmlService or server handlers for UiApp. To close the dialog programmatically, call google.script.host.close() on the client side of an HtmlService web app or UiInstance.close() from a UiApp web app. For more information, see the guide to dialogs and sidebars.

  29. def showSidebar(userInterface: AnyRef): Unit

    Permalink

    Opens a sidebar in the user's editor with custom client-side content.

    Opens a sidebar in the user's editor with custom client-side content. This method does not suspend the server-side script while the sidebar is open. To communicate with the server-side script, the client-side component must make asynchronous callbacks using either the google.script API for HtmlService or server handlers for UiApp. To close the sidebar programmatically, call google.script.host.close() on the client side of an HtmlService web app or UiInstance.close() from a UiApp web app. For more information, see the guide to dialogs and sidebars.

  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  31. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  32. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  33. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  34. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped