ControlFactory
A Factory that takes a control config as an object and returns the correspondig control. Modules can expand the functionality of this class via the createControl method
Constructor Summary
Public Constructor | ||
public |
constructor(options: ControlFactoryOptions) |
Member Summary
Public Members | ||
public |
|
Private Members | ||
private |
|
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
addControlTo(receiver: ComposedControl | G4UMap, controlName: string) Function to add a control by its name to a certain receiver |
|
public |
Add all configured Controls to the map |
|
public |
createControl(controlType: string, options: g4uControlOptions): Control The factory function |
|
public |
getPositioning(): Positioning |
|
public |
setLocaliser(loc: L10N) Sets the localiser to pass on to the controls |
Private Methods | ||
private |
addControlMultipleInternal_(receiver: ComposedControl | G4UMap, controlNames: string[]) Adds multiple controls to one receiver |
Public Constructors
public constructor(options: ControlFactoryOptions) source
Params:
Name | Type | Attribute | Description |
options | ControlFactoryOptions |
Public Members
public controlsConfig: ControlsConfig source
Private Members
private activeGroups_: Map<string, ActiveGroup> source
Public Methods
public addControlTo(receiver: ComposedControl | G4UMap, controlName: string) source
Function to add a control by its name to a certain receiver
Params:
Name | Type | Attribute | Description |
receiver | ComposedControl | G4UMap | ||
controlName | string |
public createControl(controlType: string, options: g4uControlOptions): Control source
The factory function
Params:
Name | Type | Attribute | Description |
controlType | string | ||
options | g4uControlOptions |
public setLocaliser(loc: L10N) source
Sets the localiser to pass on to the controls
Params:
Name | Type | Attribute | Description |
loc | L10N |
Private Methods
private addControlMultipleInternal_(receiver: ComposedControl | G4UMap, controlNames: string[]) source
Adds multiple controls to one receiver
Params:
Name | Type | Attribute | Description |
receiver | ComposedControl | G4UMap | ||
controlNames | string[] |