Class CPCollectionViewItem

CPObject
    extended byCPCollectionViewItem

@implementation CPCollectionViewItem : CPObject

Represents an object inside a CPCollectionView.


Method Summary
-(id)initWithCoder:(CPCoder)aCoder
          Initializes the view item by unarchiving data from a coder.
-(id)initWithCoder:(CPCoder)aCoder
          Initializes the view item by unarchiving data from a coder.
-(CPCollectionView)collectionView
          Returns the collection view of which this item is a part.
-(void)encodeWithCoder:(CPCoder)aCoder
          Archives the colletion view item to the provided coder.
-(void)encodeWithCoder:(CPCoder)aCoder
          Archives the colletion view item to the provided coder.
-(BOOL)isSelected
          Returns YES if the item is currently selected.
-(id)representedObject
          Returns the object represented by this view item.
-(void)setRepresentedObject:(id)anObject
          Sets the object to be represented by this item.
-(void)setSelected:(BOOL)shouldBeSelected
          Sets whether this view item should be selected.
-(void)setView:(CPView)aView
          Sets the view that is used represent this object.
-(CPView)view
          Returns the view that represents this object.

Methods inherited from class CPObject
initialize, alloc, class, instanceMethodForSelector, instancesRespondToSelector, isSubclassOfClass, load, new, setVersion, superclass, version, init, autorelease, awakeAfterUsingCoder, class, classForCoder, classForKeyedArchiver, className, copy, dealloc, description, doesNotRecognizeSelector, forwardInvocation, hash, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableCopy, performSelector, performSelector, performSelector, release, replacementObjectForArchiver, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, retain, self, superclass


Method Detail

initWithCoder

-(id)initWithCoder:(CPCoder)aCoder
Initializes the view item by unarchiving data from a coder.
Parameters:
aCoder - the coder from which the data will be unarchived
Returns:
the initialized collection view item

initWithCoder

-(id)initWithCoder:(CPCoder)aCoder
Initializes the view item by unarchiving data from a coder.
Parameters:
aCoder - the coder from which the data will be unarchived
Returns:
the initialized collection view item

collectionView

-(CPCollectionView)collectionView
Returns the collection view of which this item is a part.

encodeWithCoder

-(void)encodeWithCoder:(CPCoder)aCoder
Archives the colletion view item to the provided coder.
Parameters:
aCoder - the coder to which the view item should be archived

encodeWithCoder

-(void)encodeWithCoder:(CPCoder)aCoder
Archives the colletion view item to the provided coder.
Parameters:
aCoder - the coder to which the view item should be archived

isSelected

-(BOOL)isSelected
Returns YES if the item is currently selected. NO if the item is not selected.

representedObject

-(id)representedObject
Returns the object represented by this view item

setRepresentedObject

-(void)setRepresentedObject:(id)anObject
Sets the object to be represented by this item.
Parameters:
anObject - the object to be represented

setSelected

-(void)setSelected:(BOOL)shouldBeSelected
Sets whether this view item should be selected.
Parameters:
shouldBeSelected - YES makes the item selected. NO deselects it.

setView

-(void)setView:(CPView)aView
Sets the view that is used represent this object.
Parameters:
aView - the view used to represent this object

view

-(CPView)view
Returns the view that represents this object.

Created on Sat Sep 13 14:15:43 PDT 2008