API  0.9.6
 All Classes Files Functions Variables Macros Modules Pages
CPTableView Class Reference

#import <CPTableView.h>

+ Inheritance diagram for CPTableView:

Instance Methods

(BOOL) - acceptsFirstResponder
 
(void) - addTableColumn:
 
(BOOL) - allowsColumnReordering
 
(BOOL) - allowsColumnResizing
 
(BOOL) - allowsColumnSelection
 
(BOOL) - allowsEmptySelection
 
(BOOL) - allowsMultipleSelection
 
(CPArray- alternatingRowBackgroundColors
 
(CPString- autosaveName
 
(BOOL) - autosaveTableColumns
 
(BOOL) - becomeFirstResponder
 
(void) - bind:toObject:withKeyPath:options:
 
(BOOL) - canDragRowsWithIndexes:atPoint:
 
(CPInteger) - clickedColumn
 
(CPInteger) - clickedRow
 
(CPInteger) - columnAtPoint:
 
(unsigned) - columnAutoresizingStyle
 
(CPIndexSet- columnIndexesInRect:
 
(CPInteger) - columnWithIdentifier:
 
(void) - concludeDragOperation:
 
(BOOL) - continueTracking:at:
 
(void) - controlTextDidBlur:
 
(CPView- cornerView
 
(id) - dataSource
 
(id) - delegate
 
(void) - deselectAll
 
(void) - deselectColumn:
 
(void) - deselectRow:
 
(BOOL) - disableAutomaticResizing
 
(SEL) - doubleAction
 
(void) - draggedImage:endedAt:operation:
 
(void) - draggedView:endedAt:operation:
 
(CPTableViewDraggingDestinationFeedbackStyle) - draggingDestinationFeedbackStyle
 
(void) - draggingEnded:
 
(CPDragOperation) - draggingEntered:
 
(void) - draggingExited:
 
(CPDragOperation) - draggingUpdated:
 
(CPImage- dragImageForRowsWithIndexes:tableColumns:event:offset:
 
(CPView- dragViewForRowsWithIndexes:tableColumns:event:offset:
 
(void) - drawBackgroundInClipRect:
 
(void) - drawGridInClipRect:
 
(void) - drawRow:clipRect:
 
(void) - editColumn:row:withEvent:select:
 
(CPInteger) - editedColumn
 
(CPInteger) - editedRow
 
(void) - encodeWithCoder:
 
(CGRect) - exposedRect
 
(CGRect) - frameOfDataViewAtColumn:row:
 
(CPColor- gridColor
 
(unsigned) - gridStyleMask
 
(CPView- headerView
 
(CPTableColumn- highlightedTableColumn
 
(void) - highlightSelectionInClipRect:
 
(id) - initWithCoder:
 
(id) - initWithFrame:
 
(CGSize) - intercellSpacing
 
(BOOL) - isColumnSelected:
 
(BOOL) - isRowSelected:
 
(void) - keyDown:
 
(void) - layoutSubviews
 
(void) - load
 
(CPMenu- menuForEvent:
 
(void) - moveColumn:toColumn:
 
(void) - noteHeightOfRowsWithIndexesChanged:
 
(void) - noteNumberOfRowsChanged
 
(int) - numberOfColumns
 
(int) - numberOfRows
 
(CPInteger) - numberOfSelectedColumns
 
(CPInteger) - numberOfSelectedRows
 
(BOOL) - performDragOperation:
 
(BOOL) - prepareForDragOperation:
 
(CGRect) - rectOfColumn:
 
(CGRect) - rectOfRow:
 
(void) - reloadData
 
(void) - reloadDataForRowIndexes:columnIndexes:
 
(void) - removeTableColumn:
 
(void) - resizeWithOldSuperviewSize:
 
(CPInteger) - rowAtPoint:
 
(unsigned) - rowHeight
 
(CPRange) - rowsInRect:
 
(void) - scrollColumnToVisible:
 
(void) - scrollRowToVisible:
 
(void) - selectColumnIndexes:byExtendingSelection:
 
(int) - selectedColumn
 
(CPIndexSet- selectedColumnIndexes
 
(int) - selectedRow
 
(CPIndexSet- selectedRowIndexes
 
(CPDictionary- selectionGradientColors
 
(CPColor- selectionHighlightColor
 
(unsigned) - selectionHighlightStyle
 
(void) - selectRowIndexes:byExtendingSelection:
 
(void) - setAllowsColumnReordering:
 
(void) - setAllowsColumnResizing:
 
(void) - setAllowsColumnSelection:
 
(void) - setAllowsEmptySelection:
 
(void) - setAllowsMultipleSelection:
 
(void) - setAlternatingRowBackgroundColors:
 
(void) - setAutosaveName:
 
(void) - setAutosaveTableColumns:
 
(void) - setBoundsOrigin:
 
(void) - setBoundsSize:
 
(void) - setColumnAutoresizingStyle:
 
(void) - setCornerView:
 
(void) - setDataSource:
 
(void) - setDelegate:
 
(void) - setDisableAutomaticResizing:
 
(void) - setDoubleAction:
 
(void) - setDraggingDestinationFeedbackStyle:
 
(void) - setDraggingSourceOperationMask:forLocal:
 
(void) - setDropRow:dropOperation:
 
(void) - setFrameOrigin:
 
(void) - setFrameSize:
 
(void) - setGridColor:
 
(void) - setGridStyleMask:
 
(void) - setHeaderView:
 
(void) - setHighlightedTableColumn:
 
(void) - setIndicatorImage:inTableColumn:
 
(void) - setIntercellSpacing:
 
(void) - setNeedsDisplay:
 
(void) - setNeedsLayout
 
(void) - setRowHeight:
 
(void) - setSelectionGradientColors:
 
(void) - setSelectionHighlightColor:
 
(void) - setSelectionHighlightStyle:
 
(void) - setSortDescriptors:
 
(void) - setUsesAlternatingRowBackgroundColors:
 
(void) - setVerticalMotionCanBeginDrag:
 
(void) - sizeLastColumnToFit
 
(CPArray- sortDescriptors
 
(BOOL) - startTrackingAt:
 
(void) - stopTracking:at:mouseIsUp:
 
(void) - superviewBoundsChanged:
 
(void) - superviewFrameChanged:
 
(CPArray- tableColumns
 
(CPTableColumn- tableColumnWithIdentifier:
 
(void) - tile
 
(void) - trackMouse:
 
(BOOL) - tracksMouseOutsideOfFrame
 
(BOOL) - usesAlternatingRowBackgroundColors
 
(BOOL) - verticalMotionCanBeginDrag
 
(void) - viewWillMoveToSuperview:
 
(BOOL) - wantsPeriodicDraggingUpdates
 
- Instance Methods inherited from CPControl
(SEL) - action
 
(CPTextAlignment) - alignment
 
(double) - doubleValue
 
(float) - floatValue
 
(CPFont- font
 
(CPFormatter- formatter
 
(void) - highlight:
 
(CPCellImagePosition) - imagePosition
 
(CPImageScaling) - imageScaling
 
(int) - integerValue
 
(int) - intValue
 
(BOOL) - isContinuous
 
(BOOL) - isEnabled
 
(BOOL) - isHighlighted
 
(CPLineBreakMode) - lineBreakMode
 
(void) - mouseDown:
 
(unsigned) - mouseDownFlags
 
(void) - mouseEntered:
 
(void) - mouseExited:
 
(int) - nextState
 
(id) - objectValue
 
(void) - performClick:
 
(BOOL) - sendAction:to:
 
(int) - sendActionOn:
 
(BOOL) - sendsActionOnEndEditing
 
(void) - setAction:
 
(void) - setAlignment:
 
(void) - setContinuous:
 
(void) - setDoubleValue:
 
(void) - setEnabled:
 
(void) - setFloatValue:
 
(void) - setFont:
 
(void) - setFormatter:
 
(void) - setHighlighted:
 
(void) - setImagePosition:
 
(void) - setImageScaling:
 
(void) - setIntegerValue:
 
(void) - setIntValue:
 
(void) - setLineBreakMode:
 
(void) - setObjectValue:
 
(void) - setSendsActionOnEndEditing:
 
(void) - setState:
 
(void) - setStringValue:
 
(void) - setTarget:
 
(void) - setTextColor:
 
(void) - setTextShadowColor:
 
(void) - setTextShadowOffset:
 
(void) - setVerticalAlignment:
 
(CPString- stringValue
 
(void) - takeDoubleValueFrom:
 
(void) - takeFloatValueFrom:
 
(void) - takeIntegerValueFrom:
 
(void) - takeIntValueFrom:
 
(void) - takeObjectValueFrom:
 
(void) - takeStringValueFrom:
 
(id) - target
 
(CPColor- textColor
 
(void) - textDidBeginEditing:
 
(void) - textDidChange:
 
(void) - textDidEndEditing:
 
(CPColor- textShadowColor
 
(CGSize) - textShadowOffset
 
(void) - unhighlightButtonTimerDidFinish:
 
(CPTextVerticalAlignment) - verticalAlignment
 
- Instance Methods inherited from CPView
(BOOL) - acceptsFirstMouse:
 
(void) - addSubview:
 
(void) - addSubview:positioned:relativeTo:
 
(CGRect) - adjustScroll:
 
(float) - alphaValue
 
(BOOL) - autoresizesSubviews
 
(unsigned) - autoresizingMask
 
(BOOL) - autoscroll:
 
(CPColor- backgroundColor
 
(CGRect) - bounds
 
(CGPoint) - boundsOrigin
 
(CGSize) - boundsSize
 
(BOOL) - canBecomeKeyView
 
(CGPoint) - center
 
(BOOL) - clipsToBounds
 
(CGPoint) - convertPoint:fromView:
 
(CGPoint) - convertPoint:toView:
 
(CGPoint) - convertPointFromBase:
 
(CGPoint) - convertPointToBase:
 
(CGRect) - convertRect:fromView:
 
(CGRect) - convertRect:toView:
 
(CGRect) - convertRectFromBase:
 
(CGRect) - convertRectToBase:
 
(CGSize) - convertSize:fromView:
 
(CGSize) - convertSize:toView:
 
(CPView- createEphemeralSubviewNamed:
 
(id) - currentValueForThemeAttribute:
 
(void) - didAddSubview:
 
(void) - display
 
(void) - displayIfNeeded
 
(void) - displayIfNeededInRect:
 
(void) - displayRect:
 
(void) - displayRectIgnoringOpacity:inContext:
 
(void) - dragImage:at:offset:event:pasteboard:source:slideBack:
 
(void) - dragView:at:offset:event:pasteboard:source:slideBack:
 
(void) - drawRect:
 
(CPMenuItem- enclosingMenuItem
 
(CPScrollView- enclosingScrollView
 
(BOOL) - enterFullScreenMode
 
(BOOL) - enterFullScreenMode:withOptions:
 
(CPView- ephemeralSubviewNamed:
 
(void) - exitFullScreenMode
 
(void) - exitFullScreenModeWithOptions:
 
(CGRect) - frame
 
(CGPoint) - frameOrigin
 
(CGSize) - frameSize
 
(BOOL) - hasThemeAttribute:
 
(BOOL) - hasThemeState:
 
(CPView- hitTest:
 
(BOOL) - hitTests
 
(id) - init
 
(BOOL) - inLiveResize
 
(BOOL) - isDescendantOf:
 
(BOOL) - isFlipped
 
(BOOL) - isHidden
 
(BOOL) - isHiddenOrHasHiddenAncestor
 
(BOOL) - isInFullScreenMode
 
(BOOL) - isOpaque
 
(CALayer- layer
 
(CPView- layoutEphemeralSubviewNamed:positioned:relativeToEphemeralSubviewNamed:
 
(void) - layoutIfNeeded
 
(void) - lockFocus
 
(BOOL) - mouseDownCanMoveWindow
 
(BOOL) - needsDisplay
 
(BOOL) - needsPanelToBecomeKey
 
(CPView- nextKeyView
 
(CPView- nextValidKeyView
 
(BOOL) - performKeyEquivalent:
 
(BOOL) - postsBoundsChangedNotifications
 
(BOOL) - postsFrameChangedNotifications
 
(CPView- previousKeyView
 
(CPView- previousValidKeyView
 
(CGRect) - rectForEphemeralSubviewNamed:
 
(void) - reflectScrolledClipView:
 
(CPArray- registeredDraggedTypes
 
(void) - registerForDraggedTypes:
 
(void) - registerThemeValues:
 
(void) - registerThemeValues:inherit:
 
(void) - removeFromSuperview
 
(void) - replaceSubview:with:
 
(void) - resizeSubviewsWithOldSize:
 
(void) - rightMouseDown:
 
(void) - scrollClipView:toPoint:
 
(void) - scrollPoint:
 
(void) - scrollRect:by:
 
(BOOL) - scrollRectToVisible:
 
(void) - setAlphaValue:
 
(void) - setAutoresizesSubviews:
 
(void) - setAutoresizingMask:
 
(void) - setBackgroundColor:
 
(void) - setBounds:
 
(void) - setCenter:
 
(void) - setClipsToBounds:
 
(void) - setFrame:
 
(void) - setHidden:
 
(void) - setHitTests:
 
(void) - setLayer:
 
(void) - setNeedsDisplayInRect:
 
(void) - setNextKeyView:
 
(void) - setPostsBoundsChangedNotifications:
 
(void) - setPostsFrameChangedNotifications:
 
(void) - setSubviews:
 
(void) - setTag:
 
(void) - setTheme:
 
(void) - setThemeClass:
 
(BOOL) - setThemeState:
 
(void) - setToolTip:
 
(void) - setValue:forThemeAttribute:
 
(void) - setValue:forThemeAttribute:inState:
 
(void) - setWantsLayer:
 
(CPArray- subviews
 
(CPView- superview
 
(CPInteger) - tag
 
(CPTheme- theme
 
(CPString- themeClass
 
(unsigned) - themeState
 
(CPString- toolTip
 
(void) - unlockFocus
 
(void) - unregisterDraggedTypes
 
(BOOL) - unsetThemeState:
 
(id) - valueForThemeAttribute:
 
(id) - valueForThemeAttribute:inState:
 
(void) - viewDidChangeTheme
 
(void) - viewDidEndLiveResize
 
(void) - viewDidHide
 
(void) - viewDidMoveToSuperview
 
(void) - viewDidMoveToWindow
 
(void) - viewDidUnhide
 
(void) - viewWillDraw
 
(void) - viewWillMoveToWindow:
 
(void) - viewWillStartLiveResize
 
(CPView- viewWithTag:
 
(CGRect) - visibleRect
 
(BOOL) - wantsLayer
 
(void) - willRemoveSubview:
 
(CPWindow- window
 
- Instance Methods inherited from CPResponder
(void) - doCommandBySelector:
 
(void) - flagsChanged:
 
(void) - insertBackTab:
 
(void) - insertLineBreak:
 
(void) - insertNewline:
 
(void) - insertTab:
 
(void) - insertText:
 
(void) - interpretKeyEvents:
 
(void) - keyUp:
 
(CPMenu- menu
 
(void) - mouseDragged:
 
(void) - mouseMoved:
 
(void) - mouseUp:
 
(CPResponder- nextResponder
 
(void) - noResponderFor:
 
(BOOL) - resignFirstResponder
 
(void) - rightMouseUp:
 
(void) - scrollWheel:
 
(void) - setMenu:
 
(void) - setNextResponder:
 
(BOOL) - tryToPerform:with:
 
(CPUndoManager- undoManager
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray- exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(CPString+ defaultThemeClass
 
(id) + themeAttributes
 
- Class Methods inherited from CPControl
(void) + initialize
 
- Class Methods inherited from CPView
(CPMenu+ defaultMenu
 
(CPSet+ keyPathsForValuesAffectingBounds
 
(CPSet+ keyPathsForValuesAffectingFrame
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(Class) + class
 
(void) + exposeBinding:
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isSubclassOfClass:
 
(CPSet+ keyPathsForValuesAffectingValueForKey:
 
(id) + new
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Additional Inherited Members

- Instance Variables inherited from CPObject
Class isa
 

Detailed Description

CPTableView object displays record-oriented data in a table and allows the user to edit values and resize and rearrange columns. A CPTableView requires you to either set a data source which implements numberOfRowsInTableView: and tableView:objectValueForTableColumn:row:, or alternatively to provide data through Key Value Bindings.

To use a table view with Key Value Bindings, bind each column's CPValueBinding to an array.field path - typically this would be to a path in an array controller like arrangedObjects.X, where X is the name of a field. Optionally also bind the table's selectionIndexes and sortDescriptors to the array controller.

All delegate and data source methods are documented in the setDataSource: and setDelegate: methods.

If you want to display something other than just text in the table you should call setDataView: on a CPTableColumn object. More documentation in that class including theme states.

Note
CPTableView does not contain its own scrollview. You should be sure you place the tableview in a CPScrollView on your own.

Definition at line 2 of file CPTableView.h.

Method Documentation

- (BOOL) acceptsFirstResponder
implementation

Reimplemented from CPResponder.

Definition at line 4611 of file CPTableView.j.

- (void) addTableColumn: (CPTableColumn aTableColumn
implementation

Adds a given column as the last column of the receiver.

Parameters
aColumnThe column to add to the receiver.

Reimplemented in CPOutlineView.

Definition at line 877 of file CPTableView.j.

- (BOOL) allowsColumnReordering
implementation

Returns YES if the user is allowed to reorder the columns, otherwise NO.

Definition at line 566 of file CPTableView.j.

- (BOOL) allowsColumnResizing
implementation

Returns YES if the user is allowed to manually resize the columns, otherwise NO.

Definition at line 583 of file CPTableView.j.

- (BOOL) allowsColumnSelection
implementation

Returns YES if the user is allowed to select a column by clicking it, otherwise NO.

Definition at line 638 of file CPTableView.j.

- (BOOL) allowsEmptySelection
implementation

Returns YES if the tableview is allowed to have an unselected row or column, otherwise NO.

Definition at line 619 of file CPTableView.j.

- (BOOL) allowsMultipleSelection
implementation

Returns YES if the tableview is allowed to have multiple selections, otherwise NO.

Returns
BOOL - YES if the tableview is allowed to have multiple selections otherwise NO.

Definition at line 602 of file CPTableView.j.

- (CPArray) alternatingRowBackgroundColors
implementation

Returns an array of the alternating background colors

Definition at line 735 of file CPTableView.j.

- (CPString) autosaveName
implementation

Returns the autosave name of the tableview.

Definition at line 2222 of file CPTableView.j.

- (BOOL) autosaveTableColumns
implementation

Returns YES the table columns should autosave, otherwise NO.

Definition at line 2241 of file CPTableView.j.

- (BOOL) becomeFirstResponder
implementation

Reimplemented from CPResponder.

Definition at line 4603 of file CPTableView.j.

- (void) bind: (CPString aBinding
toObject: (id)  anObject
withKeyPath: (CPString aKeyPath
options: (CPDictionary options 
implementation

Reimplemented from CPObject.

Provided by category CPTableView(Bindings).

Definition at line 4800 of file CPTableView.j.

- (BOOL) canDragRowsWithIndexes: (CPIndexSet rowIndexes
atPoint: (CGPoint)  mouseDownPoint 
implementation

Returns whether the receiver allows dragging the rows at rowIndexes with a drag initiated at mousedDownPoint.

Parameters
rowIndexesan index set of rows to be dragged
aPointthe point at which the mouse was clicked.

Definition at line 2781 of file CPTableView.j.

- (CPInteger) clickedColumn
implementation

Definition at line 540 of file CPTableView.j.

- (CPInteger) clickedRow
implementation

Returns the index of the the row the user clicked to trigger an action, or -1 if no row was clicked.

Definition at line 548 of file CPTableView.j.

- (CPInteger) columnAtPoint: (CGPoint)  aPoint
implementation

Returns the index of a column at a given point. If no column is there CPNotFound is returned.

Parameters
aPointa CGPoint

Definition at line 1750 of file CPTableView.j.

- (unsigned) columnAutoresizingStyle
implementation

Returns the column auto resizing style of the receiver.

Definition at line 2026 of file CPTableView.j.

- (CPIndexSet) columnIndexesInRect: (CGRect)  aRect
implementation

Returns the indexes of the receiver's columns that intersect the specified rectangle.

Parameters
aRecta rectangle in the coordinate system of the receiver.

Definition at line 1716 of file CPTableView.j.

- (CPInteger) columnWithIdentifier: (CPString anIdentifier
implementation

Returns the index of the column with the specified identifier

Parameters
anIdentifierthe string value of the tablecolumn identifier
Returns
the index of the column

Definition at line 1033 of file CPTableView.j.

- (void) concludeDragOperation: (id)  sender
implementation

Definition at line 4468 of file CPTableView.j.

- (BOOL) continueTracking: (CGPoint)  lastPoint
at: (CGPoint)  aPoint 
implementation

Reimplemented from CPControl.

Definition at line 4103 of file CPTableView.j.

- (void) controlTextDidBlur: (CPNotification theNotification
implementation

Blur notification handler for editing textfields. This will always be called when a textfield loses focus. This method is responsible for restoring the dataview to its non editable state.

Definition at line 3434 of file CPTableView.j.

- (CPView) cornerView
implementation

Returns the cornerview for the scrollview

Definition at line 1458 of file CPTableView.j.

- (id) dataSource
implementation

Returns the object that provides the data displayed by the receiver.

Reimplemented in CPOutlineView.

Definition at line 474 of file CPTableView.j.

+ (CPString) defaultThemeClass
implementation

Reimplemented from CPView.

Definition at line 245 of file CPTableView.j.

- (id) delegate
implementation

Returns the delegate object for the table view.

Reimplemented in CPOutlineView.

Definition at line 2581 of file CPTableView.j.

- (void) deselectAll
implementation

Deselects all rows

Definition at line 1363 of file CPTableView.j.

- (void) deselectColumn: (CPInteger)  anIndex
implementation

Deselects the column at a given index

Parameters
anIndexthe index of the column to deselect

Definition at line 1300 of file CPTableView.j.

- (void) deselectRow: (CPInteger)  aRow
implementation

Deselects a row at a given index

Parameters
aRowthe row to deselect

Definition at line 1313 of file CPTableView.j.

- (BOOL) disableAutomaticResizing
implementation

Synthesized accessor method.

Provided by category CPTableView(CPSynthesizedAccessors).

Definition at line 5108 of file CPTableView.j.

- (SEL) doubleAction
implementation

Returns the double click action selector.

Definition at line 532 of file CPTableView.j.

- (void) draggedImage: (CPImage anImage
endedAt: (CGPoint)  aLocation
operation: (CPDragOperation)  anOperation 
implementation

Definition at line 4476 of file CPTableView.j.

- (void) draggedView: (CPImage aView
endedAt: (CGPoint)  aLocation
operation: (CPDragOperation)  anOperation 
implementation

Definition at line 4486 of file CPTableView.j.

- (CPTableViewDraggingDestinationFeedbackStyle) draggingDestinationFeedbackStyle
implementation

Returns the tableview dragging destination feedback style.

Can be:

        CPTableViewDraggingDestinationFeedbackStyleNone
        CPTableViewDraggingDestinationFeedbackStyleRegular
        CPTableViewDraggingDestinationFeedbackStyleSourceList

Definition at line 2951 of file CPTableView.j.

- (void) draggingEnded: (id)  sender
implementation

Definition at line 4290 of file CPTableView.j.

- (CPDragOperation) draggingEntered: (id)  sender
implementation

Definition at line 4257 of file CPTableView.j.

- (void) draggingExited: (id)  sender
implementation

Definition at line 4282 of file CPTableView.j.

- (CPDragOperation) draggingUpdated: (id)  sender
implementation

Definition at line 4398 of file CPTableView.j.

- (CPImage) dragImageForRowsWithIndexes: (CPIndexSet dragRows
tableColumns: (CPArray theTableColumns
event: (CPEvent dragEvent
offset: (CGPoint)  dragImageOffset 
implementation

Computes and returns an image to use for dragging. This method is invoked ONLY IF dragViewForRowsWithIndexes:tableColumns:event:offset: returns nil.

Parameters
dragRowsan index set with the dragged row indexes
theTableColumnsan array of the table columns which are being dragged
dragEventthe event which initiated the drag
offseta point at which to set the drag image to be offset from the cursor
Returns
CPImage an image to use for the drag feedback

Definition at line 2796 of file CPTableView.j.

- (CPView) dragViewForRowsWithIndexes: (CPIndexSet theDraggedRows
tableColumns: (CPArray theTableColumns
event: (CPEvent theDragEvent
offset: (CGPoint)  dragViewOffset 
implementation

Computes and returns a view to use for dragging. By default this is a slightly transparent copy of the dataviews which are being dragged. You can override this in a subclass to show different dragging feedback. Additionally you can return nil from this method and implement:

  • (CPImage)dragImageForRowsWithIndexes:tableColumns:event:offset: - if you want to return a simple image.
Parameters
dragRowsan index set with the dragged row indexes
theTableColumnsan array of the table columns which are being dragged
dragEventthe event which initiated the drag
offseta point at which to set the drag image to be offset from the cursor
Returns
CPView a view used as the dragging feedback

Definition at line 2813 of file CPTableView.j.

- (void) drawBackgroundInClipRect: (CGRect)  aRect
implementation

Draws the background in a given clip rect. This method should only be overridden if you want something other than a solid color or alternating row colors.

Note
this method should not be called directly, instead use setNeedsDisplay:

Definition at line 3569 of file CPTableView.j.

- (void) drawGridInClipRect: (CGRect)  aRect
implementation

Draws the grid for the tableview based on the set grid mask in a given clip rect.

Note
this method should not be called directly, instead use setNeedsDisplay:

Definition at line 3623 of file CPTableView.j.

- (void) drawRow: (CPInteger)  row
clipRect: (CGRect)  rect 
implementation

While this method doesn't do anything in Cappuccino, subclasses can override it to customize the appearance of a row.

Note
tableView:willDisplayView:forTableColumn:row is sent to the delegate before drawing

Definition at line 3948 of file CPTableView.j.

- (void) editColumn: (CPInteger)  columnIndex
row: (CPInteger)  rowIndex
withEvent: (CPEvent theEvent
select: (BOOL)  flag 
implementation

Edits the dataview at a given row and column. This method is usually invoked automatically and should rarely be invoked directly The row at supplied rowIndex must be selected otherwise an exception is thrown.

Parameters
columnIndexthe index of the column to edit
rowIndexthe index of the row to edit
theEventthe mouse event which triggers the edit, you can pass nil
flagYES if the dataview text should be selected, otherwise NO. (NOT YET IMPLEMENTED)

Definition at line 1415 of file CPTableView.j.

- (CPInteger) editedColumn
implementation

Returns the column of the currently edited cell, or CPNotFound if none.

Definition at line 1438 of file CPTableView.j.

- (CPInteger) editedRow
implementation

Returns the row of the currently edited cell, or CPNotFound if none.

Definition at line 1448 of file CPTableView.j.

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Archives the view to a coder.

Parameters
aCoderthe object into which the view's data will be archived.

Reimplemented from CPControl.

Reimplemented in CPOutlineView.

Provided by category CPTableView(CPCoding).

Definition at line 4899 of file CPTableView.j.

- (CGRect) exposedRect
implementation

Returns a CGRect of the exposed area of the tableview.

Definition at line 3086 of file CPTableView.j.

- (CGRect) frameOfDataViewAtColumn: (CPInteger)  aColumn
row: (CPInteger)  aRow 
implementation

Returns a rect for the dataview / cell at the column and row given. If the column or row index is greater than the number of columns or rows a CGZeroRect is returned

Parameters
aColumnindex of the column
aRowindex of the row

Reimplemented in CPOutlineView.

Definition at line 1836 of file CPTableView.j.

- (CPColor) gridColor
implementation

Returns a CPColor object of set grid color

Definition at line 843 of file CPTableView.j.

- (unsigned) gridStyleMask
implementation

Returns a grid mask

Definition at line 866 of file CPTableView.j.

- (CPView) headerView
implementation

Returns the headerview for the receiver. The headerview contains column headerviews for each table column.

Definition at line 1482 of file CPTableView.j.

- (CPTableColumn) highlightedTableColumn
implementation

Returns the CPTableColumn object of the highlighted table column.

Definition at line 2750 of file CPTableView.j.

- (void) highlightSelectionInClipRect: (CGRect)  aRect
implementation

Draws the selection with the set selection highlight style in a given clip rect. You can change the highlight style to a source list style gradient in setSelectionHighlightStyle:

Note
this method should not be called directly, instead use setNeedsDisplay:

Definition at line 3699 of file CPTableView.j.

- (id) initWithCoder: (CPCoder aCoder
implementation

Initializes the view from an archive.

Parameters
aCoderthe coder from which to initialize
Returns
the initialized view

Reimplemented from CPControl.

Reimplemented in CPOutlineView.

Provided by category CPTableView(CPCoding).

Definition at line 4850 of file CPTableView.j.

- (id) initWithFrame: (CGRect)  aFrame
implementation

Initializes the receiver for usage with the specified bounding rectangle

Returns
the initialized view

Reimplemented from CPControl.

Reimplemented in CPOutlineView.

Definition at line 259 of file CPTableView.j.

- (CGSize) intercellSpacing
implementation

Returns the intercell spacing in a CGSize object.

Definition at line 670 of file CPTableView.j.

- (BOOL) isColumnSelected: (CPInteger)  anIndex
implementation

Returns YES if the column at a given index is selected, otherwise NO.

Parameters
anIndexthe index of a column
Returns
YES if the column is selected, otherwise NO.

Definition at line 1343 of file CPTableView.j.

- (BOOL) isRowSelected: (CPInteger)  aRow
implementation

Returns YES if the row at a given index is selected, otherwise NO.

Parameters
aRowthe index of a row
Returns
YES if the row is selected, otherwise NO.

Definition at line 1354 of file CPTableView.j.

- (void) keyDown: (CPEvent anEvent
implementation

Reimplemented from CPResponder.

Reimplemented in CPOutlineView.

Definition at line 4619 of file CPTableView.j.

- (void) layoutSubviews
implementation

Reimplemented from CPView.

Definition at line 3957 of file CPTableView.j.

- (void) load
implementation

Loads all the data and dataviews for the receiver.

Reimplemented from CPObject.

Definition at line 3107 of file CPTableView.j.

- (CPMenu) menuForEvent: (CPEvent theEvent
implementation

Reimplemented from CPView.

Definition at line 4072 of file CPTableView.j.

- (void) moveColumn: (int)  theColumnIndex
toColumn: (int)  theToIndex 
implementation

Moves the column and heading at a given index to a new given index.

Parameters
theColumnIndexThe current index of the column to move.
theToIndexThe new index for the moved column.

Definition at line 993 of file CPTableView.j.

- (void) noteHeightOfRowsWithIndexesChanged: (CPIndexSet anIndexSet
implementation

Informs the receiver that the rows specified in indexSet have changed height.

Parameters
anIndexSetan index set containing the indexes of the rows which changed height

Definition at line 2105 of file CPTableView.j.

- (void) noteNumberOfRowsChanged
implementation

Informs the receiver that the number of records in the datasource has changed.

Definition at line 2067 of file CPTableView.j.

- (int) numberOfColumns
implementation

Returns the number of columns in the table

Definition at line 1372 of file CPTableView.j.

- (int) numberOfRows
implementation

Returns the number of rows in the receiver.

Definition at line 1380 of file CPTableView.j.

- (CPInteger) numberOfSelectedColumns
implementation

Returns the number of selected columns

Definition at line 1324 of file CPTableView.j.

- (CPInteger) numberOfSelectedRows
implementation

Returns the number of selected columns

Definition at line 1332 of file CPTableView.j.

- (BOOL) performDragOperation: (id)  sender
implementation

Definition at line 4453 of file CPTableView.j.

- (BOOL) prepareForDragOperation: (id)  sender
implementation

Definition at line 4441 of file CPTableView.j.

- (CGRect) rectOfColumn: (CPInteger)  aColumnIndex
implementation

Returns a CGRect with the location and size of the column If aColumnIndex lies outside the range of the table columns a CGZeroRect is returned

Parameters
aColumnIndexthe index of the column to return the rect of

Definition at line 1571 of file CPTableView.j.

- (CGRect) rectOfRow: (CPInteger)  aRowIndex
implementation

Returns a CGRect with the location and size of the row. CGRectZero is returned if aRowIndex doesn't exist.

Parameters
aRowIndexthe index of the row you want the rect of

Definition at line 1645 of file CPTableView.j.

- (void) reloadData
implementation

Reloads the data for all rows and columns.

Reimplemented in CPOutlineView.

Definition at line 496 of file CPTableView.j.

- (void) reloadDataForRowIndexes: (CPIndexSet rowIndexes
columnIndexes: (CPIndexSet columnIndexes 
implementation

Reloads the data for only the specified rows and columns.

Parameters
rowIndexesThe indexes of the rows to update.
columnIndexesThe indexes of the columns to update.

Definition at line 486 of file CPTableView.j.

- (void) removeTableColumn: (CPTableColumn aTableColumn
implementation

Removes a given column from the receiver.

Parameters
aTableColumnThe column to remove from the receiver.

Reimplemented in CPOutlineView.

Definition at line 906 of file CPTableView.j.

- (void) resizeWithOldSuperviewSize: (CGSize)  aSize
implementation

Reimplemented from CPView.

Definition at line 1854 of file CPTableView.j.

- (CPInteger) rowAtPoint: (CGPoint)  aPoint
implementation

Returns the index of a row at a particular point. If no row exists CPNotFound is returned.

Parameters
aPointa CGPoint

Definition at line 1799 of file CPTableView.j.

- (unsigned) rowHeight
implementation

Returns the height of each row.

Definition at line 697 of file CPTableView.j.

- (CPRange) rowsInRect: (CGRect)  aRect
implementation

Returns a range of indices for the rows that lie wholly or partially within the vertical boundaries of a given rectangle.

Parameters
aRectA rectangle in the coordinate system of the receiver.

Definition at line 1657 of file CPTableView.j.

- (void) scrollColumnToVisible: (int)  columnIndex
implementation

Scrolls the receiver and header view horizontally in an enclosing CPClipView so the column specified by columnIndex is visible.

Parameters
aColumnIndexthe index of the column to scroll to.

Definition at line 2190 of file CPTableView.j.

- (void) scrollRowToVisible: (int)  rowIndex
implementation

Scrolls the receiver vertically in an enclosing CPClipView so the row specified by rowIndex is visible.

Parameters
aRowIndexthe index of the row to scroll to.

Definition at line 2174 of file CPTableView.j.

- (void) selectColumnIndexes: (CPIndexSet columns
byExtendingSelection: (BOOL)  shouldExtendSelection 
implementation

Sets the column selection using indexes.

Parameters
columnsa CPIndexSet of columns to select
aFlagshould extend the selection thereby retaining the previous selection

Definition at line 1077 of file CPTableView.j.

- (int) selectedColumn
implementation

Returns the index of the last selected column.

Definition at line 1266 of file CPTableView.j.

- (CPIndexSet) selectedColumnIndexes
implementation

Returns an index set of all the selected columns.

Definition at line 1274 of file CPTableView.j.

- (int) selectedRow
implementation

Returns the index of the last selected row.

Definition at line 1282 of file CPTableView.j.

- (CPIndexSet) selectedRowIndexes
implementation

Returns an index set with the indexes of all the selected rows.

Definition at line 1290 of file CPTableView.j.

- (CPDictionary) selectionGradientColors
implementation

Returns a dictionary of containing the keys:

    CPSourceListGradient
    CPSourceListTopLineColor
    CPSourceListBottomLineColor

Definition at line 824 of file CPTableView.j.

- (CPColor) selectionHighlightColor
implementation

Returns the highlight color for a row or column selection.

Definition at line 793 of file CPTableView.j.

- (unsigned) selectionHighlightStyle
implementation

Returns an enumerated value for the selection highlight style.

Valid values are:
        CPTableViewSelectionHighlightStyleNone
        CPTableViewSelectionHighlightStyleRegular
        CPTableViewSelectionHighlightStyleSourceList

Definition at line 751 of file CPTableView.j.

- (void) selectRowIndexes: (CPIndexSet rows
byExtendingSelection: (BOOL)  shouldExtendSelection 
implementation

Sets the row selection using indexes.

Parameters
rowsa CPIndexSet of rows to select
aFlagshould extend the selection thereby retaining the previous selection

Definition at line 1135 of file CPTableView.j.

- (void) setAllowsColumnReordering: (BOOL)  shouldAllowColumnReordering
implementation

If you want to allow the user to reorder the columns pass YES, otherwise NO.

Definition at line 558 of file CPTableView.j.

- (void) setAllowsColumnResizing: (BOOL)  shouldAllowColumnResizing
implementation

Passing YES will allow the user to resize columns. Passing NO will keep the table columns unmovable by the user.

Note
The this does not affect autoresizing behavior.

Definition at line 575 of file CPTableView.j.

- (void) setAllowsColumnSelection: (BOOL)  shouldAllowColumnSelection
implementation

Controls whether the user can select an entire column by clicking its header.

Parameters
aFlagYES to allow the user to select columns, otherwise NO.

Definition at line 629 of file CPTableView.j.

- (void) setAllowsEmptySelection: (BOOL)  shouldAllowEmptySelection
implementation

Controls whether the receiver allows zero rows or columns to be selected.

Parameters
aFlagYES if an empty selection is allowed, otherwise NO.

Definition at line 611 of file CPTableView.j.

- (void) setAllowsMultipleSelection: (BOOL)  shouldAllowMultipleSelection
implementation

Controls whether the user can select more than one row or column at a time.

Parameters
aFlagYES to allow the user to select multiple rows or columns, otherwise NO.

Definition at line 592 of file CPTableView.j.

- (void) setAlternatingRowBackgroundColors: (CPArray alternatingRowBackgroundColors
implementation

Sets the colors for the rows as they alternate. The number of colors can be arbitrary. By default these colors are white and light blue.

Parameters
anArrayan array of CPColors

Definition at line 725 of file CPTableView.j.

- (void) setAutosaveName: (CPString theAutosaveName
implementation

Set the name under which the table information is automatically saved to theAutosaveName. The table information is saved separately for each user and for each application that user uses.

Note
Even though a table view has an autosave name, it may not be saving table information automatically. To set whether table information is being saved automatically, use setAutosaveTableColumns:

Definition at line 2208 of file CPTableView.j.

- (void) setAutosaveTableColumns: (BOOL)  shouldAutosave
implementation

Sets whether the order and width of this table view's columns are automatically saved.

The table information is saved separately for each user and for each application that user uses.

Note
that if autosaveName returns nil, this setting is ignored and table information isn't saved.

Definition at line 2233 of file CPTableView.j.

- (void) setBoundsOrigin: (CGPoint)  aPoint
implementation

Reimplemented from CPView.

Definition at line 3508 of file CPTableView.j.

- (void) setBoundsSize: (CGSize)  aSize
implementation

Reimplemented from CPView.

Definition at line 3518 of file CPTableView.j.

- (void) setColumnAutoresizingStyle: (unsigned)  style
implementation

Sets the column autoresizing style of the receiver to a given style.

Parameters
aStylethe column autoresizing style for the receiver. Valid values are:
        CPTableViewNoColumnAutoresizing
        CPTableViewUniformColumnAutoresizingStyle
        CPTableViewLastColumnOnlyAutoresizingStyle
        CPTableViewFirstColumnOnlyAutoresizingStyle

Definition at line 2017 of file CPTableView.j.

- (void) setCornerView: (CPView aView
implementation

Sets the cornerview for the scrollview

Definition at line 1466 of file CPTableView.j.

- (void) setDataSource: (id)  aDataSource
implementation

Sets the receiver's data source to a given object. The data source implements various methods for handling the tableview's data when bindings are not used.

Parameters
anObjectThe data source for the receiver. This object must implement numberOfRowsInTableView: and tableView:objectValueForTableColumn:row:

These methods are outlined below.

Overview

CPTableView generally requires a datasource to run. This data source can be thought of just like a delegate, but specifically for the tableview data. Methods include:

You must implement these data source methods:

Returns the number of rows in the tableview

- (int)numberOfRowsInTableView:(CPTableView)aTableView;

Returns the object value for each dataview. Each dataview will be sent a setObjectValue: method which will contain the object you return from this datasource method.

- (id)tableView:(CPTableView)aTableView objectValueForTableColumn:(CPTableColumn)aColumn row:(int)aRowIndex;

Editing:

Sets the data object for an item in a given row and column. This needs to be implemented if you want inline editing support

- (void)tableView:(CPTableView)aTableView setObjectValue:(id)anObject forTableColumn:(CPTableColumn)aTableColumn row:(int)rowIndex;

Sorting:

The tableview will call this method if you click the tableheader. You should sort the datasource based off of the new sort descriptors and reload the data

- (void)tableView:(CPTableView)aTableView sortDescriptorsDidChange:(CPArray)oldDescriptors;

Drag and Drop:

Note
In order for the tableview to receive drops don't forget to first register the tableview for drag types like you do with every other view.

Return the drag operation (move, copy, etc) that should be performed if a registered drag type is over the tableview The data source can retarget a drop if you want by calling

-(void)setDropRow:(int)aRow dropOperation:(CPTableViewDropOperation)anOperation;
- (CPDragOperation)tableView:(CPTableView)aTableView validateDrop:(CPDraggingInfo)info proposedRow:(int)row proposedDropOperation:(CPTableViewDropOperation)operation;

Returns YES if the drop operation is allowed otherwise NO. This method is invoked by the tableview after a drag should begin, but before it is started. If you don't want the drag to being return NO. If you want the drag to begin you should return YES and place the drag data on the pboard.

- (BOOL)tableView:(CPTableView)aTableView writeRowsWithIndexes:(CPIndexSet)rowIndexes toPasteboard:(CPPasteboard)pboard;

Return YES if the operation was successful otherwise return NO. The data source should incorporate the data from the dragging pasteboard in this method implementation. To get this data use the draggingPasteboard method on the CPDraggingInfo object.

- (BOOL)tableView:(CPTableView)aTableView acceptDrop:(CPDraggingInfo)info row:(int)row dropOperation:(CPTableViewDropOperation)operation;

NOT YET IMPLEMENTED

- (CPArray)tableView:(CPTableView)aTableView namesOfPromisedFilesDroppedAtDestination:(CPURL)dropDestination forDraggedRowsWithIndexes:(CPIndexSet)indexSet;

Reimplemented in CPOutlineView.

Definition at line 431 of file CPTableView.j.

- (void) setDelegate: (id)  aDelegate
implementation

Sets the delegate of the receiver.

Parameters
aDelegatethe delegate object for the tableview.

The delegate can provide easy notification for user interaction, display behaviour, contextual menus, and more.

Displaying Cells:

Called when the tableview is about to display a dataview

- (void)tableView:(CPTableView)aTableView willDisplayView:(id)aView forTableColumn:(CPTableColumn)aTableColumn row:(int)rowIndex;

Group rows are a way to separate a groups of data in a tableview. Return YES if the given row is a group row, otherwise NO.

- (BOOL)tableView:(CPTableView)tableView isGroupRow:(int)row;

Editing Cells:

Return YES if the dataview at a given index and column should be edited, otherwise NO.

- (BOOL)tableView:(CPTableView)aTableView shouldEditTableColumn:(CPTableColumn)aTableColumn row:(int)rowIndex;

Setting Row and Column Size:

Return the height of the row at a given index. Only implement this if you want variable row heights. Otherwise use setRowHeight: on the tableview.

- (float)tableView:(CPTableView)tableView heightOfRow:(int)row;

Selection:

Note
These methods are only called when the user does something.

Return YES if the selection of the tableview should change, otherwise NO to keep the current selection.

- (BOOL)selectionShouldChangeInTableView:(CPTableView)aTableView;

Return YES if the row at a given index should be selected, other NO to deny the selection.

- (BOOL)tableView:(CPTableView)aTableView shouldSelectRow:(int)rowIndex;

Return YES if the table column given should be selected, otherwise NO to deny the selection.

- (BOOL)tableView:(CPTableView)aTableView shouldSelectTableColumn:(CPTableColumn)aTableColumn;

Inform the delegate that the tableview is in the process of chaining the selection. This usually happens when the user is dragging their mouse across rows.

- (void)tableViewSelectionIsChanging:(CPNotification)aNotification

Informs the delegate that the tableview selection has changed.

- (void)tableViewSelectionDidChange:(CPNotification)aNotification;

Moving and Resizing Columns:

Return YES if the column at a given index should move to a new column index, otherwise NO.

- (BOOL)tableView:(CPTableView)tableView shouldReorderColumn:(int)columnIndex toColumn:(int)newColumnIndex;

Notifies the delegate that the tableview drag occurred. This is send on mouse up.

- (void)tableView:(CPTableView)tableView didDragTableColumn:(CPTableColumn)tableColumn;

Notifies the delegate that a tablecolumn was moved by the user.

- (void)tableViewColumnDidMove:(CPNotification)aNotification;

Notifies the delegate that the user resized the table column

- (void)tableViewColumnDidResize:(CPNotification)aNotification;

Responding to Mouse Events:

Sent when the user clicks a table column but doesn't drag.

- (void)tableView:(CPTableView)tableView didClickTableColumn:(CPTableColumn)tableColumn;

Notify the delegate that the user click the table header of a column.

- (void)tableView:(CPTableView)tableView mouseDownInHeaderOfTableColumn:(CPTableColumn)tableColumn;

Contextual Menus:

Called when the user right clicks on the tableview. -1 is passed for the row or column if the user doesn't right click on a real row or column Return a CPMenu that should be displayed if the user right clicks. If you do not implement this the tableview will just call super on menuForEvent

- (CPMenu)tableView:(CPTableView)aTableView menuForTableColumn:(CPTableColumn)aColumn row:(int)aRow;

Delete Key

Called when the user presses the delete key. Many times you will want to delete data (or prompt for deletion) when the user hids the delete key. Your delegate can implement this method to avoid subclassing the tableview to add this behaviour.

- (void)tableViewDeleteKeyPressed:(CPTableView)aTableView;

Reimplemented in CPOutlineView.

Definition at line 2455 of file CPTableView.j.

- (void) setDisableAutomaticResizing: (BOOL)  aValue
implementation

Synthesized accessor method.

Provided by category CPTableView(CPSynthesizedAccessors).

Definition at line 5116 of file CPTableView.j.

- (void) setDoubleAction: (SEL)  anAction
implementation

Sets the message sent to the target when the user double-clicks an uneditable cell or a column header to a given selector.

Parameters
aSelectorThe message the receiver sends to its target when the user double-clicks an uneditable cell or a column header.

Definition at line 524 of file CPTableView.j.

- (void) setDraggingDestinationFeedbackStyle: (CPTableViewDraggingDestinationFeedbackStyle)  aStyle
implementation

Sets the feedback style for when the table is the destination of a drag operation. This style is used to determine how the tableview looks when it is the receiver of a drag and drop operation.

Can be:

        CPTableViewDraggingDestinationFeedbackStyleNone
        CPTableViewDraggingDestinationFeedbackStyleRegular
        CPTableViewDraggingDestinationFeedbackStyleSourceList

Definition at line 2935 of file CPTableView.j.

- (void) setDraggingSourceOperationMask: (CPDragOperation)  mask
forLocal: (BOOL)  isLocal 
implementation

Sets the default operation mask for the drag behavior of the table view.

Note
isLocal is not implemented.

Definition at line 2897 of file CPTableView.j.

- (void) setDropRow: (CPInteger)  row
dropOperation: (CPTableViewDropOperation)  operation 
implementation

This should be called inside tableView:validateDrop:... method either CPTableViewDropOn or CPTableViewDropAbove, Specify the row as -1 to select the whole table for drop on.

Definition at line 2908 of file CPTableView.j.

- (void) setFrameOrigin: (CGPoint)  aPoint
implementation

Reimplemented from CPView.

Definition at line 3498 of file CPTableView.j.

- (void) setFrameSize: (CGSize)  aSize
implementation

we override here because we have to adjust the header

Reimplemented from CPView.

Definition at line 3485 of file CPTableView.j.

- (void) setGridColor: (CPColor aColor
implementation

Sets the grid color in the non highlighted state.

Parameters
aColora CPColor

Definition at line 833 of file CPTableView.j.

- (void) setGridStyleMask: (unsigned)  aGrideStyleMask
implementation

Sets the grid style mask to specify if no grid lines, vertical grid lines, or horizontal grid lines should be displayed.

Parameters
gridTypeThe grid style mask. CPTableViewGridNone, CPTableViewSolidVerticalGridLineMask, CPTableViewSolidHorizontalGridLineMask

Definition at line 853 of file CPTableView.j.

- (void) setHeaderView: (CPView aHeaderView
implementation

Sets the headerview for the tableview. This is the container view for the table column header views. This view also handles events for resizing and dragging.

If you don't want your tableview to have a headerview you should pass nil. (also see setCornerView:) If you're looking to customize the header text of a column see CPTableColumn's -(CPView)headerView; method.

Definition at line 1495 of file CPTableView.j.

- (void) setHighlightedTableColumn: (CPTableColumn aTableColumn
implementation

Sets the table column for which the header should be highlighted.

Definition at line 2758 of file CPTableView.j.

- (void) setIndicatorImage: (CPImage anImage
inTableColumn: (CPTableColumn aTableColumn 
implementation

Sets the indicator image of aTableColumn to anImage. The tableview will set the sort indicator images automatically; if you want a different image you can supply it here.

Parameters
anImagethe image for the column
aTableColumnthe table column object for which to set the image

Definition at line 2721 of file CPTableView.j.

- (void) setIntercellSpacing: (CGSize)  aSize
implementation

Sets the width and height between dataviews. This value is (3.0, 2.0) by default.

Parameters
aSizea CGSize object that defines the space between the cells

Definition at line 650 of file CPTableView.j.

- (void) setNeedsDisplay: (BOOL)  aFlag
implementation

Reimplemented from CPView.

Definition at line 3528 of file CPTableView.j.

- (void) setNeedsLayout
implementation

Reimplemented from CPView.

Definition at line 3539 of file CPTableView.j.

- (void) setRowHeight: (unsigned)  aRowHeight
implementation

Sets the height of each row.

Note
This may still used even if variable row height is being used.
Parameters
aRowHeightthe height of each row

Definition at line 681 of file CPTableView.j.

- (void) setSelectionGradientColors: (CPDictionary aDictionary
implementation

Sets the highlight gradient for a row or column selection This is specific to the

Parameters
aDictionarya CPDictionary expects three keys to be set:
        CPSourceListGradient which is a CGGradient
        CPSourceListTopLineColor which is a CPColor
        CPSourceListBottomLineColor which is a CPColor

Definition at line 809 of file CPTableView.j.

- (void) setSelectionHighlightColor: (CPColor aColor
implementation

Sets the highlight color for a row or column selection.

Parameters
aColora CPColor

Definition at line 783 of file CPTableView.j.

- (void) setSelectionHighlightStyle: (unsigned)  aSelectionHighlightStyle
implementation

Sets the selection highlight style to an enumerated value. This value can also affect the way the tableview draws feedback when the user is dragging.

Valid values are:

        CPTableViewSelectionHighlightStyleNone
        CPTableViewSelectionHighlightStyleRegular
        CPTableViewSelectionHighlightStyleSourceList

Definition at line 767 of file CPTableView.j.

- (void) setSortDescriptors: (CPArray sortDescriptors
implementation

Sets the table view's CPSortDescriptors objects in an array.

Parameters
sortDescriptorsan array of sort descriptors.

Definition at line 3001 of file CPTableView.j.

- (void) setUsesAlternatingRowBackgroundColors: (BOOL)  shouldUseAlternatingRowBackgroundColors
implementation

Sets whether the receiver uses the standard alternating row colors for its background.

Parameters
aFlagYES to specify standard alternating row colors for the background, NO to specify a solid color.

Definition at line 707 of file CPTableView.j.

- (void) setVerticalMotionCanBeginDrag: (BOOL)  aFlag
implementation

Sets whether vertical motion is treated as a drag or selection change to flag.

Parameters
aFlagif flag is NO then vertical motion will not start a drag. The default is YES.

Definition at line 2961 of file CPTableView.j.

- (void) sizeLastColumnToFit
implementation

Resizes the last column if there's room so the receiver fits exactly within its enclosing clip view.

Definition at line 2034 of file CPTableView.j.

- (CPArray) sortDescriptors
implementation

Returns an array of the current sort descriptors currently used by the table.

Definition at line 3044 of file CPTableView.j.

- (BOOL) startTrackingAt: (CGPoint)  aPoint
implementation

Reimplemented from CPControl.

Definition at line 4034 of file CPTableView.j.

- (void) stopTracking: (CGPoint)  lastPoint
at: (CGPoint)  aPoint
mouseIsUp: (BOOL)  mouseIsUp 
implementation

Reimplemented from CPControl.

Definition at line 4186 of file CPTableView.j.

- (void) superviewBoundsChanged: (CPNotification aNotification
implementation

Definition at line 4005 of file CPTableView.j.

- (void) superviewFrameChanged: (CPNotification aNotification
implementation

Definition at line 4016 of file CPTableView.j.

- (CPArray) tableColumns
implementation

Returns an array of CPTableColumns of all the receiver's columns.

Definition at line 1022 of file CPTableView.j.

- (CPTableColumn) tableColumnWithIdentifier: (CPString anIdentifier
implementation

Returns the CPTableColumn object with the given identifier string.

Parameters
anIdentifierthe string value of the identifier
Returns
a CPTableColumn object with the given identifier

Definition at line 1051 of file CPTableView.j.

+ (id) themeAttributes
implementation

Reimplemented from CPControl.

Definition at line 253 of file CPTableView.j.

- (void) tile
implementation

Lays out the dataviews and resizes the tableview so that everything fits.

Definition at line 2131 of file CPTableView.j.

- (void) trackMouse: (CPEvent anEvent
implementation

Reimplemented from CPControl.

Definition at line 4088 of file CPTableView.j.

- (BOOL) tracksMouseOutsideOfFrame
implementation

Returns YES if the receiver tracks the mouse outside the frame, otherwise NO.

Reimplemented from CPControl.

Definition at line 4026 of file CPTableView.j.

- (BOOL) usesAlternatingRowBackgroundColors
implementation

Returns YES if the tableview uses alternating row background colors, otherwise NO.

Definition at line 715 of file CPTableView.j.

- (BOOL) verticalMotionCanBeginDrag
implementation

Returns YES if vertical motion can begin a drag of the tableview, otherwise NO.

Definition at line 2969 of file CPTableView.j.

- (void) viewWillMoveToSuperview: (CPView aView
implementation

Reimplemented from CPView.

Definition at line 3965 of file CPTableView.j.

- (BOOL) wantsPeriodicDraggingUpdates
implementation

Definition at line 4309 of file CPTableView.j.


The documentation for this class was generated from the following files: