Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::ColumnModel Class Reference

The ColumnModel is a model that represent's 0 or more ColumnItems. More...

#include <vcf/ApplicationKit/ColumnModel.h>

Inheritance diagram for VCF::ColumnModel:

VCF::Model VCF::Component VCF::ObjectWithEvents VCF::Object VCF::DefaultColumnModel List of all members.

Public Member Functions

virtual ~ColumnModel ()
virtual void addContentsChangedHandler (EventHandler *handler)=0
 adds a new handler that is notified whenever the contents of the model change.
virtual void removeContentsChangedHandler (EventHandler *handler)=0
 removes a handler that was interested in changes to the model.
virtual void addItemAddedHandler (EventHandler *handler)=0
 adds a new handler that is notified whenever an item is added.
virtual void removeItemAddedHandler (EventHandler *handler)=0
 removes a handler that was interested in item additions to the model.
virtual void addItemDeletedHandler (EventHandler *handler)=0
 adds a new handler that is notified whenever an item is removed.
virtual void removeItemDeletedHandler (EventHandler *handler)=0
 removes a handler that was interested in item deletions to the model.
virtual void deleteItem (ColumnItem *item)=0
 deletes the item from the model's collection of items.
virtual void deleteItem (const uint32 &index)=0
 deletes the item from the model's collection of items.
virtual void insertItem (const uint32 &index, ColumnItem *item)=0
 Inserts an item into the model's collection of items.
virtual void addItem (ColumnItem *item)=0
 Adds an item into the model's collection of items.
virtual ColumnItemgetItemFromIndex (const uint32 &index)=0
 Returns the item with the specified index in the model's collection.
virtual Enumerator< ColumnItem * > * getItems ()=0
 Returns an Enumerator of all the items in the model's collection.
virtual uint32 getCount ()=0
 returns the number of the items in the model

Detailed Description

The ColumnModel is a model that represent's 0 or more ColumnItems.

You can add, remove, and insert column items in the model. In addition you can get an item by index, or retrieve an Enumerator of all of the items the model currently has in it.

See also:
Model


Constructor & Destructor Documentation

virtual VCF::ColumnModel::~ColumnModel  )  [inline, virtual]
 


Member Function Documentation

virtual void VCF::ColumnModel::addContentsChangedHandler EventHandler handler  )  [pure virtual]
 

adds a new handler that is notified whenever the contents of the model change.

This can happen anytime an item is added or removed.

Parameters:
EventHandler the handler to add for future notifications

Implemented in VCF::DefaultColumnModel.

virtual void VCF::ColumnModel::addItem ColumnItem item  )  [pure virtual]
 

Adds an item into the model's collection of items.

Causes a notification to be sent to all listeners of the models ItemAdded events and the model's ContentsChanged event.

Parameters:
ColumnItem the item to add

Implemented in VCF::DefaultColumnModel.

virtual void VCF::ColumnModel::addItemAddedHandler EventHandler handler  )  [pure virtual]
 

adds a new handler that is notified whenever an item is added.

Parameters:
EventHandler the handler to add for future notifications

Implemented in VCF::DefaultColumnModel.

virtual void VCF::ColumnModel::addItemDeletedHandler EventHandler handler  )  [pure virtual]
 

adds a new handler that is notified whenever an item is removed.

Parameters:
EventHandler the handler to add for future notifications

Implemented in VCF::DefaultColumnModel.

virtual void VCF::ColumnModel::deleteItem const uint32 index  )  [pure virtual]
 

deletes the item from the model's collection of items.

Causes a notification to be sent to all listeners of the models ItemDeleted events and the model's ContentsChanged event.

Parameters:
uint32 the index of the item to delete.

Implemented in VCF::DefaultColumnModel.

virtual void VCF::ColumnModel::deleteItem ColumnItem item  )  [pure virtual]
 

deletes the item from the model's collection of items.

Causes a notification to be sent to all listeners of the models ItemDeleted events and the model's ContentsChanged event.

Parameters:
ColumnItem the item to delete.

Implemented in VCF::DefaultColumnModel.

virtual uint32 VCF::ColumnModel::getCount  )  [pure virtual]
 

returns the number of the items in the model

Returns:
uint32 the count of items

Implemented in VCF::DefaultColumnModel.

virtual ColumnItem* VCF::ColumnModel::getItemFromIndex const uint32 index  )  [pure virtual]
 

Returns the item with the specified index in the model's collection.

Parameters:
uint32 teh index of the requested item to return
Returns:
ColumnItem the item at the position specified in index. This may be NULL if the index is out of bounds, or the model collection is empty

Implemented in VCF::DefaultColumnModel.

virtual Enumerator<ColumnItem*>* VCF::ColumnModel::getItems  )  [pure virtual]
 

Returns an Enumerator of all the items in the model's collection.

For example:

		ColumnModel* model = ...

		Enumerator<ColumnItem*>* items = model->getItems();

		while ( true == items->hasMoreElements() ) {
			ColumnItem* item = items->nextElemnt();
do something ...
		}
	
Returns:
Enumerator<ColumnItem*> the enumerator of items. The caller is not responsible for the returned pointer and should not delete it.
See also:
Enumerator

Implemented in VCF::DefaultColumnModel.

virtual void VCF::ColumnModel::insertItem const uint32 index,
ColumnItem item
[pure virtual]
 

Inserts an item into the model's collection of items.

Causes a notification to be sent to all listeners of the models ItemAdded events and the model's ContentsChanged event.

Parameters:
uint32 the insertion index for the item
ColumnItem the item to insert

Implemented in VCF::DefaultColumnModel.

virtual void VCF::ColumnModel::removeContentsChangedHandler EventHandler handler  )  [pure virtual]
 

removes a handler that was interested in changes to the model.

Parameters:
EventHandler the handler to remove from future notifications

Implemented in VCF::DefaultColumnModel.

virtual void VCF::ColumnModel::removeItemAddedHandler EventHandler handler  )  [pure virtual]
 

removes a handler that was interested in item additions to the model.

Parameters:
EventHandler the handler to remove from future notifications

Implemented in VCF::DefaultColumnModel.

virtual void VCF::ColumnModel::removeItemDeletedHandler EventHandler handler  )  [pure virtual]
 

removes a handler that was interested in item deletions to the model.

Parameters:
EventHandler the handler to remove from future notifications

Implemented in VCF::DefaultColumnModel.


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information