Google Apps Script

Class SplitLayoutPanel

A panel that adds user-positioned splitters between each of its child widgets.

This panel is similar to a DockLayoutPanel, but each pair of child widgets has a splitter between them that the user can drag.

Internally, UiApp widgets are built on top of the Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation directly. You can find the SplitLayoutPanel documentation here.

Methods

MethodReturn typeBrief description
add(widget)SplitLayoutPanelAdds a widget at the center of the dock.
addEast(widget, width)SplitLayoutPanelAdds a widget to the east edge of the dock.
addNorth(widget, height)SplitLayoutPanelAdds a widget to the north edge of the dock.
addSouth(widget, height)SplitLayoutPanelAdds a widget to the east edge of the dock.
addStyleDependentName(styleName)SplitLayoutPanelSets the dependent style name of this SplitLayoutPanel.
addStyleName(styleName)SplitLayoutPanelAdds a style name to this SplitLayoutPanel.
addWest(widget, width)SplitLayoutPanelAdds a widget to the west edge of the dock.
clear()SplitLayoutPanelRemove all widgets from the SplitLayoutPanel.
getId()StringReturns the id that has been assigned to this object.
getTag()StringGets the text tag of this SplitLayoutPanel.
getType()StringGets the type of this object.
remove(index)SplitLayoutPanelRemove the widget with the given index from the SplitLayoutPanel.
remove(widget)SplitLayoutPanelRemove the given widget from the SplitLayoutPanel.
setHeight(height)SplitLayoutPanelSets the height of this SplitLayoutPanel.
setId(id)SplitLayoutPanelSets the id of this SplitLayoutPanel.
setPixelSize(width, height)SplitLayoutPanelSets the size of this SplitLayoutPanel in pixels.
setSize(width, height)SplitLayoutPanelSets the size of this SplitLayoutPanel.
setStyleAttribute(attribute, value)SplitLayoutPanelSets one of this SplitLayoutPanel's style attributes to a new value.
setStyleAttributes(attributes)SplitLayoutPanelSets this SplitLayoutPanel's style attributes.
setStyleName(styleName)SplitLayoutPanelSets the style name of this SplitLayoutPanel.
setStylePrimaryName(styleName)SplitLayoutPanelSets the primary style name of this SplitLayoutPanel.
setTag(tag)SplitLayoutPanelSets the text tag of this SplitLayoutPanel.
setTitle(title)SplitLayoutPanelSets the hover title of this SplitLayoutPanel.
setVisible(visible)SplitLayoutPanelSets whether this SplitLayoutPanel is visible.
setWidgetMinSize(widget, minSize)SplitLayoutPanelSets the minimum allowable size for the given widget.
setWidth(width)SplitLayoutPanelSets the width of this SplitLayoutPanel.

Detailed documentation

add(widget)

Adds a widget at the center of the dock. No further widgets may be added after this one.

Parameters

NameTypeDescription
widgetWidgetthe widget to add.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


addEast(widget, width)

Adds a widget to the east edge of the dock.

Parameters

NameTypeDescription
widgetWidgetthe widget to add.
widthNumberthe width of the widget, in pixels.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


addNorth(widget, height)

Adds a widget to the north edge of the dock.

Parameters

NameTypeDescription
widgetWidgetthe widget to add.
heightNumberthe height of the widget, in pixels.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


addSouth(widget, height)

Adds a widget to the east edge of the dock.

Parameters

NameTypeDescription
widgetWidgetthe widget to add.
heightNumberthe height of the widget, in pixels.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


addStyleDependentName(styleName)

Sets the dependent style name of this SplitLayoutPanel.

This is useful for debugging but is otherwise of minimal use since there is no way to use custom stylesheets in UiApp.

Parameters

NameTypeDescription
styleNameStringthe new style name.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


addStyleName(styleName)

Adds a style name to this SplitLayoutPanel.

This is useful for debugging but is otherwise of minimal use since there is no way to use custom stylesheets in UiApp.

Parameters

NameTypeDescription
styleNameStringthe new style name.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


addWest(widget, width)

Adds a widget to the west edge of the dock.

Parameters

NameTypeDescription
widgetWidgetthe widget to add.
widthNumberthe width of the widget, in pixels.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


clear()

Remove all widgets from the SplitLayoutPanel.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


getId()

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


getTag()

Gets the text tag of this SplitLayoutPanel.

Return

String — the text tag.


getType()

Gets the type of this object.

Return

String — the object type


remove(index)

Remove the widget with the given index from the SplitLayoutPanel. Indexes begin from 0. This will fail if the index is greater than or equal to the number of elements in the SplitLayoutPanel.

Parameters

NameTypeDescription
indexIntegerthe index of the widget to remove.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


remove(widget)

Remove the given widget from the SplitLayoutPanel. This will fail if the widget is not actually a child of the SplitLayoutPanel.

Parameters

NameTypeDescription
widgetWidgetthe widget to remove.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


setHeight(height)

Sets the height of this SplitLayoutPanel.

Parameters

NameTypeDescription
heightStringthe new height in any CSS unit such as "10px" or "50%".

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


setId(id)

Sets the id of this SplitLayoutPanel.

Parameters

NameTypeDescription
idStringthe new id, which can be used to retrieve the SplitLayoutPanel from app.getElementById(id).

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


setPixelSize(width, height)

Sets the size of this SplitLayoutPanel in pixels.

Parameters

NameTypeDescription
widthIntegerthe new width in pixels.
heightIntegerthe new height in pixels.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


setSize(width, height)

Sets the size of this SplitLayoutPanel.

Parameters

NameTypeDescription
widthStringthe new width in any CSS unit such as "10px" or "50%".
heightStringthe new height in any CSS unit such as "10px" or "50%".

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


setStyleAttribute(attribute, value)

Sets one of this SplitLayoutPanel's style attributes to a new value. Valid attributes are listed here; the values for each attribute are the same as those available in CSS style sheets.

 
// Change the widget's background to black and text color to green.
 widget.setStyleAttribute("background", "black")
     .setStyleAttribute("color", "green");
 

Parameters

NameTypeDescription
attributeStringthe CSS attribute, in camel-case ("fontSize", not "font-size"), as listed here
valueStringthe CSS value

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


setStyleAttributes(attributes)

Sets this SplitLayoutPanel's style attributes. This is a convenience method that is equivalent to calling setStyleAttribute with every key/value pair in the attributes object. Valid attributes are listed here; the values for each attribute are the same as those available in CSS style sheets.

 
// Change the widget's background to black and text color to green.
 widget.setStyleAttributes({background: "black", color: "green"});
 

Parameters

NameTypeDescription
attributesObjectan object of key/value pairs for the CSS attributes and values to set; valid attributes are listed here

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


setStyleName(styleName)

Sets the style name of this SplitLayoutPanel.

This is useful for debugging but is otherwise of minimal use since there is no way to use custom stylesheets in UiApp.

Parameters

NameTypeDescription
styleNameStringthe new style name.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


setStylePrimaryName(styleName)

Sets the primary style name of this SplitLayoutPanel.

This is useful for debugging but is otherwise of minimal use since there is no way to use custom stylesheets in UiApp.

Parameters

NameTypeDescription
styleNameStringthe new style name.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


setTag(tag)

Sets the text tag of this SplitLayoutPanel.

Parameters

NameTypeDescription
tagStringthe new text tag, which can be anything you wish to store with the widget.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


setTitle(title)

Sets the hover title of this SplitLayoutPanel.

Not all browsers will show this.

Parameters

NameTypeDescription
titleStringthe hover title.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


setVisible(visible)

Sets whether this SplitLayoutPanel is visible.

Parameters

NameTypeDescription
visibleBooleanwhether this SplitLayoutPanel should be visible or not.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


setWidgetMinSize(widget, minSize)

Sets the minimum allowable size for the given widget.

The associated splitter cannot be dragged to a position that would make it smaller than this size. This method has no effect for the center widget. This will cause an error if the widget is not a child of this SplitLayoutPanel.

Parameters

NameTypeDescription
widgetWidgetthe widget whose minimum size is being set.
minSizeIntegerthe minimum size, in pixels.

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.


setWidth(width)

Sets the width of this SplitLayoutPanel.

Parameters

NameTypeDescription
widthStringthe new width in any CSS unit such as "10px" or "50%".

Return

SplitLayoutPanel — the SplitLayoutPanel itself, useful for chaining.

Deprecated methods

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.