Actuate JavaScript API classes : Class actuate.viewer.UIConfig

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 4-47 lists actuate.viewer.UIConfig functions.

actuate.viewer.UIConfig.getContentPanel

Syntax

objectUIConfig.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 scrollbar enabled.

Example

To retrieve and store the content pane from the viewer, use the following code:

var contentpane = viewer.getUIConfig( ).getContentPane( );

actuate.viewer.UIConfig.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( )){ ...}

actuate.viewer.UIConfig.setContentPanel

Syntax

void UIConfig.setContentPanel(objectcontentPanel)

Sets the content panel for the viewer.

Parameters

contentPanel

Object. Valid objects are actuate.viewer.BrowserPanel, actuate.viewer.ScrollPanel, and null. A null value sets a content panel configured with the browser scrollbar enabled.

Example

To set the content pane to BrowserPanel if it is null, use the following code:

var contentpane = viewer.getUIConfig( ).getContentPane( );
if (contentpane == null){
  var newconfig = viewer.getUIConfig( );
  newconfig.setContentPanel(new actuate.viewer.BrowserPanel( ));
  viewer.setUIConfig(newconfig);
}

actuate.viewer.UIConfig.setShowToc

Syntax

void UIConfig.setShowToc(boolean showToc)

Sets the showToc flag.

Parameters

showToc

Boolean.

Example

To hide the Toc in the UI, use the following code:

var newconfig = viewer.getUIConfig( );
newconfig.setShowToc(false);
viewer.setUIConfig(newconfig);

(c) Copyright Actuate Corporation 2011