Deprecated. The UI service was deprecated on December 11, 2014. To create user interfaces, use the HTML service instead.
A representation of a user interface.
You can use this to create a new user interface or manipulate an existing one.
Deprecated methods
Deprecated methods
add(child)
add(child)
Deprecated. This function is deprecated and should not be used in new scripts.
Adds a new widget to this application.
The new widget will be a part of the children widgets of this application. The new widget is added to the end of the list of widgets currently in the application.
Parameters
Name | Type | Description |
---|---|---|
child |
| the new widget to add to the application. |
Return
— the application itself, useful for chaining.UiInstance
close()
close()
Deprecated. This function is deprecated and should not be used in new scripts.
Close the app.
This will only work if the app is being shown as a dialog, such as in a Google Spreadsheet. It will have no effect when called on an app that is published as a standalone service.
Return
— the application itself, useful for chaining.UiInstance
createAbsolutePanel()
createAbsolutePanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.AbsolutePanel
Return
— the new AbsolutePanel.AbsolutePanel
createAnchor(text, asHtml, href)
createAnchor(text, asHtml, href)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.
Anchor
This is essentially a hyperlink and represents an <a>
element.
This widget is based on GWT's anchor class.
Parameters
Name | Type | Description |
---|---|---|
text | String | the text to display to the user as the anchor's text. |
asHtml | Boolean | whether to render that text as HTML. |
href | String | the address to go to when the anchor is clicked. |
Return
— the new Anchor.Anchor
createAnchor(text, href)
createAnchor(text, href)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.
Anchor
This is essentially a hyperlink and represents an <a>
element.
This widget is based on GWT's anchor class.
Parameters
Name | Type | Description |
---|---|---|
text | String | the text to display to the user as the anchor's text. |
href | String | the address to go to when the anchor is clicked. |
Return
— the new Anchor.Anchor
createButton()
createButton()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.Button
Return
— the new Button.Button
createButton(html)
createButton(html)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.Button
Parameters
Name | Type | Description |
---|---|---|
html | String | the new Button's text, rendered as HTML. |
Return
— the new Button.Button
createButton(html, clickHandler)
createButton(html, clickHandler)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.Button
Parameters
Name | Type | Description |
---|---|---|
html | String | the new Button's text, rendered as HTML. |
clickHandler |
| a click handler for the new button. This can be a or
a . |
Return
— the new Button.Button
createCaptionPanel()
createCaptionPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.CaptionPanel
Return
— the new CaptionPanel.CaptionPanel
createCaptionPanel(caption)
createCaptionPanel(caption)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.CaptionPanel
Parameters
Name | Type | Description |
---|---|---|
caption | String | the CaptionPanel's caption text, not rendered as HTML. |
Return
— the new CaptionPanel.CaptionPanel
createCaptionPanel(caption, asHtml)
createCaptionPanel(caption, asHtml)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.CaptionPanel
Parameters
Name | Type | Description |
---|---|---|
caption | String | the CaptionPanel's caption text. |
asHtml | Boolean | whether to render the caption text as HTML. |
Return
— the new CaptionPanel.CaptionPanel
createCheckBox()
createCheckBox()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.CheckBox
Return
— the new CheckBox.CheckBox
createCheckBox(label)
createCheckBox(label)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.CheckBox
Parameters
Name | Type | Description |
---|---|---|
label | String | the CheckBox's label text, not rendered as HTML. |
Return
— the new CheckBox.CheckBox
createCheckBox(label, asHtml)
createCheckBox(label, asHtml)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.CheckBox
Parameters
Name | Type | Description |
---|---|---|
label | String | the CheckBox's label text. |
asHtml | Boolean | whether to render the label text as HTML. |
Return
— the new CheckBox.CheckBox
createClientHandler()
createClientHandler()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.
ClientHandler
A ClientHandler can be used anywhere a ServerHandler can be. See the documentation of
and the User Guide to understand how to specify what a ClientHandler will
do in response to an event.ClientHandler
Return
— the new ClientHandler.ClientHandler
createDateBox()
createDateBox()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.DateBox
Return
— the new DateBox.DateBox
createDatePicker()
createDatePicker()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.DatePicker
Return
— the new DatePicker.DatePicker
createDecoratedStackPanel()
createDecoratedStackPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.DecoratedStackPanel
Return
— the new DecoratedStackPanel.DecoratedStackPanel
createDecoratedTabBar()
createDecoratedTabBar()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.DecoratedTabBar
Return
— the new DecoratedTabBar.DecoratedTabBar
createDecoratedTabPanel()
createDecoratedTabPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.DecoratedTabPanel
Return
— the new DecoratedTabPanel.DecoratedTabPanel
createDecoratorPanel()
createDecoratorPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.DecoratorPanel
Return
— the new DecoratorPanel.DecoratorPanel
createDialogBox()
createDialogBox()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.
DialogBox
The dialog will not auto-hide and is not modal.
Return
— the new DialogBox.DialogBox
createDialogBox(autoHide)
createDialogBox(autoHide)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.
DialogBox
The dialog is not modal.
Parameters
Name | Type | Description |
---|---|---|
autoHide | Boolean | whether the dialog should auto-hide when the user clicks outside of it. |
Return
— the new DialogBox.DialogBox
createDialogBox(autoHide, modal)
createDialogBox(autoHide, modal)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.DialogBox
Parameters
Name | Type | Description |
---|---|---|
autoHide | Boolean | whether the dialog should auto-hide when the user clicks outside of it. |
modal | Boolean | whether the dialog is modal, meaning that keyboard or mouse events that do not target the DialogBox or its children will be ignored. |
Return
— the new DialogBox.DialogBox
createDocsListDialog()
createDocsListDialog()
Deprecated. This function is deprecated and should not be used in new scripts.
Create a new
.DocsListDialog
Return
— the new DocsListDialog.DocsListDialog
createFileUpload()
createFileUpload()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.FileUpload
Return
— the new FileUpload.FileUpload
createFlexTable()
createFlexTable()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.FlexTable
Return
— the new FlexTable.FlexTable
createFlowPanel()
createFlowPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.FlowPanel
Return
— the new FlowPanel.FlowPanel
createFocusPanel()
createFocusPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.FocusPanel
Return
— the new FocusPanel.FocusPanel
createFocusPanel(child)
createFocusPanel(child)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with a specified child FocusPanel
.Widget
Parameters
Name | Type | Description |
---|---|---|
child |
| the child widget. |
Return
— the new FocusPanel.FocusPanel
createFormPanel()
createFormPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.FormPanel
Return
— the new FormPanel.FormPanel
createGrid()
createGrid()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.
Grid
Until the Grid is explicitly resized, no widgets can't be added to it.
Return
— the new Grid.Grid
createGrid(rows, columns)
createGrid(rows, columns)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with a specified size.Grid
Parameters
Name | Type | Description |
---|---|---|
rows | Integer | the number of rows |
columns | Integer | the number of columns |
Return
— the new Grid.Grid
createHTML()
createHTML()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with no text.HTML
Return
— the new HTML.HTML
createHTML(html)
createHTML(html)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with the specified text.HTML
Parameters
Name | Type | Description |
---|---|---|
html | String | the HTML's text, rendered as HTML. |
Return
— the new HTML.HTML
createHTML(html, wordWrap)
createHTML(html, wordWrap)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with the specified text.HTML
Parameters
Name | Type | Description |
---|---|---|
html | String | the HTML's text, rendered as HTML. |
wordWrap | Boolean | whether to allow the text to wrap. |
Return
— the new HTML.HTML
createHidden()
createHidden()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.Hidden
Return
— the new Hidden.Hidden
createHidden(name)
createHidden(name)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with a specified name.Hidden
Parameters
Name | Type | Description |
---|---|---|
name | String | the hidden field's name. |
Return
— the new Hidden.Hidden
createHidden(name, value)
createHidden(name, value)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with a specified name and value.Hidden
Parameters
Name | Type | Description |
---|---|---|
name | String | the hidden field's name. |
value | String | the hidden field's value. |
Return
— the new Hidden.Hidden
createHorizontalPanel()
createHorizontalPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.HorizontalPanel
Return
— the new HorizontalPanel.HorizontalPanel
createImage()
createImage()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.Image
Return
— the new Image.Image
createImage(url)
createImage(url)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with the specified URL.Image
Parameters
Name | Type | Description |
---|---|---|
url | String | the URL of the image. |
Return
— the new Image.Image
createImage(url, left, top, width, height)
createImage(url, left, top, width, height)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with the specified URL and clipping rectangle.Image
Parameters
Name | Type | Description |
---|---|---|
url | String | the URL of the image. |
left | Integer | the left of the clipping rectangle, in pixels. |
top | Integer | the top of the clipping rectangle, in pixels. |
width | Integer | the width of the clipping rectangle, in pixels. |
height | Integer | the height of the clipping rectangle, in pixels. |
Return
— the new Image.Image
createInlineLabel()
createInlineLabel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with no text.InlineLabel
Return
— the new InlineLabel.InlineLabel
createInlineLabel(text)
createInlineLabel(text)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with the specified text.InlineLabel
Parameters
Name | Type | Description |
---|---|---|
text | String | the label's text, not rendered as HTML. |
Return
— the new InlineLabel.InlineLabel
createLabel()
createLabel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with no text.Label
Return
— the new Label.Label
createLabel(text)
createLabel(text)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with the specified text.Label
Parameters
Name | Type | Description |
---|---|---|
text | String | the label's text, not rendered as HTML. |
Return
— the new Label.Label
createLabel(text, wordWrap)
createLabel(text, wordWrap)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with the specified text.Label
Parameters
Name | Type | Description |
---|---|---|
text | String | the label's text, not rendered as HTML. |
wordWrap | Boolean | whether to allow the text to wrap. |
Return
— the new Label.Label
createListBox()
createListBox()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.
ListBox
The ListBox will not allow multiple selections.
Return
— the new ListBox.ListBox
createListBox(isMultipleSelect)
createListBox(isMultipleSelect)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.ListBox
Parameters
Name | Type | Description |
---|---|---|
isMultipleSelect | Boolean | whether the ListBox should allow multiple selections. |
Return
— the new ListBox.ListBox
createMenuBar()
createMenuBar()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.
MenuBar
The MenuBar will display itself horizontally.
Return
— the new MenuBar.MenuBar
createMenuBar(vertical)
createMenuBar(vertical)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.MenuBar
Parameters
Name | Type | Description |
---|---|---|
vertical | Boolean | whether the MenuBar should display itself vertically. |
Return
— the new MenuBar.MenuBar
createMenuItem(text, asHtml, command)
createMenuItem(text, asHtml, command)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.MenuItem
Parameters
Name | Type | Description |
---|---|---|
text | String | the text to display for this item. |
asHtml | Boolean | whether to render that text as HTML. |
command |
| the or to invoke when this item is
selected. |
Return
— the new MenuItem.MenuItem
createMenuItem(text, command)
createMenuItem(text, command)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.MenuItem
Parameters
Name | Type | Description |
---|---|---|
text | String | the text to display for this item. |
command |
| the or to invoke when this item is
selected. |
Return
— the new MenuItem.MenuItem
createMenuItemSeparator()
createMenuItemSeparator()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.MenuItemSeparator
Return
— the new MenuItemSeparator.MenuItemSeparator
createPasswordTextBox()
createPasswordTextBox()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.PasswordTextBox
Return
— the new PasswordTextBox.PasswordTextBox
createPopupPanel()
createPopupPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.
PopupPanel
The panel will not auto-hide and is not modal.
Return
— the new PopupPanel.PopupPanel
createPopupPanel(autoHide)
createPopupPanel(autoHide)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.
PopupPanel
The panel is not modal.
Parameters
Name | Type | Description |
---|---|---|
autoHide | Boolean | whether the panel should auto-hide when the user clicks outside of it. |
Return
— the new PopupPanel.PopupPanel
createPopupPanel(autoHide, modal)
createPopupPanel(autoHide, modal)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.PopupPanel
Parameters
Name | Type | Description |
---|---|---|
autoHide | Boolean | whether the panel should auto-hide when the user clicks outside of it. |
modal | Boolean | whether the panel is modal, meaning that keyboard or mouse events that do not target the PopupPanel or its children will be ignored. |
Return
— the new PopupPanel.PopupPanel
createPushButton()
createPushButton()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.PushButton
Return
— the new PushButton.PushButton
createPushButton(upText)
createPushButton(upText)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.PushButton
Parameters
Name | Type | Description |
---|---|---|
upText | String | the up text |
Return
— the new PushButton.PushButton
createPushButton(upText, clickHandler)
createPushButton(upText, clickHandler)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.PushButton
Parameters
Name | Type | Description |
---|---|---|
upText | String | the up text |
clickHandler |
| a click handler for the new button. This can be a or
a . |
Return
— the new PushButton.PushButton
createPushButton(upText, downText)
createPushButton(upText, downText)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.PushButton
Parameters
Name | Type | Description |
---|---|---|
upText | String | the up text |
downText | String | the down text. |
Return
— the new PushButton.PushButton
createPushButton(upText, downText, clickHandler)
createPushButton(upText, downText, clickHandler)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.PushButton
Parameters
Name | Type | Description |
---|---|---|
upText | String | the up text |
downText | String | the down text. |
clickHandler |
| a click handler for the new button. This can be a or
a . |
Return
— the new PushButton.PushButton
createRadioButton(name)
createRadioButton(name)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.RadioButton
Parameters
Name | Type | Description |
---|---|---|
name | String | the RadioButton's name. Names are used for grouping RadioButtons; see the
documentation of for more details. |
Return
— the new RadioButton.RadioButton
createRadioButton(name, label)
createRadioButton(name, label)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.RadioButton
Parameters
Name | Type | Description |
---|---|---|
name | String | the RadioButton's name. Names are used for grouping RadioButtons; see the
documentation of for more details. |
label | String | the RadioButton's label text, not rendered as HTML. |
Return
— the new RadioButton.RadioButton
createRadioButton(name, label, asHtml)
createRadioButton(name, label, asHtml)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.RadioButton
Parameters
Name | Type | Description |
---|---|---|
name | String | the RadioButton's name. Names are used for grouping RadioButtons; see the
documentation of for more details. |
label | String | the RadioButton's label text. |
asHtml | Boolean | whether to render that text as HTML. |
Return
— the new RadioButton.RadioButton
createResetButton()
createResetButton()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.ResetButton
Return
— the new ResetButton.ResetButton
createResetButton(html)
createResetButton(html)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.ResetButton
Parameters
Name | Type | Description |
---|---|---|
html | String | the text to show on the button, rendered as HTML. |
Return
— the new ResetButton.ResetButton
createResetButton(html, clickHandler)
createResetButton(html, clickHandler)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.ResetButton
Parameters
Name | Type | Description |
---|---|---|
html | String | the text to show on the button, rendered as HTML. |
clickHandler |
| a click handler for the new button. This can be a or
a . |
Return
— the new ResetButton.ResetButton
createScrollPanel()
createScrollPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.ScrollPanel
Return
— the new ScrollPanel.ScrollPanel
createScrollPanel(child)
createScrollPanel(child)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with a specified child ScrollPanel
.Widget
Parameters
Name | Type | Description |
---|---|---|
child |
| the child widget. |
Return
— the new ScrollPanel.ScrollPanel
createServerBlurHandler()
createServerBlurHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerBlurHandler(functionName)
createServerBlurHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerChangeHandler()
createServerChangeHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerChangeHandler(functionName)
createServerChangeHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerClickHandler()
createServerClickHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerClickHandler(functionName)
createServerClickHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerCloseHandler()
createServerCloseHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerCloseHandler(functionName)
createServerCloseHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerCommand()
createServerCommand()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerCommand(functionName)
createServerCommand(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerErrorHandler()
createServerErrorHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerErrorHandler(functionName)
createServerErrorHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerFocusHandler()
createServerFocusHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerFocusHandler(functionName)
createServerFocusHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerHandler()
createServerHandler()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.
ServerHandler
Server handlers are used by scripts to launch script functions in response to events in the
application. For example, a server handler can be added to a Button
with the
addClickHandler
method so that the handler will be invoked when the button is clicked.
Return
— a new ServerHandler object.ServerHandler
createServerHandler(functionName)
createServerHandler(functionName)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.
ServerHandler
Server handlers are used by scripts to launch script functions in response to events in the
application. For example, a server handler can be added to a Button
with the
addClickHandler
method so that the handler will be invoked when the button is clicked.
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerInitializeHandler()
createServerInitializeHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerInitializeHandler(functionName)
createServerInitializeHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerKeyHandler()
createServerKeyHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerKeyHandler(functionName)
createServerKeyHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerLoadHandler()
createServerLoadHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerLoadHandler(functionName)
createServerLoadHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerMouseHandler()
createServerMouseHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerMouseHandler(functionName)
createServerMouseHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerScrollHandler()
createServerScrollHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerScrollHandler(functionName)
createServerScrollHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerSelectionHandler()
createServerSelectionHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerSelectionHandler(functionName)
createServerSelectionHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerSubmitHandler()
createServerSubmitHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerSubmitHandler(functionName)
createServerSubmitHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createServerValueChangeHandler()
createServerValueChangeHandler()
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Return
— a new ServerHandler object.ServerHandler
createServerValueChangeHandler(functionName)
createServerValueChangeHandler(functionName)
Deprecated. use a ServerHandler anywhere you would have used this.
Deprecated in favor of
.ServerHandler
Parameters
Name | Type | Description |
---|---|---|
functionName | String | a script function that will be executed when this handler is invoked. |
Return
— a new ServerHandler object.ServerHandler
createSimpleCheckBox()
createSimpleCheckBox()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.SimpleCheckBox
Return
— the new SimpleCheckBox.SimpleCheckBox
createSimplePanel()
createSimplePanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.SimplePanel
Return
— the new SimplePanel.SimplePanel
createSimpleRadioButton(name)
createSimpleRadioButton(name)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.SimpleRadioButton
Parameters
Name | Type | Description |
---|---|---|
name | String | the SimpleRadioButton's name. Names are used for grouping RadioButtons; see the
documentation of for more details. |
Return
— the new SimpleRadioButton.SimpleRadioButton
createSplitLayoutPanel()
createSplitLayoutPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.SplitLayoutPanel
Return
— the new SplitLayoutPanel.SplitLayoutPanel
createStackPanel()
createStackPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.StackPanel
Return
— the new StackPanel.StackPanel
createSubmitButton()
createSubmitButton()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.SubmitButton
Return
— the new SubmitButton.SubmitButton
createSubmitButton(html)
createSubmitButton(html)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.SubmitButton
Parameters
Name | Type | Description |
---|---|---|
html | String | the text to show on the button, rendered as HTML. |
Return
— the new SubmitButton.SubmitButton
createSuggestBox()
createSuggestBox()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.SuggestBox
Return
— the new SuggestBox.SuggestBox
createTabBar()
createTabBar()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.TabBar
Return
— the new TabBar.TabBar
createTabPanel()
createTabPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.TabPanel
Return
— the new TabPanel.TabPanel
createTextArea()
createTextArea()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.TextArea
Return
— the new TextArea.TextArea
createTextBox()
createTextBox()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.TextBox
Return
— the new TextBox.TextBox
createToggleButton()
createToggleButton()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.ToggleButton
Return
— the new ToggleButton.ToggleButton
createToggleButton(upText)
createToggleButton(upText)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.ToggleButton
Parameters
Name | Type | Description |
---|---|---|
upText | String | the up text |
Return
— the new ToggleButton.ToggleButton
createToggleButton(upText, clickHandler)
createToggleButton(upText, clickHandler)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.ToggleButton
Parameters
Name | Type | Description |
---|---|---|
upText | String | the up text |
clickHandler |
| a click handler for the new button. This can be a or
a . |
Return
— the new ToggleButton.ToggleButton
createToggleButton(upText, downText)
createToggleButton(upText, downText)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.ToggleButton
Parameters
Name | Type | Description |
---|---|---|
upText | String | the up text |
downText | String | the down text. |
Return
— the new ToggleButton.ToggleButton
createTree()
createTree()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.Tree
Return
— the new Tree.Tree
createTreeItem()
createTreeItem()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.TreeItem
Return
— the new TreeItem.TreeItem
createTreeItem(text)
createTreeItem(text)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with the given text.TreeItem
Parameters
Name | Type | Description |
---|---|---|
text | String | the tree item's text, not rendered as HTML. |
Return
— the new TreeItem.TreeItem
createTreeItem(child)
createTreeItem(child)
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
with the given widget.TreeItem
Parameters
Name | Type | Description |
---|---|---|
child |
| the widget to display on the item. |
Return
— the new TreeItem.TreeItem
createVerticalPanel()
createVerticalPanel()
Deprecated. This function is deprecated and should not be used in new scripts.
Creates a new
.VerticalPanel
Return
— the new VerticalPanel.VerticalPanel
getElementById(id)
getElementById(id)
Deprecated. This function is deprecated and should not be used in new scripts.
Retrieves a generic reference to an element stored in the application, by its id.
The reference is not 'aware' of whether any such widget actually exists. If there is no widget with the given id, or if there is such a widget but the method you call on it does not exist for that widget type, this will cause an error on the client when the UiInstance is returned.
This can be used to get existing widgets in the application when writing event handling
code. To set a widget's id, use the method setId
of the target widget. For Example:
function doGet() {
var app = UiApp.createApplication();
// create a label and set its id to 'labelId'
var label = app.createLabel("Hello").setId('labelId');
var button = app.createButton("OK", app.createServerHandler('onClick'));
app.add(label).add(button);
return app;
}
function onClick(event) {
var app = UiApp.getActiveApplication();
// retrieve the label from the application by id
var label = app.getElementById('labelId');
label.setText("World!");
return app;
}
Parameters
Name | Type | Description |
---|---|---|
id | String | the id of the requested widget. |
Return
— a reference to a widget with that idComponent
getId()
getId()
Deprecated. This function is deprecated and should not be used in new scripts.
Returns the id that has been assigned to this object.
This can be used in conjunction with app.getElementById() to retrieve a reference to this object.
Return
String
— the id that has been assigned to this object
isStandardsMode()
isStandardsMode()
Deprecated. This function is deprecated and should not be used in new scripts.
Gets whether the UiApp displays in HTML 'standards' mode or in 'quirks' mode.
Return
Boolean
— whether the UiApp displays in HTML 'standards' mode or in 'quirks' mode
loadComponent(componentName)
loadComponent(componentName)
Deprecated. This function is deprecated and should not be used in new scripts.
Load a GUI Builder component into UiApp, by name.
Parameters
Name | Type | Description |
---|---|---|
componentName | String | the name of the component to load |
Return
— the component, which can be added to an appComponent
loadComponent(componentName, optAdvancedArgs)
loadComponent(componentName, optAdvancedArgs)
Deprecated. This function is deprecated and should not be used in new scripts.
Load a GUI Builder component into UiApp, by name.
Parameters
Name | Type | Description |
---|---|---|
componentName | String | the name of the component to load |
optAdvancedArgs | Object | an object with advanced settings such as 'prefix', which gets added to the id of any widget inside the component, and 'z-index', which specifies a base z-index that gets added to the z-index of any widgets inside the component. |
Return
— the component, which can be added to an appComponent
remove(index)
remove(index)
Deprecated. This function is deprecated and should not be used in new scripts.
Remove the widget with the given index from the application. Indexes begin from 0. This will fail if the index is greater than or equal to the number of elements in the application.
Parameters
Name | Type | Description |
---|---|---|
index | Integer | the index of the widget to remove. |
Return
— the application itself, useful for chaining.UiInstance
remove(widget)
remove(widget)
Deprecated. This function is deprecated and should not be used in new scripts.
Remove the given widget from the application. This will fail if the widget is not actually a child of the application.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to remove. |
Return
— the application itself, useful for chaining.UiInstance
setHeight(height)
setHeight(height)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets the application's height.
This affects the height of the application when run as a service or the height of a dialog when an application is shown inside a spreadsheet.
Parameters
Name | Type | Description |
---|---|---|
height | Integer | the new height value in pixels. |
Return
— the application itself, useful for chaining.UiInstance
setStandardsMode(standardsMode)
setStandardsMode(standardsMode)
Deprecated. This function is deprecated and should not be used in new scripts.
Set whether the UiApp displays in HTML 'standards' mode or in 'quirks' mode.
By default UiApp uses 'quirks' mode unless you use a GUI Builder component with loadComponent, in which case it defaults to 'standards'.
Parameters
Name | Type | Description |
---|---|---|
standardsMode | Boolean | whether to use standards mode |
Return
— this UiInstance, useful for chainingUiInstance
setStyleAttribute(attribute, value)
setStyleAttribute(attribute, value)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets one of the application's style attributes to a new value.
Possible attributes are the same as those available in CSS style sheets. Since some CSS code may be malicious, attributes are whitelisted explicitly and therefore some CSS attributes may not be available.
The following example shows an application which background and text color is changed:
function doGet() {
var app = UiApp.createApplication();
// Change the app's background to black and
// text color to green
app.setStyleAttribute("background", "black")
.setStyleAttribute("color", "green");
// create a label
var label = app.createLabel("Hello World!");
app.add(label)
return app;
}
Parameters
Name | Type | Description |
---|---|---|
attribute | String | the CSS attribute, in camelCase. ("fontSize", not "font-size"). |
value | String | the CSS value |
Return
— the application itself, useful for chaining.UiInstance
setTitle(title)
setTitle(title)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets the title of the application.
If this application will be run as a service, this will be used as the title of the page. If this application will be run as a dialog (for example inside a spreadsheet) it will be the title of the dialog's window.
Parameters
Name | Type | Description |
---|---|---|
title | String | the string to be used as the application's title. |
Return
— the application itself, useful for chaining.UiInstance
setWidth(width)
setWidth(width)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets the application's width.
This affects the width of the application when run as a service or the width of a dialog when an application is shown inside a spreadsheet.
Parameters
Name | Type | Description |
---|---|---|
width | Integer | the new width value in pixels. |
Return
— the application itself, useful for chaining.UiInstance