Class: EmperorViewController

EmperorViewController

EmperorViewController

Base class for view controllers that use a dictionary of decomposition views, but that are not controlled by a metadata category, for those cases, see EmperorAttributeABC.

Constructor

new EmperorViewController(container, title, description, decompViewDict) → {EmperorViewController}

Parameters:
Name Type Description
container Node

Container node to create the controller in.

title String

title of the tab.

description String

helper description.

decompViewDict Object

This is object is keyed by unique identifiers and the values are DecompositionView objects referring to a set of objects presented on screen. This dictionary will usually be shared by all the tabs in the application. This argument is passed by reference.

Source:
Returns:

Returns an instance of the EmperorViewController class.

Type
EmperorViewController

Extends

Members

$body :Node

jQuery element for the body, which contains the lowermost elementsdisplayed in tab. This goes below the header.

Type:
  • Node
Inherited From:
Source:

$canvas :Node

jQuery element for the canvas, which contains the header and the body.

Type:
  • Node
Inherited From:
Source:

$container :Node

jQuery element for the parent container.

Type:
  • Node
Inherited From:
Source:

$header :Node

jQuery element for the header which contains the uppermost elementsdisplayed in a tab.

Type:
  • Node
Inherited From:
Source:

active :Boolean

Indicates whether the tab is front most

Type:
  • Boolean
Inherited From:
Default Value:
  • false
Source:

decompViewDict :Object

This is object is keyed by unique identifiers and the values areDecompositionView objects referring to a set of objects presented onscreen. This dictionary will usually be shared by all the tabs in theapplication. This argument is passed by reference.

Type:
  • Object
Source:

description :String

Human-readable description of the tab.

Type:
  • String
Inherited From:
Source:

enabled :Boolean

Indicates if tab can be accessed.

Type:
  • Boolean
Inherited From:
Default Value:
  • true
Source:

identifier :String

Unique hash identifier for the tab instance.

Type:
  • String
Inherited From:
Default Value:
  • "EMPtab-xxxxxxx"
Source:

title :String

Human-readable title of the tab.

Type:
  • String
Inherited From:
Source:

Methods

fromJSON(parsed)

Decodes JSON string and modifies its own instance variables accordingly.

Parameters:
Name Type Description
parsed Object

JSON string representation of an instance.

Inherited From:
Source:

getView()

Retrieve a view from the controller.

This class does not operate on single decomposition views, hence this method retrieves the first available view.

Source:

resize(width, height)

Resizes the container, note that the body will take whatever space is available after considering the size of the header. The header shouldn't have height variable objects, once added their height shouldn't really change.

Parameters:
Name Type Description
width Float

the container width.

height Float

the container height.

Inherited From:
Source:

setActive(trulse)

Sets whether or not the tab is visible.

Parameters:
Name Type Description
trulse Boolean

option to activate tab (i.e. move tab to foreground).

Inherited From:
Source:

setEnabled(trulse)

Sets whether or not elements in the tab can be modified.

Parameters:
Name Type Description
trulse Boolean

option to enable elements.

Inherited From:
Source:

toJSON() → {Object}

Converts the current instance into a JSON string.

Inherited From:
Source:
Returns:

ready to serialize representation of self.

Type
Object