Class SplitPane

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, HasClearHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasRuleContextChangedHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasVisibilityChangedHandlers, HasDownClickHandlers, HasMembersChangedHandlers, HasNavigationClickHandlers, HasPaneChangedHandlers, HasUpClickHandlers
Direct Known Subclasses:
NavPanel

A device- and orientation-sensitive layout that implements the common pattern of rendering two panes side-by-side on desktop machines and on tablets in landscape orientation, while switching to showing a single pane for handset-sized devices or tablets in portrait orientation (this type of behavior is sometimes called "responsive design").

A SplitPane can manage either two or three panes — a navigationPane and the detailPane are required, and a listPane can also be provided which appears in the same place as the navigation pane, with built-in navigation between the panes based on NavigationBar. An example of 3-pane usage would be an email application:

  • navigationPane: TreeGrid of folders
  • listPane: ListGrid showing messages in a folder
  • detailPane: message detail view (perhaps a DetailViewer over an HTMLFlow or similar arrangement)

The placement of the panes is by default sensitive to whether the device is detected as a handset (phone), tablet or desktop device (see DeviceMode) and to the current PageOrientation. You can also configure a SplitPane with a fixed pageOrientation or deviceMode.

Beyond providing the panes listed above, typical usage is simply to call showListPane() and showDetailPane() when the SplitPane should navigate to a new pane. For example, in an email application, clicking on a folder in the navigationPane should cause the listPane to show messages from the folder, then showListPane("folder name") would be called to show the listPane and give it a new title reflecting the name of the folder.

Similarly, clicking on a message in the listPane should show the message details in the detailPane and call showDetailPane("message title") to reveal the detailPane and give it an appropriate title.

Auto-Navigation

By default, SplitPane will analyze the controls placed in each pane and the DataSources they are bound to, and automatically navigate between panes.

For example, in a two-pane SplitPane with a ListGrid in the navigationPane and a DynamicForm in the detailPane, both with the same DataSource, when a record is selected in the grid, DynamicForm.editRecord() will be called to populate the form, and the detailPane will be shown.

In a 3-pane SplitPane with a TreeGrid and ListGrid in the navigationPane and listPane respectively, if there is a 1-to-Many relation from the TreeGrid's DataSource to the ListGrid's DataSource, ListGrid.fetchRelatedData() will be used to load related records when tree nodes are clicked, and the listPane will be shown.

For a full description of auto-navigation, see autoNavigate. Just set autoNavigate to false if you don't want these behaviors.

Automatic control placement

detailToolButtons allows you to define a set of controls that are specially placed based on the deviceMode and pageOrientation. See detailToolButtons for details.

NavigationBar and ToolStrips

By default, bars are created as follows:

  • in deviceMode:"tablet" and deviceMode "handset", the navigationBar is always created.
  • in deviceMode:"desktop", the navigationBar is created by default only if the navigationTitle is specified and non-empty or showRightButton and/or showLeftButton is true, or showNavigationBar is true.
  • in deviceMode:"desktop" and deviceMode "tablet", the detailToolStrip is shown above the detailPane.
  • in deviceMode:"handset", the detailToolStrip is created only if detailToolButtons are specified, and is placed underneath the detailPane.
  • listToolStrip - separate bar for the listPane, only present for deviceMode:"desktop" when a listPane is provided.
All of these bars are AutoChildren and hence completely optional. You can omit them entirely, or, if you want navigation bars or tool strips but want to customize them more than the AutoChild system allows, you can prevent the built-in bars from being created and place your own NavigationBars either inside your navigation, list or detail panes, or outside the SplitPane as a whole. This allows you to completely customize your navigation but still use SplitPane to handle device- and orientation-aware layout. See showNavigationBar, showListToolStrip, and showDetailToolStrip.

Note that in addition to the navigationBar, the other automatically created bars are also instances of NavigationBar despite the "toolStrip" naming convention. These controls will not generally contain navigation elements; the NavigationBar class is used for consistent styling, since the navigationBar appears adjacent to the toolstrips in some modes and orientations, so they should have the same height and styling.

  • Constructor Details

    • SplitPane

      public SplitPane()
    • SplitPane

      public SplitPane(JavaScriptObject jsObj)
    • SplitPane

      public SplitPane(Canvas navigationPane, Canvas detailPane)
    • SplitPane

      public SplitPane(Canvas navigationPane, Canvas listPane, Canvas detailPane)
  • Method Details

    • getOrCreateRef

      public static SplitPane getOrCreateRef(JavaScriptObject jsObj)
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, Canvas defaults)
      Changes the defaults for Canvas AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, FormItem defaults)
      Changes the defaults for FormItem AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • create

      protected JavaScriptObject create()
      Overrides:
      create in class Layout
    • setAddHistoryEntries

      public SplitPane setAddHistoryEntries(boolean addHistoryEntries)
      Should default history-tracking support be enabled? If true, then a history management scheme utilizing History.addHistoryEntry() and History.registerCallback() is enabled. The history callback is registered as an additive callback, allowing other history callbacks including the primary callback to be registered.

      The default history management scheme is as follows:

      The default history management scheme can be supplemented with application-specific history management. For example, when deviceMode is "tablet", the detailPane is always visible, but changes to the content of the detailPane are transparent to the SplitPane. The application can add history entries of its own when the user causes new information to be displayed in the detailPane.

      If this method is called after the component has been drawn/initialized: Setter for addHistoryEntries.

      Parameters:
      addHistoryEntries - the new setting. Default value is false
      Returns:
      SplitPane instance, for chaining setter calls
    • getAddHistoryEntries

      public boolean getAddHistoryEntries()
      Should default history-tracking support be enabled? If true, then a history management scheme utilizing History.addHistoryEntry() and History.registerCallback() is enabled. The history callback is registered as an additive callback, allowing other history callbacks including the primary callback to be registered.

      The default history management scheme is as follows:

      The default history management scheme can be supplemented with application-specific history management. For example, when deviceMode is "tablet", the detailPane is always visible, but changes to the content of the detailPane are transparent to the SplitPane. The application can add history entries of its own when the user causes new information to be displayed in the detailPane.

      Returns:
      Current addHistoryEntries value. Default value is false
    • setAnimateNavigationBarStateChanges

      public SplitPane setAnimateNavigationBarStateChanges(boolean animateNavigationBarStateChanges) throws IllegalStateException
      Whether to animate state changes of the navigationBar. Enabled by default except when the browser is known to have poor animation performance.
      Parameters:
      animateNavigationBarStateChanges - New animateNavigationBarStateChanges value. Default value is true
      Returns:
      SplitPane instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAnimateNavigationBarStateChanges

      public boolean getAnimateNavigationBarStateChanges()
      Whether to animate state changes of the navigationBar. Enabled by default except when the browser is known to have poor animation performance.
      Returns:
      Current animateNavigationBarStateChanges value. Default value is true
      See Also:
    • setAutoNavigate

      public SplitPane setAutoNavigate(boolean autoNavigate) throws IllegalStateException
      If set, the SplitPane will automatically monitor selection changes in the navigationPane and listPane, and call navigateListPane() or navigateDetailPane() when selections are changed.

      If a pane is not a DataBoundComponent, but contains a component (selected via a breadth-first search), then that inner component will be monitored for selection changes instead. In either case, autoNavigate does nothing unless the monitored component has a valid DataSource and there is a DataSource relationship declared between panes. Note that for Layouts, the members will be searched when looking for a component rather than the children.

      Auto-navigation occurs after the recordClick() or selectionUpdated() method is called, so if you implement these methods, your code will run first. Importantly, if your methods call fetchData(), setCriteria(), DynamicForm.editRecord() or DynamicForm.editNewRecord() on the target component, navigation will still occur, but duplicate calls to fetch related data, set data into the target, or start editing the record in the target will be skipped.

      The selection of the pane or pane inner component for monitoring is done only when the SplitPane is created, and when a new navigationPane or listPane is assigned, except when the SplitPane is in edit mode (e.g. when using Reify). where the component redetection logic gets run every time a pane's widget hierarchy changes. Changing the hierarchy under a pane at other times in a way that will affect the breadth-first selection of an inner component may lead to unexpected behavior.

      Note that only one inner component under each pane (or the pane itself) will be monitored, even if multiple inner components might satisfy the related-data requirement.

      Parameters:
      autoNavigate - New autoNavigate value. Default value is true
      Returns:
      SplitPane instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAutoNavigate

      public boolean getAutoNavigate()
      If set, the SplitPane will automatically monitor selection changes in the navigationPane and listPane, and call navigateListPane() or navigateDetailPane() when selections are changed.

      If a pane is not a DataBoundComponent, but contains a component (selected via a breadth-first search), then that inner component will be monitored for selection changes instead. In either case, autoNavigate does nothing unless the monitored component has a valid DataSource and there is a DataSource relationship declared between panes. Note that for Layouts, the members will be searched when looking for a component rather than the children.

      Auto-navigation occurs after the recordClick() or selectionUpdated() method is called, so if you implement these methods, your code will run first. Importantly, if your methods call fetchData(), setCriteria(), DynamicForm.editRecord() or DynamicForm.editNewRecord() on the target component, navigation will still occur, but duplicate calls to fetch related data, set data into the target, or start editing the record in the target will be skipped.

      The selection of the pane or pane inner component for monitoring is done only when the SplitPane is created, and when a new navigationPane or listPane is assigned, except when the SplitPane is in edit mode (e.g. when using Reify). where the component redetection logic gets run every time a pane's widget hierarchy changes. Changing the hierarchy under a pane at other times in a way that will affect the breadth-first selection of an inner component may lead to unexpected behavior.

      Note that only one inner component under each pane (or the pane itself) will be monitored, even if multiple inner components might satisfy the related-data requirement.

      Returns:
      Current autoNavigate value. Default value is true
      See Also:
    • getBackButton

      public NavigationButton getBackButton() throws IllegalStateException
      A NavigationButton shown to the left of the title in the navigationBar.

      In deviceModes other than "desktop", this button is automatically created and allows transitioning back to the navigationPane (in tablet and handset modes) or the listPane (in handset mode). In these deviceModes, setting showLeftButton to true shows the leftButton in addition to the automatically-created back button.

      When deviceMode is "desktop", this button is never shown. See showLeftButton for more information.

      This button's title is determined automatically by the SplitPane. See listTitle and detailTitle.

      This component is an AutoChild named "backButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current backButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setCurrentPane

      public SplitPane setCurrentPane(CurrentPane currentPane)
      The most recently shown pane. In handset DeviceMode, the currentPane is the only pane that is actually visible to the user. In other modes more than one pane can be simultaneously visible, so the currentPane is the most recent pane that was brought into view via a call to setCurrentPane() or showNavigationPane().

      The default value of currentPane is "navigation".

      If this method is called after the component has been drawn/initialized: Reveals the pane indicated by the newPane parameter.

      This has different effects based on the DeviceMode and PageOrientation. For example, in "handset" mode, the new pane will be the only one showing. In other modes such as "desktop", this method may do nothing, but should still be called in order to ensure correct behavior with other DeviceMode settings.

      Parameters:
      currentPane - new pane to show. Default value is "navigation"
      Returns:
      SplitPane instance, for chaining setter calls
    • getCurrentPane

      public CurrentPane getCurrentPane()
      The most recently shown pane. In handset DeviceMode, the currentPane is the only pane that is actually visible to the user. In other modes more than one pane can be simultaneously visible, so the currentPane is the most recent pane that was brought into view via a call to setCurrentPane() or showNavigationPane().

      The default value of currentPane is "navigation".

      Returns:
      Current currentPane value. Default value is "navigation"
    • setDetailNavigationControl

      public SplitPane setDetailNavigationControl(Canvas detailNavigationControl)
      Navigation control that appears only when the navigation pane is not showing (showing detail pane on handset, or portrait mode on tablet).

      See also showMiniNav for a way to enable a built-in control.

      If this method is called after the component has been drawn/initialized: Navigation control that appears only when the navigation pane is not showing (showing detail pane on handset, or portrait mode on tablet).

      Note : This is an advanced setting

      Parameters:
      detailNavigationControl - New detailNavigationControl value. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
    • getDetailNavigationControl

      public Canvas getDetailNavigationControl()
      Navigation control that appears only when the navigation pane is not showing (showing detail pane on handset, or portrait mode on tablet).

      See also showMiniNav for a way to enable a built-in control.

      Returns:
      Current detailNavigationControl value. Default value is null
    • setDetailPane

      public SplitPane setDetailPane(Canvas detailPane)
      The right-hand of the two panes managed by this widget, used for viewing details.

      If this method is called after the component has been drawn/initialized: Sets a new detailPane at runtime.
      Parameters:
      detailPane - new detail pane for this widget. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
    • getDetailPane

      public Canvas getDetailPane()
      The right-hand of the two panes managed by this widget, used for viewing details.
      Returns:
      Current detailPane value. Default value is null
    • setDetailPaneTitleTemplate

      public SplitPane setDetailPaneTitleTemplate(String detailPaneTitleTemplate)
      Default value chosen for detailPaneTitle when navigateDetailPane() is called.

      Available variables are the same as for listPaneTitleTemplate.

      If this method is called after the component has been drawn/initialized: Sets a new detailPaneTitleTemplate at runtime.

      By calling this method it is assumed you want the detail pane title to change to the new template.

      Parameters:
      detailPaneTitleTemplate - new template, can use HTML to be styled. Default value is "${titleField}"
      Returns:
      SplitPane instance, for chaining setter calls
      See Also:
    • getDetailPaneTitleTemplate

      public String getDetailPaneTitleTemplate()
      Default value chosen for detailPaneTitle when navigateDetailPane() is called.

      Available variables are the same as for listPaneTitleTemplate.

      Returns:
      Current detailPaneTitleTemplate value. Default value is "${titleField}"
      See Also:
    • setDetailTitle

      public SplitPane setDetailTitle(String detailTitle)
      The title for the detailPane.

      If this method is called after the component has been drawn/initialized: Sets the title for the detailPane.
      Parameters:
      detailTitle - new title for the detail pane. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
      See Also:
    • getDetailTitle

      public String getDetailTitle()
      The title for the detailPane.
      Returns:
      Current detailTitle value. Default value is null
      See Also:
    • setDetailToolButtons

      public SplitPane setDetailToolButtons(Canvas... detailToolButtons)
      detailToolButtons allows you to specify a set of controls that are specially placed based on the deviceMode and pageOrientation. This is generally useful for a compact strip of ImgButton controls, approximately 5 of which will fit comfortably using typically-sized icons and in the most space-constricted modes.

      These controls are placed as follows:

      • in deviceMode:"desktop" and deviceMode "tablet" with pageOrientation "landscape", detailToolButtons appear in the detailToolStrip shown above of the detailPane.
      • in deviceMode:"handset", detailToolButtons appear in a detailToolStrip underneath the detailPane. This toolstrip is only created in "handset" mode if detailToolButtons are provided.
      • in deviceMode:"tablet" and pageOrientation:"portrait", detailToolButtons appear in splitPane.navigationBar.


      If this method is called after the component has been drawn/initialized: Updates the detailToolButtons at runtime.
      Parameters:
      detailToolButtons - new controls for the toolstrip. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
    • getDetailToolButtons

      public Canvas[] getDetailToolButtons()
      detailToolButtons allows you to specify a set of controls that are specially placed based on the deviceMode and pageOrientation. This is generally useful for a compact strip of ImgButton controls, approximately 5 of which will fit comfortably using typically-sized icons and in the most space-constricted modes.

      These controls are placed as follows:

      • in deviceMode:"desktop" and deviceMode "tablet" with pageOrientation "landscape", detailToolButtons appear in the detailToolStrip shown above of the detailPane.
      • in deviceMode:"handset", detailToolButtons appear in a detailToolStrip underneath the detailPane. This toolstrip is only created in "handset" mode if detailToolButtons are provided.
      • in deviceMode:"tablet" and pageOrientation:"portrait", detailToolButtons appear in splitPane.navigationBar.
      Returns:
      Current detailToolButtons value. Default value is null
    • getDetailToolStrip

      public NavigationBar getDetailToolStrip() throws IllegalStateException
      Toolstrip servicing the detailPane.

      In deviceMode DeviceMode.DESKTOP and deviceMode DeviceMode.TABLET, the detailToolStrip is shown above the detailPane. In deviceMode DeviceMode.HANDSET, the detailToolStrip is created only if detailToolButtons are specified, and is placed underneath the detailPane.

      This component is an AutoChild named "detailToolStrip". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current detailToolStrip value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setDeviceMode

      public SplitPane setDeviceMode(DeviceMode deviceMode) throws IllegalStateException
      UI layout mode used for this SplitPane.

      A SplitPane can be configured with up to 3 panes: the navigationPane, listPane and detailPane. Both DeviceMode and PageOrientation influence the placement of these panes as follows:

      • "handset" deviceMode: only a single pane is shown at a time. Not orientation sensitive
      • "tablet" deviceMode with pageOrientation:"landscape": the detailPane is shown side by side with either the navigationPane or listPane
      • "tablet" deviceMode with pageOrientation:"portrait": the detailPane is shown only. End user navigation that would show the listPane or navigationPane shows those panes on top of the detailPane (temporarily covering part of its content)
      • "desktop" deviceMode: all 3 panes are shown simultaneously. Not orientation sensitive
      The listPane is optional; if not present, wherever the listPane is mentioned above, the navigationPane is shown instead.
      Parameters:
      deviceMode - New deviceMode value. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDeviceMode

      public DeviceMode getDeviceMode()
      UI layout mode used for this SplitPane.

      A SplitPane can be configured with up to 3 panes: the navigationPane, listPane and detailPane. Both DeviceMode and PageOrientation influence the placement of these panes as follows:

      • "handset" deviceMode: only a single pane is shown at a time. Not orientation sensitive
      • "tablet" deviceMode with pageOrientation:"landscape": the detailPane is shown side by side with either the navigationPane or listPane
      • "tablet" deviceMode with pageOrientation:"portrait": the detailPane is shown only. End user navigation that would show the listPane or navigationPane shows those panes on top of the detailPane (temporarily covering part of its content)
      • "desktop" deviceMode: all 3 panes are shown simultaneously. Not orientation sensitive
      The listPane is optional; if not present, wherever the listPane is mentioned above, the navigationPane is shown instead.
      Returns:
      Current deviceMode value. Default value is null
      See Also:
    • setEditProxyConstructor

      public SplitPane setEditProxyConstructor(String editProxyConstructor) throws IllegalStateException
      Default class used to construct the EditProxy for this component when the component is first placed into edit mode.
      Overrides:
      setEditProxyConstructor in class Layout
      Parameters:
      editProxyConstructor - New editProxyConstructor value. Default value is "SplitPaneEditProxy"
      Returns:
      SplitPane instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getEditProxyConstructor

      public String getEditProxyConstructor()
      Default class used to construct the EditProxy for this component when the component is first placed into edit mode.
      Overrides:
      getEditProxyConstructor in class Layout
      Returns:
      Current editProxyConstructor value. Default value is "SplitPaneEditProxy"
      See Also:
    • getLeftButton

      public NavigationButton getLeftButton() throws IllegalStateException
      An additional NavigationButton which may be shown to the left of the title in the navigation bar.

      Important note: by default, this button has no direction and does not fire the navigationClick notification. You can provide a direction and apply a click handler via the autoChild system.

      This component is an AutoChild named "leftButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current leftButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
      See Also:
    • setListPane

      public SplitPane setListPane(Canvas listPane)
      An optional list pane displayed in the left-hand of the panes or in a side panel according to the pane layout.

      If this method is called after the component has been drawn/initialized: Sets a new listPane at runtime.
      Parameters:
      listPane - new list pane for this widget. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
    • getListPane

      public Canvas getListPane()
      An optional list pane displayed in the left-hand of the panes or in a side panel according to the pane layout.
      Returns:
      Current listPane value. Default value is null
    • setListPaneTitleTemplate

      public SplitPane setListPaneTitleTemplate(String listPaneTitleTemplate)
      Default value chosen for listPaneTitle when navigateListPane() is called.

      Available variables are:

      • "titleField" - the value of the DataSource.titleField in the selected record from the navigationPane
      • "index" - position of the selected record
      • "totalRows" - total number of rows in the component where the record is selected
      • "record" - the entire selected Record


      If this method is called after the component has been drawn/initialized: Sets a new listPaneTitleTemplate at runtime.

      By calling this method it is assumed you want the list pane title to change to the new template.

      Parameters:
      listPaneTitleTemplate - new template, can use HTML to be styled. Default value is "${titleField}"
      Returns:
      SplitPane instance, for chaining setter calls
      See Also:
    • getListPaneTitleTemplate

      public String getListPaneTitleTemplate()
      Default value chosen for listPaneTitle when navigateListPane() is called.

      Available variables are:

      • "titleField" - the value of the DataSource.titleField in the selected record from the navigationPane
      • "index" - position of the selected record
      • "totalRows" - total number of rows in the component where the record is selected
      • "record" - the entire selected Record
      Returns:
      Current listPaneTitleTemplate value. Default value is "${titleField}"
      See Also:
    • setListTitle

      public SplitPane setListTitle(String listTitle)
      The title for the listPane.

      If this method is called after the component has been drawn/initialized: Sets the title for the listPane.
      Parameters:
      listTitle - new title for the list pane. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
      See Also:
    • getListTitle

      public String getListTitle()
      The title for the listPane.
      Returns:
      Current listTitle value. Default value is null
      See Also:
    • getListToolStrip

      public NavigationBar getListToolStrip() throws IllegalStateException
      Bar displayed above the listPane, if a listPane is present, only for deviceMode "desktop".

      This component is an AutoChild named "listToolStrip". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current listToolStrip value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • getNavigationBar

      public NavigationBar getNavigationBar() throws IllegalStateException
      A NavigationBar instance managed by this SplitPane that is placed above the navigationPane.

      The following passthroughs apply:

      Note that in deviceMode DeviceMode.DESKTOP with showNavigationBar unset, the navigationBar is automatically hidden when it would be empty (navigationTitle is an empty string and showRightButton and showLeftButton are both false). The navigationBar will be shown if the navigationTitle is set to a non-empty string, or showRightButton or showLeftButton is set to true.

      This component is an AutoChild named "navigationBar". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current navigationBar value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
      See Also:
    • setNavigationPane

      public SplitPane setNavigationPane(Canvas navigationPane)
      An arbitrary widget that is visible in all configurations when the currentPane is CurrentPane.NAVIGATION (it may also be visible when the currentPane is CurrentPane.LIST or CurrentPane.DETAIL).

      The navigationPane is typically used for navigation, to initialize the content of the listPane (when using a listPane) or the detailPane. For example, in an email application the navigationPane pane widget could be a TreeGrid of the inboxes and folders.

      If this method is called after the component has been drawn/initialized: Update the navigationPane at runtime.

      Parameters:
      navigationPane - new navigation pane for this widget. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
    • getNavigationPane

      public Canvas getNavigationPane()
      An arbitrary widget that is visible in all configurations when the currentPane is CurrentPane.NAVIGATION (it may also be visible when the currentPane is CurrentPane.LIST or CurrentPane.DETAIL).

      The navigationPane is typically used for navigation, to initialize the content of the listPane (when using a listPane) or the detailPane. For example, in an email application the navigationPane pane widget could be a TreeGrid of the inboxes and folders.

      Returns:
      Current navigationPane value. Default value is null
    • setNavigationPaneWidth

      public SplitPane setNavigationPaneWidth(int navigationPaneWidth)
      Sets a size for the navigation pane.

      This size is active only on platforms where multiple panes are showing at once; if a single pane is showing, navigationPaneWidth is ignored.

      Note that setting a navigationPaneWidth which creates more size in one of the panes may backfire on mobile, where all panes end up having the same width (the device width). If you make one pane larger to accommodate more controls or content, make sure you use techniques such as showing fewer columns on mobile, or using adaptive components such as AdaptiveMenu.

      If you simply want side-by-side display with arbitrary proportions, and don't care about tablet and mobile adaptation, use HLayout instead.

      Parameters:
      navigationPaneWidth - New navigationPaneWidth value. Default value is 320
      Returns:
      SplitPane instance, for chaining setter calls
      See Also:
    • getNavigationPaneWidth

      public int getNavigationPaneWidth()
      Sets a size for the navigation pane.

      This size is active only on platforms where multiple panes are showing at once; if a single pane is showing, navigationPaneWidth is ignored.

      Note that setting a navigationPaneWidth which creates more size in one of the panes may backfire on mobile, where all panes end up having the same width (the device width). If you make one pane larger to accommodate more controls or content, make sure you use techniques such as showing fewer columns on mobile, or using adaptive components such as AdaptiveMenu.

      If you simply want side-by-side display with arbitrary proportions, and don't care about tablet and mobile adaptation, use HLayout instead.

      Returns:
      Current navigationPaneWidth value. Default value is 320
      See Also:
    • setNavigationPaneWidth

      public SplitPane setNavigationPaneWidth(String navigationPaneWidth)
      Sets a size for the navigation pane.

      This size is active only on platforms where multiple panes are showing at once; if a single pane is showing, navigationPaneWidth is ignored.

      Note that setting a navigationPaneWidth which creates more size in one of the panes may backfire on mobile, where all panes end up having the same width (the device width). If you make one pane larger to accommodate more controls or content, make sure you use techniques such as showing fewer columns on mobile, or using adaptive components such as AdaptiveMenu.

      If you simply want side-by-side display with arbitrary proportions, and don't care about tablet and mobile adaptation, use HLayout instead.

      Parameters:
      navigationPaneWidth - New navigationPaneWidth value. Default value is 320
      Returns:
      SplitPane instance, for chaining setter calls
      See Also:
    • getNavigationPaneWidthAsString

      public String getNavigationPaneWidthAsString()
      Sets a size for the navigation pane.

      This size is active only on platforms where multiple panes are showing at once; if a single pane is showing, navigationPaneWidth is ignored.

      Note that setting a navigationPaneWidth which creates more size in one of the panes may backfire on mobile, where all panes end up having the same width (the device width). If you make one pane larger to accommodate more controls or content, make sure you use techniques such as showing fewer columns on mobile, or using adaptive components such as AdaptiveMenu.

      If you simply want side-by-side display with arbitrary proportions, and don't care about tablet and mobile adaptation, use HLayout instead.

      Returns:
      Current navigationPaneWidth value. Default value is 320
      See Also:
    • setNavigationTitle

      public SplitPane setNavigationTitle(String navigationTitle)
      The title for the navigationPane, displayed in the navigationBar and also used for the title of a back button in some configurations.

      If this method is called after the component has been drawn/initialized: Sets the title for the navigationPane.
      Parameters:
      navigationTitle - new title for the navigation pane. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
      See Also:
    • getNavigationTitle

      public String getNavigationTitle()
      The title for the navigationPane, displayed in the navigationBar and also used for the title of a back button in some configurations.
      Returns:
      Current navigationTitle value. Default value is null
      See Also:
    • setNotifyAfterNavigationClick

      public SplitPane setNotifyAfterNavigationClick(boolean notifyAfterNavigationClick)
      Whether or not to call SplitPane.navigationClick(), if present, after navigation has already occurred. This may be set to provide backcompat with legacy code, as by default the Framework will call SplitPane.navigationClick() before navigation to allow cancelation.

      Note that if this property is set, SplitPane.navigationClick() cannot be canceled.

      Parameters:
      notifyAfterNavigationClick - New notifyAfterNavigationClick value. Default value is false
      Returns:
      SplitPane instance, for chaining setter calls
      See Also:
    • getNotifyAfterNavigationClick

      public boolean getNotifyAfterNavigationClick()
      Whether or not to call SplitPane.navigationClick(), if present, after navigation has already occurred. This may be set to provide backcompat with legacy code, as by default the Framework will call SplitPane.navigationClick() before navigation to allow cancelation.

      Note that if this property is set, SplitPane.navigationClick() cannot be canceled.

      Returns:
      Current notifyAfterNavigationClick value. Default value is false
      See Also:
    • setPageOrientation

      public SplitPane setPageOrientation(PageOrientation pageOrientation)
      Current PageOrientation. The default behavior of the SplitPane is to register for orientation change notifications from the device (see Page.getOrientation()) and automatically change orientation based on the type of device.

      You can instead set a specific value for pageOrientation if you only want to use a specific layout, and not respond to orientation information from the device.

      If this method is called after the component has been drawn/initialized: Explicitly sets the page orientation to a fixed value instead of being responsive to device orientation changes. Pass null to return to responding automatically to device orientation.

      See PageOrientation for details of how page orientation affects layout.

      Parameters:
      pageOrientation - new orientation to use. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
    • getPageOrientation

      public PageOrientation getPageOrientation()
      Current PageOrientation. The default behavior of the SplitPane is to register for orientation change notifications from the device (see Page.getOrientation()) and automatically change orientation based on the type of device.

      You can instead set a specific value for pageOrientation if you only want to use a specific layout, and not respond to orientation information from the device.

      Returns:
      Current pageOrientation value. Default value is null
    • setReverseOrder

      public SplitPane setReverseOrder(Boolean reverseOrder)
      Note: This is a Layout property which is inapplicable on this class. A SplitPane always works from left to right.
      Overrides:
      setReverseOrder in class Layout
      Parameters:
      reverseOrder - New reverseOrder value. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
    • getReverseOrder

      public Boolean getReverseOrder()
      Note: This is a Layout property which is inapplicable on this class. A SplitPane always works from left to right.
      Overrides:
      getReverseOrder in class Layout
      Returns:
      Current reverseOrder value. Default value is null
    • setShowDetailToolStrip

      public SplitPane setShowDetailToolStrip(Boolean showDetailToolStrip)
      If set to false, the detailToolStrip will not be shown. Otherwise, the detailToolStrip will be shown if either the deviceMode is not DeviceMode.HANDSET or detailToolButtons are specified.

      If this method is called after the component has been drawn/initialized: Setter for showDetailToolStrip. Note: If the property is set false after the detailToolStrip autochild has already been created, it will be hidden but not destroyed.
      Parameters:
      showDetailToolStrip - new value. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
    • getShowDetailToolStrip

      public Boolean getShowDetailToolStrip()
      If set to false, the detailToolStrip will not be shown. Otherwise, the detailToolStrip will be shown if either the deviceMode is not DeviceMode.HANDSET or detailToolButtons are specified.
      Returns:
      Current showDetailToolStrip value. Default value is null
    • setShowLeftButton

      public SplitPane setShowLeftButton(boolean showLeftButton)
      Should the leftButton be shown in the navigation bar?

      When set to true, the leftButton is displayed to the left of the navigationTitle, and to the right of the backButton, when deviceMode is not "desktop".



      If this method is called after the component has been drawn/initialized: Show or hide the leftButton in the navigation bar.

      Parameters:
      showLeftButton - if true, the leftButton will be shown, otherwise hidden. Default value is false
      Returns:
      SplitPane instance, for chaining setter calls
      See Also:
      • com.smartgwt.client.widgets.layout.SplitPane#setLeftButton
      • com.smartgwt.client.widgets.layout.SplitPane#setBackButton
    • getShowLeftButton

      public boolean getShowLeftButton()
      Should the leftButton be shown in the navigation bar?

      When set to true, the leftButton is displayed to the left of the navigationTitle, and to the right of the backButton, when deviceMode is not "desktop".

      Returns:
      Current showLeftButton value. Default value is false
      See Also:
    • setShowListToolStrip

      public SplitPane setShowListToolStrip(Boolean showListToolStrip)
      If set to false, the listToolStrip will not be shown. Otherwise, the listToolStrip will be shown if the deviceMode is DeviceMode.DESKTOP and a listPane is provided.

      If this method is called after the component has been drawn/initialized: Setter for showListToolStrip. Note: If the property is set false after the detailToolStrip autochild has already been created, it will be hidden but not destroyed.
      Parameters:
      showListToolStrip - new value. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
    • getShowListToolStrip

      public Boolean getShowListToolStrip()
      If set to false, the listToolStrip will not be shown. Otherwise, the listToolStrip will be shown if the deviceMode is DeviceMode.DESKTOP and a listPane is provided.
      Returns:
      Current showListToolStrip value. Default value is null
    • setShowMiniNav

      public SplitPane setShowMiniNav(Boolean showMiniNav) throws IllegalStateException
      If true, a MiniNavControl will be shown:

      Parameters:
      showMiniNav - New showMiniNav value. Default value is false
      Returns:
      SplitPane instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getShowMiniNav

      public Boolean getShowMiniNav()
      If true, a MiniNavControl will be shown:

      Returns:
      Current showMiniNav value. Default value is false
      See Also:
    • setShowNavigationBar

      public SplitPane setShowNavigationBar(Boolean showNavigationBar)
      If set to false, the navigationBar will not be shown. If set to true, the navigationBar will always be shown, even when the deviceMode is

      If this property is unset, the navigationBar will be shown if at least one of the following conditions holds:



      If this method is called after the component has been drawn/initialized: Setter for showNavigationBar.

      Note: If the property is set false after the navigationBar autochild has already been created, it will be hidden but not destroyed.

      Parameters:
      showNavigationBar - new value. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
    • getShowNavigationBar

      public Boolean getShowNavigationBar()
      If set to false, the navigationBar will not be shown. If set to true, the navigationBar will always be shown, even when the deviceMode is

      If this property is unset, the navigationBar will be shown if at least one of the following conditions holds:

      Returns:
      Current showNavigationBar value. Default value is null
    • setShowResizeBars

      public SplitPane setShowResizeBars(boolean showResizeBars) throws IllegalStateException
      If enabled, the SplitPane will add resize bars between the navigationPane and detailPane when these panes are shown side-by-side, and between the listPane and detailPane in deviceMode:"desktop".
      Parameters:
      showResizeBars - New showResizeBars value. Default value is true
      Returns:
      SplitPane instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowResizeBars

      public boolean getShowResizeBars()
      If enabled, the SplitPane will add resize bars between the navigationPane and detailPane when these panes are shown side-by-side, and between the listPane and detailPane in deviceMode:"desktop".
      Returns:
      Current showResizeBars value. Default value is true
    • setShowRightButton

      public SplitPane setShowRightButton(boolean showRightButton)
      Should the rightButton be shown in the navigationBar?

      If this method is called after the component has been drawn/initialized: Show or hide the rightButton of the navigationBar.
      Parameters:
      showRightButton - if true, the button will be shown, otherwise hidden. Default value is false
      Returns:
      SplitPane instance, for chaining setter calls
    • getShowRightButton

      public boolean getShowRightButton()
      Should the rightButton be shown in the navigationBar?
      Returns:
      Current showRightButton value. Default value is false
    • setVertical

      public SplitPane setVertical(Boolean vertical)
      Note: This is a Layout property which is inapplicable on this class.
      Overrides:
      setVertical in class Layout
      Parameters:
      vertical - New vertical value. Default value is null
      Returns:
      SplitPane instance, for chaining setter calls
    • getVertical

      public Boolean getVertical()
      Note: This is a Layout property which is inapplicable on this class.
      Overrides:
      getVertical in class Layout
      Returns:
      Current vertical value. Default value is null
    • addDownClickHandler

      public HandlerRegistration addDownClickHandler(DownClickHandler handler)
      Add a downClick handler.

      Notification method fired when the miniNav is showing and the down button on the navigationBar's MiniNavControl is clicked.

      Specified by:
      addDownClickHandler in interface HasDownClickHandlers
      Parameters:
      handler - the downClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addNavigationClickHandler

      public HandlerRegistration addNavigationClickHandler(NavigationClickHandler handler)
      Add a navigationClick handler.

      Notification method fired when the user clicks the default back / forward buttons on the navigation bar for this SplitPane.

      Note that the return value will be ignored and cancelation won't be possible if SplitPane.notifyAfterNavigationClick has been set true, since that forces this method to run after we've already navigated to the new pane.

      Specified by:
      addNavigationClickHandler in interface HasNavigationClickHandlers
      Parameters:
      handler - the navigationClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • addPaneChangedHandler

      public HandlerRegistration addPaneChangedHandler(PaneChangedHandler handler)
      Add a paneChanged handler.

      Notification fired when the SplitPane.currentPane changes, either due to end-user action or due to a programmatic call to setCurrentPane() or other APIs that can change the pane.

      Note that depending on the DeviceMode, this event may not signal that any pane has actually been shown or hidden, since in some modes multiple panes are shown simultaneously.

      Never fires while the SplitPane is not drawn.

      Specified by:
      addPaneChangedHandler in interface HasPaneChangedHandlers
      Parameters:
      handler - the paneChanged handler
      Returns:
      HandlerRegistration used to remove this handler
    • setLeftButtonTitle

      public void setLeftButtonTitle(String newTitle)
      Setter for the leftButtonTitle of the navigationBar.
      Parameters:
      newTitle - new title for the left button. See HTMLString
      See Also:
    • setRightButtonTitle

      public void setRightButtonTitle(String newTitle)
      Setter for the rightButtonTitle of the navigationBar.
      Parameters:
      newTitle - new title for the right button. See HTMLString
      See Also:
    • showDetailPane

      public void showDetailPane()
      Causes a transition to the detailPane, optionally updating the detail title.

      If, based on the deviceMode and pageOrientation, this causes the navigationPane or listPane to be hidden, the back button will be updated with the current title of the navigationPane or listPane, or the backButtonTitle passed to this method. When addHistoryEntries is enabled and backButtonTitle is passed, then backButtonTitle will be used for the back button title if the user goes back to the detailPane.

    • showDetailPane

      public void showDetailPane(String detailPaneTitle)
      See Also:
    • showDetailPane

      public void showDetailPane(String detailPaneTitle, String backButtonTitle)
      See Also:
    • showDetailPane

      public void showDetailPane(String detailPaneTitle, String backButtonTitle, NavigationDirection direction)
      Causes a transition to the detailPane, optionally updating the detail title.

      If, based on the deviceMode and pageOrientation, this causes the navigationPane or listPane to be hidden, the back button will be updated with the current title of the navigationPane or listPane, or the backButtonTitle passed to this method. When addHistoryEntries is enabled and backButtonTitle is passed, then backButtonTitle will be used for the back button title if the user goes back to the detailPane.

      Parameters:
      detailPaneTitle - optional new detail title. See HTMLString
      backButtonTitle - optional new title for the back button. See HTMLString
      direction - when animateNavigationBarStateChanges is true, this is the direction passed to NavigationBar.setViewState().
    • showListPane

      public void showListPane()
      Causes a transition to the listPane, optionally updating the list title.

      If, based on the deviceMode and pageOrientation, this causes the navigationPane to be hidden, the back button will be updated with the current title of the navigationPane, or the backButtonTitle passed to this method. When addHistoryEntries is enabled and backButtonTitle is passed, then backButtonTitle will be used for the back button title if the user goes back to the listPane.

    • showListPane

      public void showListPane(String listPaneTitle)
      See Also:
    • showListPane

      public void showListPane(String listPaneTitle, String backButtonTitle)
      See Also:
    • showListPane

      public void showListPane(String listPaneTitle, String backButtonTitle, NavigationDirection direction)
      Causes a transition to the listPane, optionally updating the list title.

      If, based on the deviceMode and pageOrientation, this causes the navigationPane to be hidden, the back button will be updated with the current title of the navigationPane, or the backButtonTitle passed to this method. When addHistoryEntries is enabled and backButtonTitle is passed, then backButtonTitle will be used for the back button title if the user goes back to the listPane.

      Parameters:
      listPaneTitle - optional new list title. See HTMLString
      backButtonTitle - optional new title for the back button. See HTMLString
      direction - when animateNavigationBarStateChanges is true, this is the direction passed to NavigationBar.setViewState().
    • showNavigationPane

      public void showNavigationPane()
      Causes a transition to the navigationPane.
    • showNavigationPane

      public void showNavigationPane(NavigationDirection direction)
      Causes a transition to the navigationPane.
      Parameters:
      direction - when animateNavigationBarStateChanges is true, this is the direction passed to NavigationBar.setViewState().
    • addUpClickHandler

      public HandlerRegistration addUpClickHandler(UpClickHandler handler)
      Add a upClick handler.

      Notification method fired when the miniNav is showing and the up button on the navigationBar's MiniNavControl is clicked.

      Specified by:
      addUpClickHandler in interface HasUpClickHandlers
      Parameters:
      handler - the upClick handler
      Returns:
      HandlerRegistration used to remove this handler
    • setDefaultProperties

      public static void setDefaultProperties(SplitPane splitPaneProperties)
      Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.

      Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.

      Parameters:
      splitPaneProperties - properties that should be used as new defaults when instances of this class are created
      See Also:
    • setLogicalStructure

      public LogicalStructureObject setLogicalStructure(SplitPaneLogicalStructure s)
      Setter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
    • getLogicalStructure

      public LogicalStructureObject getLogicalStructure()
      Getter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
      Specified by:
      getLogicalStructure in interface LogicalStructure
      Overrides:
      getLogicalStructure in class Layout