Class TListItemCollection
Direct Known Sub-classes:
Method Summary |
TListItem
|
Creates a list item object.
|
protected
TListItem
|
|
integer
|
Finds the lowest cardinal index of the item whose text is the one being looked for.
|
integer
|
Finds the lowest cardinal index of the item whose value is the one being looked for.
|
TListItem
|
Finds the item whose text is the one being looked for.
|
TListItem
|
Finds the item whose value is the one being looked for.
|
void
|
Inserts an item into the collection.
|
void
|
Loads state into every item in the collection.
|
array|null
|
Saves state of items.
|
Methods Inherited From TList |
TList::add(), TList::clear(), TList::contains(), TList::copyFrom(), TList::count(), TList::getCount(), TList::getIterator(), TList::getReadOnly(), TList::indexOf(), TList::insertAt(), TList::itemAt(), TList::mergeWith(), TList::offsetExists(), TList::offsetGet(), TList::offsetSet(), TList::offsetUnset(), TList::remove(), TList::removeAt(), TList::setReadOnly(), TList::toArray()
|
Methods Inherited From TComponent |
TComponent::addParsedObject(), TComponent::attachEventHandler(), TComponent::canGetProperty(), TComponent::canSetProperty(), TComponent::createdOnTemplate(), TComponent::detachEventHandler(), TComponent::evaluateExpression(), TComponent::evaluateStatements(), TComponent::getEventHandlers(), TComponent::getSubProperty(), TComponent::hasEvent(), TComponent::hasEventHandler(), TComponent::hasProperty(), TComponent::raiseEvent(), TComponent::setSubProperty(), TComponent::__get(), TComponent::__set()
|
Method Details |
createListItem
public TListItem createListItem |
(integer $index ) |
Creates a list item object.
This method may be overriden to provide a customized list item object.
Input |
integer | $index | index where the newly created item is to be inserted at. If -1, the item will be appended to the end. |
Output |
TListItem
| list item object |
Exception |
|
createNewListItem
protected TListItem createNewListItem |
(mixed $text ) |
Input |
mixed | $text | |
Output |
TListItem
| new item. |
Exception |
|
findIndexByText
public integer findIndexByText |
(string $text , boolean $includeDisabled ) |
Finds the lowest cardinal index of the item whose text is the one being looked for.
Input |
string | $text | the text to be looked for |
boolean | $includeDisabled | whether to look for disabled items also |
Output |
integer
| the index of the item found, -1 if not found. |
Exception |
|
findIndexByValue
public integer findIndexByValue |
(string $value , boolean $includeDisabled ) |
Finds the lowest cardinal index of the item whose value is the one being looked for.
Input |
string | $value | the value to be looked for |
boolean | $includeDisabled | whether to look for disabled items also |
Output |
integer
| the index of the item found, -1 if not found. |
Exception |
|
findItemByText
public TListItem findItemByText |
(string $text , boolean $includeDisabled ) |
Finds the item whose text is the one being looked for.
Input |
string | $text | the text to be looked for |
boolean | $includeDisabled | whether to look for disabled items also |
Output |
TListItem
| the item found, null if not found. |
Exception |
|
findItemByValue
public TListItem findItemByValue |
(string $value , boolean $includeDisabled ) |
Finds the item whose value is the one being looked for.
Input |
string | $value | the value to be looked for |
boolean | $includeDisabled | whether to look for disabled items also |
Output |
TListItem
| the item found, null if not found. |
Exception |
|
insertAt
public void insertAt |
(integer $index , TListItem $item ) |
Inserts an item into the collection.
Input |
integer | $index | the location where the item will be inserted. The current item at the place and the following ones will be moved backward. |
TListItem | $item | the item to be inserted. |
Output |
Exception |
throws | TInvalidDataTypeException if the item being inserted is neither a string nor TListItem |
|
loadState
public void loadState |
(array|null $state ) |
Loads state into every item in the collection.
This method should only be used by framework and control developers.
Input |
array|null | $state | state to be loaded. |
Output |
Exception |
|
saveState
public array|null saveState |
() |
Saves state of items.
This method should only be used by framework and control developers.
Output |
array|null
| the saved state |
Exception |
|
|