The IndexChangedEvent class represents events that are dispatched when
an index changes.
This event can indicate that the index value of a child of a container changed,
the displayed child of a navigator container such as an Accordion or
ViewStack changed, or the order of column headers in a DataGrid
control changed.

[static]
The IndexChangedEvent.CHANGE constant defines the value of the
type property of the event object for a change event,
which indicates that an index has changed, such as when and Accordion control
changes the displayed panel or a ViewStack changes views.

[static]
The IndexChangedEvent.CHILD_INDEX_CHANGE constant defines the value of the
type property of the event object for a childIndexChange event,
which indicates that a component's index among a container's children
has changed.

[static]
The IndexChangedEvent.HEADER_SHIFT constant defines the value of the
type property of the event object for a headerShift event,
which indicates that a header has changed its index, as when a user drags
a DataGrid column to a new position.

IndexChangedEvent

Property Detail

newIndex

The zero-based index after the change. For change events
it is the index of the current child. For childIndexChange
events, it is the new index of the child. For headerShift
events, it is the new index of the header.

oldIndex

The zero-based index before the change.
For change events it is the index of the previous child.
For childIndexChange events, it is the previous index
of the child.
For headerShift events, it is the previous index of
the header.

CHANGE

The IndexChangedEvent.CHANGE constant defines the value of the
type property of the event object for a change event,
which indicates that an index has changed, such as when and Accordion control
changes the displayed panel or a ViewStack changes views.

The properties of the event object have the following values:

Property

Value

bubbles

false

cancelable

false

currentTarget

The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget.

inputType

Indicates whether this event
was caused by a mouse or keyboard interaction.

newIndex

The zero-based index
after the change.

oldIndex

The zero-based index
before the change.

relatedObject

Contains a reference
to the child object that corresponds to the new index.

target

The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event.

TriggerEvent

The event that
triggered this event.

Type

IndexChangedEvent.CHANGE

CHILD_INDEX_CHANGE

The IndexChangedEvent.CHILD_INDEX_CHANGE constant defines the value of the
type property of the event object for a childIndexChange event,
which indicates that a component's index among a container's children
has changed.

The properties of the event object have the following values:

Property

Value

bubbles

false

cancelable

false

currentTarget

The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget.

inputType

Indicates whether this event
was caused by a mouse or keyboard interaction.

newIndex

The zero-based index of the
child after the change.

oldIndex

The zero-based index of the
child before the change.

relatedObject

Contains a reference
to the child object whose index changed.

target

The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event.

TriggerEvent

null

Type

IndexChangedEvent.CHILD_INDEX_CHANGE

HEADER_SHIFT

The IndexChangedEvent.HEADER_SHIFT constant defines the value of the
type property of the event object for a headerShift event,
which indicates that a header has changed its index, as when a user drags
a DataGrid column to a new position.

The properties of the event object have the following values:

Property

Value

bubbles

false

cancelable

false

currentTarget

The Object that defines the
event listener that handles the event. For example, if you use
myButton.addEventListener() to register an event listener,
myButton is the value of the currentTarget.

inputType

Indicates whether this event
was caused by a mouse or keyboard interaction.

newIndex

The zero-based index of the
header after the change.

oldIndex

The zero-based index of the
header before the change.

relatedObject

null

target

The Object that dispatched the event;
it is not always the Object listening for the event.
Use the currentTarget property to always access the
Object listening for the event.