Class idx.app._Launcher


Extends dijit.layout._LayoutWidget, idx.app._A11yAreaProvider.
This is an abstract base class for all launchers that handle creating Workspaces from WorkspaceType widgets
Defined in: <idx\app\_Launcher.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Field Summary

Field Attributes Field Name and Description
 
The workspace type ID of the default selected workspace after initialization.
 
The text resources to use with workspaces of this type.
 
The name of the HTTP cookie to automatically save the launcher state to.

Method Summary

Method Attributes Method Name and Description
 
closeWorkspace(workspaceID)
This method is called to close a workspace via its workspace ID.
 
constructor(args, node)
Constructor provides basic setup of internal data structures.
 
Override to cleanup the connections.
 
getFailedLoadMessage(wsType, wsTitle, args)
Gets the messge to display if the workspace failed to load its content.
 
getLoadingMessage(wsType, wsTitle, args)
Gets the message to display while the workspace is loading its content.
 
Gets the maximum number of workspaces that are allowed to be open for the workspace type with the specified name.
 
Gets the number of workspaces currently opened for the workspace type with the specified name.
 
getWorkspace(workspaceID)
Returns the idx.app.Workspace for the specified workspace ID.
 
getWorkspaces(workspaceTypeID)
If the specified workspace type ID is provided, then this method returns an array of all workspace IDs for that workspace type.
 
getWorkspaceStyleClass(wsType, args)
Returns the CSS class to apply to the workspace content.
 
Returns an array of workspace type IDs known to this launcher.
 
onWorkspaceSelected(selectedWorkspace, previousWorkspace)
This function is called when a work space is selected Currently does nothing.
 
openWorkspace(typeID, args)
Opens a new workspaces of the specified type with the specified arguments.
 
Overrides Overridden to handle the loading/overriding of resources.
 
removeChild(widget)
Override removeChild to handle trapping WorkspaceType removal.
 
selectFirstWorkspaceOfType(workspaceTypeID)
Attempts to select and return the first workspace of a given workspace type.
 
selectWorkspace(workspace)
Workspace selection method.
 
Overridden to handle registering all workspace types as well as handle subscribing to the launcher topic.
 
workspaceLoaded(workspace, data)
Called when workspace loaded.

Constructor Detail

idx.app._Launcher()

Field Detail

{String} defaultWorkspaceTypeID

The workspace type ID of the default selected workspace after initialization. If no workspace for the WorkspaceType associated with the ID is created on initialization then the first workspace of the first WorkspaceType is selected. If multiple workspaces for the associated WorkspaceType are created on initialization (no currently known use cases) then the first for that type will be selected.

{Object} resources

The text resources to use with workspaces of this type. If not provided then the default resources are used.

{String} stateCookieName

The name of the HTTP cookie to automatically save the launcher state to. If this is not set then no state will be saved. If set, then the cookie will be used upon initialization to attempt to restore the launcher to whatever state it was previously in. The simpleist implementation of this is simply to attempt to reselect the same workspace as was last selected, however some implementations may actually provide a means to dynamically reopen workspaces that were previously open.

Method Detail

{String} closeWorkspace(workspaceID)

This method is called to close a workspace via its workspace ID.
Parameters:
{String} workspaceID
Returns:
{String} workspaceID

constructor(args, node)

Constructor provides basic setup of internal data structures.
Parameters:
{Object} args
{Object} node

destroy()

Override to cleanup the connections.

{String} getFailedLoadMessage(wsType, wsTitle, args)

Gets the messge to display if the workspace failed to load its content.
Parameters:
{idx.app.WorkspaceType} wsType
{String} wsTitle
{Object} args
Returns:
{String} failed to load message

{String} getLoadingMessage(wsType, wsTitle, args)

Gets the message to display while the workspace is loading its content.
Parameters:
{idx.app.WorkspaceType} wsType
{String} wsTitle
{Object} args
Returns:
{String} loading message

{Integer} getMaxOpenWorkspaceCount(typeID)

Gets the maximum number of workspaces that are allowed to be open for the workspace type with the specified name. If the type name is not recognized by this launcher then negative one (-1) is returned. If no maximum has been specified for the workspace type then zero (0) is returned.
Parameters:
{String} typeID
The type ID for the workspace type for which the maximum number of open workspaces is desired.
Returns:
{Integer} The maximum number of workspaces for the workspace type or -1 if the typeID is not recognized.

{Integer} getOpenWorkspaceCount(typeID)

Gets the number of workspaces currently opened for the workspace type with the specified name.
Parameters:
{String} typeID
The type ID of the workspace type for which the workspace count is desired.
Returns:
{Integer} The number of open workspaces for the WorkspaceType associated with the specified type ID, or zero (0) if the typeID is not recognized.

getWorkspace(workspaceID)

Returns the idx.app.Workspace for the specified workspace ID.
Parameters:
workspaceID

getWorkspaces(workspaceTypeID)

If the specified workspace type ID is provided, then this method returns an array of all workspace IDs for that workspace type. If not provided, this returns an array of all workspace IDs in order of how they appear.
Parameters:
workspaceTypeID

{String} getWorkspaceStyleClass(wsType, args)

Returns the CSS class to apply to the workspace content. This method is meant to be overridden.
Parameters:
{idx.app.WorkspaceType} wsType
{Object} args
Returns:
{String} CSS class.

getWorkspaceTypeIDs()

Returns an array of workspace type IDs known to this launcher.

onWorkspaceSelected(selectedWorkspace, previousWorkspace)

This function is called when a work space is selected Currently does nothing.
Parameters:
{idx.app.Workspace} selectedWorkspace
{idx.app.Workspace} previousWorkspace

{String} openWorkspace(typeID, args)

Opens a new workspaces of the specified type with the specified arguments.
Parameters:
{String} typeID
{Object} args
Returns:
{String} workspace ID for the workspace that was created.

postMixInProperties()

Overrides Overridden to handle the loading/overriding of resources. The launcher topic is not subscribed to until after startup.
See:
dijit._Widget.postMixInProperties

removeChild(widget)

Override removeChild to handle trapping WorkspaceType removal.
Parameters:
widget

selectFirstWorkspaceOfType(workspaceTypeID)

Attempts to select and return the first workspace of a given workspace type. If no such workspace is found then the selection is not changed and null is returned. Otherwise, the workspace is selected and it is returned.
Parameters:
workspaceTypeID

selectWorkspace(workspace)

Workspace selection method. Must be overridden to do something
Parameters:
{idx.app.Workspace} workspace

startup()

Overridden to handle registering all workspace types as well as handle subscribing to the launcher topic.

workspaceLoaded(workspace, data)

Called when workspace loaded. Currently does nothing
Parameters:
{idx.app.Workspace} workspace
{Object} data