File

src/services/tabOrderService/container-tab-order.service.ts

Extends

MainTabOrderService

Index

Properties
Methods
Accessors

Methods

enterContainer
enterContainer(isShiftPressed: boolean, evt: any, isTabNodeReferenceRadioButton: boolean, leave?: boolean)

Applies focus to a selectable element in user control. It triggers dom element focus(). If first element is also a user control pass responsability to internal service Default value false indicates that method should leaves container.

Parameters :
Name Type Optional Description
isShiftPressed boolean No

If shift key is pressed

evt any No

Event

isTabNodeReferenceRadioButton boolean No

Determines if the tabbed cntrol is a radiobutton

leave boolean Yes

Determines whether the method should or should not leave container. Default value false indicates that method should leaves container.

Returns : void
leaveContainer
leaveContainer(evt: any)

leaveContainer Sends a notification to change the current tab order service

Parameters :
Name Type Optional Description
evt any No

the current event

Returns : any
registerInstance
registerInstance(componentInstance: any)

Register a component instance into the service component list

Parameters :
Name Type Optional
componentInstance any No
Returns : void
resolveTab
resolveTab(tabNodeReference: TabNode, isShiftPressed: boolean, event: any)

Resolves tab

Parameters :
Name Type Optional Description
tabNodeReference TabNode No

Current component node

isShiftPressed boolean No

shift key pressed

event any No

the current keyboard event

Returns : void
shouldLeaveContext
shouldLeaveContext(tabNodeReference: any, availableComponent: any, isShiftPressed: boolean)

Should leave context

Parameters :
Name Type Optional Description
tabNodeReference any No

Current component node

availableComponent any No

Next/Previous available and valid component node

isShiftPressed boolean No

Shift key pressed

Returns : boolean

true if leave the current context

applyFocusToAvailableComponent
applyFocusToAvailableComponent(availableComponent: any, isShiftPressed: boolean, event: any)

Apply focus to all components in a window, gives a special treatment to dataManager controls and userObjects

Parameters :
Name Type Optional Description
availableComponent any No

Tab node component

isShiftPressed boolean No
event any No

The current javascript event

Returns : void
assignEmptyStartEndNodes
assignEmptyStartEndNodes(newNode: TabNode)

Method used by insert sort when there is no root node at the list

Parameters :
Name Type Optional Description
newNode TabNode No

Tab Node component

Returns : void
availableNextNode
availableNextNode(tabNodeReference: TabNode, isShiftPressed: boolean, length: number, isTabNodeReferenceRadioButton: boolean)

Availables next node

Parameters :
Name Type Optional Description
tabNodeReference TabNode No

The current tabnode reference

isShiftPressed boolean No

to detect if shift was pressed

length number No

the component list length

isTabNodeReferenceRadioButton boolean No
Returns : any

next node

getComponentById
getComponentById(id: string)

Gets a component by id

Parameters :
Name Type Optional Description
id string No

The WebMap id used to find the component

Returns : any

A component instance

getHead
getHead()

Gets the head node.

Returns : TabNode
getLowerTabIndexRadioButton
getLowerTabIndexRadioButton()

Gets the radiobutton component that has the lower TabOrder value

Returns : any

The nodeInstance for the radioButton if applies otherwise null

getSelectedRadioButton
getSelectedRadioButton(tabNodeReference: TabNode)

Gets the selected radiobutton for the current container

Parameters :
Name Type Optional Description
tabNodeReference TabNode No

The tabNode

Returns : any

The selected radiobutton if there is at least one

insertBetweenNodes
insertBetweenNodes(firstNode: TabNode, secondNode: TabNode, newNode: TabNode)

Insert a new node at the middle of the list

Parameters :
Name Type Optional Description
firstNode TabNode No
secondNode TabNode No
newNode TabNode No

Tab Node component

Returns : void
insertEnd
insertEnd(newNode: TabNode)

Insert a new node at the end of the list and updates end Node reference

Parameters :
Name Type Optional Description
newNode TabNode No

Tab Node component

Returns : void
Private insertNodeFirstOrMiddle
insertNodeFirstOrMiddle(newNode: TabNode)

Insert the node when is not in the last position

Parameters :
Name Type Optional
newNode TabNode No
Returns : void
insertSort
insertSort(newNode: TabNode)

This method is used to insert sort nodes in to a double linked circular list

Parameters :
Name Type Optional Description
newNode TabNode No

Tab node component

Returns : void
insertStart
insertStart(newNode: TabNode)

Insert a new node at the beginning of the list and updates start Node reference

Parameters :
Name Type Optional Description
newNode TabNode No

Tab Node component

Returns : void
isFocusableContainer
isFocusableContainer(tabNodeReference: TabNode)

Method to know if specifics container can gain focus and not only execute the enterContainer mechanism Is important for containers with this behavior to be registered on the focusableContainers dictionary and use the ContainerDirective to manage the tab behavior.

Example: TabControl component

Parameters :
Name Type Optional
tabNodeReference TabNode No
Returns : boolean

{boolean}

isLabelComponent
isLabelComponent(tabNodeReference: TabNode)

Determines if a tabNode is a labelComponent

Parameters :
Name Type Optional Description
tabNodeReference TabNode No

The tabNode

Returns : boolean

True if it is a label otherwise false

isRadioButtonComponent
isRadioButtonComponent(tabNodeReference: TabNode)

Determines if a tabNode is a radioButtonComponent

Parameters :
Name Type Optional Description
tabNodeReference TabNode No

The tabNode

Returns : boolean

True if it is a radioButton otherwise false

isReferenceAlive
isReferenceAlive(tabNodeReference: TabNode)

Returns true if the reference is alive otherwise false

Parameters :
Name Type Optional Description
tabNodeReference TabNode No

The tab node refernced

Returns : boolean
isValidTabNode
isValidTabNode(tabNodeReference: TabNode, isTabNodeReferenceRadioButton: boolean, selectedRadioButton: any)

Determines whether a node instance is valid

Parameters :
Name Type Optional Description
tabNodeReference TabNode No

The tabNode

isTabNodeReferenceRadioButton boolean No

Determines if the tabbed control is a radiobutton

selectedRadioButton any No

Contains the selected radioButton for the current container

Returns : boolean

true if valid tab node

registerContainerParentInstance
registerContainerParentInstance(control: any)

Method to register the Window or Container provider of the tab service

Parameters :
Name Type Optional
control any No
Returns : void
unregisterInstance
unregisterInstance(componentInstance: any, id?: string)
Parameters :
Name Type Optional
componentInstance any No
id string Yes
Returns : void
Private validatePosition
validatePosition(previousEndFlag: TabNode, newNode: TabNode, endFlag: TabNode)

Validate the position of the node

Parameters :
Name Type Optional
previousEndFlag TabNode No
newNode TabNode No
endFlag TabNode No
Returns : void
validateRadioButtons
validateRadioButtons(tabNodeReference: TabNode, isTabNodeReferenceRadioButton: boolean, selectedRadioButton: any)

Validates if the tabNode is valid radioButton to receive the focus

Parameters :
Name Type Optional Description
tabNodeReference TabNode No

The tabNode

isTabNodeReferenceRadioButton boolean No

Determines if the tabbed control is a radiobutton

selectedRadioButton any No

Contains the selected radioButton for the current container

Returns : boolean

True if it is valid otherwise false

Properties

Private leaveSubject
Type : Subject<any>
Default value : new Subject<any>()

Leave subject to subscribe out action of tab page control service

Protected containerParentInstance
Type : any

The instance of the container parent of the tab service

Protected head
Type : TabNode

Head of main tab order service list

Protected nodesInstances
Type : IDictionary
Default value : new Dictionary()
Protected tail
Type : TabNode

Tail of main tab order service

Accessors

leaveContainerSubscription
getleaveContainerSubscription()

Gets leave subject to allow external subscription

Returns : Observable<any>
startTabNode
getstartTabNode()

Gets start tab node of the list

Returns : TabNode
endTabNode
getendTabNode()

Gets end tab node of the list

Returns : TabNode

results matching ""

    No results matching ""