Class actuate.viewer.UIConfig
Description
The UIConfig class specifies feature availability for the viewer.
Constructor
Syntax
void actuate.viewer.UIConfig( )
Generates a new UIConfig object to manage the content panel for the viewer. By default, the content panel is an
actuate.viewer.ScrollPanel object with ScrollControl, PanInOut, and MouseScrolling enabled.
Function summary
Table 44‑54 lists actuate.viewer.UIConfig functions.
Table 44‑54 actuate.viewer.UIConfig functions
Function
Description
Returns the content panel configuration
Gets the showToc flag
Sets the content panel configuration
Sets the showToc flag
getContentPanel
Syntax
object UIConfig.getContentPanel( )
Returns the content panel object.
Returns
Object. Valid objects are
actuate.viewer.BrowserPanel ,
actuate.viewer.ScrollPanel , and null. A null value indicates a content panel configured with the browser scroll bar enabled.
Example
To retrieve and store the content panel from the viewer, use the following code:
var contentpanel = viewer.getUIConfig( ).getContentPanel( );
getShowToc
Syntax
boolean UIConfig.getShowToc( )
Returns the showToc flag.
Returns
Boolean.
Example
To determine if the showToc flag is set to true, use the following code:
if (!viewer.getUIConfig( ).getShowToc( )){ ...}
setContentPanel
Syntax
void UIConfig.setContentPanel(objectcontentPanel)
Sets the content panel for the viewer.
Parameter
contentPanel
Object. Valid objects are
actuate.viewer.BrowserPanel ,
actuate.viewer.ScrollPanel , and null. A null value sets a content panel configured with the browser scroll bar enabled.
Example
To set the content panel to BrowserPanel if it is null, use the following code:
var contentpanel = viewer.getUIConfig( ).getContentPanel( );
if (contentpanel == null ){
var newconfig = viewer.getUIConfig( );
newconfig.setContentPanel(new actuate.viewer.BrowserPanel( ));
viewer.setUIConfig(newconfig);
}
setShowToc
Syntax
void UIConfig.setShowToc(boolean showToc)
Sets the showToc flag.
Parameter
showToc
Boolean.
Example
To hide the Toc in the UI, use the following code:
var newconfig = viewer.getUIConfig( );
newconfig.setShowToc(false );
viewer.setUIConfig(newconfig);