API  0.9.8
 All Classes Files Functions Variables Typedefs Macros Groups Pages
CPRuleEditor Class Reference

A view for creating and configuring criteria. More...

#import <CPRuleEditor.h>

+ Inheritance diagram for CPRuleEditor:

Instance Methods

Configuring a Rule Editor
(id) - delegate
 Returns the receiver’s delegate. More...
 
(void) - setDelegate:
 Sets the receiver’s delegate. More...
 
(BOOL) - isEditable
 Returns a Boolean value that indicates whether the receiver is editable. More...
 
(void) - setEditable:
 Sets whether the receiver is editable. More...
 
(CPRuleEditorNestingMode) - nestingMode
 Returns the nesting mode for the receiver. More...
 
(void) - setNestingMode:
 Sets the nesting mode for the receiver. More...
 
(BOOL) - canRemoveAllRows
 Returns a Boolean value that indicates whether all the rows can be removed. More...
 
(void) - setCanRemoveAllRows:
 Sets whether all the rows can be removed. More...
 
(BOOL) - allowsEmptyCompoundRows
 Returns a Boolean value that indicates whether compounds rows can be childless. More...
 
(void) - setAllowsEmptyCompoundRows:
 Sets whether compounds rows can be childless. More...
 
(CPInteger) - rowHeight
 Returns the row height for the receiver. More...
 
(void) - setRowHeight:
 Sets the row height for the receiver. More...
 
Working with Formatting
(CPDictionary- formattingDictionary
 Returns the formatting dictionary for the receiver. More...
 
(void) - setFormattingDictionary:
 Sets the formatting dictionary for the receiver. More...
 
(CPString- formattingStringsFilename
 Returns the name of the strings file for the receiver. More...
 
(void) - setFormattingStringsFilename:
 Sets the name of the strings file used for formatting. More...
 
Providing Data
(void) - reloadCriteria
 Instructs the receiver to refetch criteria from its delegate. You can use this method to indicate that the available criteria may have changed and should be refetched from the delegate and the popups recalculated. More...
 
(void) - setCriteria:andDisplayValues:forRowAtIndex:
 Modifies the row at a given index to contain the given items and values. More...
 
(id) - criteriaForRow:
 Returns the currently chosen items for a given row. More...
 
Working with the Selection
(CPMutableArray- displayValuesForRow:
 Returns the chosen values for a given row. More...
 
(int) - numberOfRows
 Returns the number of rows in the receiver. More...
 
(int) - parentRowForRow:
 Returns the index of the parent of a given row. More...
 
(CPRuleEditorRowType) - rowTypeForRow:
 Returns the type of a given row. More...
 
(CPIndexSet- subrowIndexesForRow:
 Returns the immediate subrows of a given row. More...
 
(CPIndexSet- selectedRowIndexes
 Returns the indexes of the receiver’s selected rows. More...
 
(void) - selectRowIndexes:byExtendingSelection:
 Sets in the receiver the indexes of rows that are selected. More...
 
Manipulating Rows
(void) - addRow:
 Adds a row to the receiver. More...
 
(void) - insertRowAtIndex:withType:asSubrowOfRow:animate:
 Adds a new row of a given type at a given location. More...
 
(void) - removeRowAtIndex:
 Removes the row at a given index. More...
 
(void) - removeRowsAtIndexes:includeSubrows:
 Removes the rows at a given index. More...
 
Working with Predicates
(CPPredicate) - predicate
 Returns the predicate for the receiver. More...
 
(void) - reloadPredicate
 Instructs the receiver to regenerate its predicate by invoking the corresponding delegate method. You typically invoke this method because something has changed (for example, a view's value). More...
 
(CPPredicate) - predicateForRow:
 Returns the predicate for a given row. More...
 
Supporting Bindings
(Class) - rowClass
 Returns the class used to create a new row in the “rows” binding. More...
 
(void) - setRowClass:
 Sets the class to use to create a new row in the "rows” binding. More...
 
(CPString- rowTypeKeyPath
 Returns the key path for the row type. More...
 
(void) - setRowTypeKeyPath:
 Sets the key path for the row type. More...
 
(CPString- subrowsKeyPath
 Returns the key path for the subrows. More...
 
(void) - setSubrowsKeyPath:
 Sets the key path for the subrows. More...
 
(CPString- criteriaKeyPath
 Returns the criteria key path. More...
 
(void) - setCriteriaKeyPath:
 Sets the key path for the criteria. More...
 
(CPString- displayValuesKeyPath
 Returns the display values key path. More...
 
(void) - setDisplayValuesKeyPath:
 Sets the key path for the display values. More...
 
Configuring Rows Animation
(id) - animation
 Returns the current animation for the receiver. More...
 
(void) - setAnimation:
 Sets the current animation for the receiver. More...
 
- Instance Methods inherited from CPControl
(BOOL) - acceptsFirstMouse:
 
(SEL) - action
 
(CPTextAlignment) - alignment
 
(BOOL) - continueTracking:at:
 
(CPControlSize) - controlSize
 
(double) - doubleValue
 
(void) - encodeWithCoder:
 
(float) - floatValue
 
(CPFont- font
 
(CPFormatter- formatter
 
(void) - highlight:
 
(CPCellImagePosition) - imagePosition
 
(CPUInteger) - imageScaling
 
(id) - initWithCoder:
 
(id) - initWithFrame:
 
(int) - integerValue
 
(int) - intValue
 
(BOOL) - isContinuous
 
(BOOL) - isEnabled
 
(BOOL) - isHighlighted
 
(CPLineBreakMode) - lineBreakMode
 
(void) - mouseDown:
 
(unsigned) - mouseDownFlags
 
(void) - mouseEntered:
 
(void) - mouseExited:
 
(CPInteger) - nextState
 
(id) - objectValue
 
(void) - performClick:
 
(BOOL) - sendAction:to:
 
(int) - sendActionOn:
 
(BOOL) - sendsActionOnEndEditing
 
(void) - setAction:
 
(void) - setAlignment:
 
(void) - setContinuous:
 
(void) - setControlSize:
 
(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:
 
(BOOL) - startTrackingAt:
 
(void) - stopTracking:at:mouseIsUp:
 
(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) - trackMouse:
 
(BOOL) - tracksMouseOutsideOfFrame
 
(void) - unhighlightButtonTimerDidFinish:
 
(CPTextVerticalAlignment) - verticalAlignment
 
- Instance Methods inherited from CPView
(void) - addSubview:
 
(void) - addSubview:positioned:relativeTo:
 
(CGRect) - adjustScroll:
 
(float) - alphaValue
 
(BOOL) - autoresizesSubviews
 
(unsigned) - autoresizingMask
 
(BOOL) - autoscroll:
 
(CPColor- backgroundColor
 
(BOOL) - becomeFirstResponder
 
(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
 
(CPString- identifier
 
(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) - layoutSubviews
 
(void) - lockFocus
 
(CPMenu- menuForEvent:
 
(BOOL) - mouseDownCanMoveWindow
 
(BOOL) - needsDisplay
 
(BOOL) - needsLayout
 
(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:
 
(BOOL) - resignFirstResponder
 
(void) - resizeSubviewsWithOldSize:
 
(void) - resizeWithOldSuperviewSize:
 
(void) - rightMouseDown:
 
(CGSize) - scaleSize
 
(void) - scaleUnitSquareToSize:
 
(void) - scrollClipView:toPoint:
 
(void) - scrollPoint:
 
(void) - scrollRect:by:
 
(BOOL) - scrollRectToVisible:
 
(void) - setAlphaValue:
 
(void) - setAutoresizesSubviews:
 
(void) - setAutoresizingMask:
 
(void) - setBackgroundColor:
 
(void) - setBounds:
 
(void) - setBoundsOrigin:
 
(void) - setBoundsSize:
 
(void) - setCenter:
 
(void) - setClipsToBounds:
 
(void) - setFrame:
 
(void) - setFrameOrigin:
 
(void) - setFrameSize:
 
(void) - setHidden:
 
(void) - setHitTests:
 
(void) - setIdentifier:
 
(void) - setLayer:
 
(void) - setNeedsDisplay:
 
(void) - setNeedsDisplayInRect:
 
(void) - setNeedsLayout
 
(void) - setNeedsLayout:
 
(void) - setNextKeyView:
 
(void) - setPostsBoundsChangedNotifications:
 
(void) - setPostsFrameChangedNotifications:
 
(void) - setScaleSize:
 
(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) - viewWillMoveToSuperview:
 
(void) - viewWillMoveToWindow:
 
(void) - viewWillStartLiveResize
 
(CPView- viewWithTag:
 
(CGRect) - visibleRect
 
(BOOL) - wantsLayer
 
(void) - willRemoveSubview:
 
(CPWindow- window
 
- Instance Methods inherited from CPResponder
(BOOL) - acceptsFirstResponder
 
(void) - doCommandBySelector:
 
(void) - flagsChanged:
 
(void) - insertBackTab:
 
(void) - insertLineBreak:
 
(void) - insertNewline:
 
(void) - insertTab:
 
(void) - insertText:
 
(void) - interpretKeyEvents:
 
(void) - keyDown:
 
(void) - keyUp:
 
(CPMenu- menu
 
(void) - mouseDragged:
 
(void) - mouseMoved:
 
(void) - mouseUp:
 
(CPResponder- nextResponder
 
(void) - noResponderFor:
 
(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
 
(void) - bind:toObject:withKeyPath:options:
 
(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:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(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:
 

Additional Inherited Members

- Class Methods inherited from CPControl
(void) + initialize
 
(CPDictionary+ themeAttributes
 

Detailed Description

A view for creating and configuring criteria.

A CPRuleEditor object is a view that allows the user to visually create and configure a list of options which are expressed by the rule editor as a predicate (see Predicate documentation). The view has a delegate which offers a tree of choices to the view. The choices are presented by the view to the user as a row of popup buttons, static text fields, and custom views. Each row in the list represents a particular path down the tree of choices.

CPRuleEditor exposes one binding, rows. You can bind rows to an ordered collection (such as an instance of CPMutableArray). Each object in the collection should have the following properties:

@"rowType"
An integer representing the type of the row (CPRuleEditorRowType).

@"subrows"
An ordered to-many relation (such as an instance of CPMutableArray) containing the directly nested subrows for the given row.

@"displayValues"
An ordered to-many relation containing the display values for the row.

@"criteria"
An ordered to-many relation containing the criteria for the row.

Definition at line 2 of file CPRuleEditor.h.

Method Documentation

- (void) addRow: (id)  sender
implementation

Adds a row to the receiver.

Parameters
senderTypically the object that sent the message.
See Also
- insertRowAtIndex:withType:asSubrowOfRow:animate:

Definition at line 660 of file CPRuleEditor.j.

- (BOOL) allowsEmptyCompoundRows
implementation

Returns a Boolean value that indicates whether compounds rows can be childless.

Returns
YES if compounds rows can be childless, otherwise NO.
See Also
- setAllowsEmptyCompoundRows:

Definition at line 321 of file CPRuleEditor.j.

- (id) animation
implementation

Returns the current animation for the receiver.

Returns
The current animation for the receiver.
See Also
- setAnimation:

Definition at line 1055 of file CPRuleEditor.j.

- (BOOL) canRemoveAllRows
implementation

Returns a Boolean value that indicates whether all the rows can be removed.

Returns
YES if all the rows can be removed, otherwise NO.
See Also
- setCanRemoveAllRows:

Definition at line 300 of file CPRuleEditor.j.

- (id) criteriaForRow: (CPInteger)  row
implementation

Returns the currently chosen items for a given row.

Parameters
rowThe index of a row in the receiver.
Returns
The currently chosen items for row row.

Definition at line 473 of file CPRuleEditor.j.

- (CPString) criteriaKeyPath
implementation

Returns the criteria key path.

Returns
The criteria key path. The default value is "criteria". The key path is used to get the criteria for a row in the "rows" binding. The criteria objects are what the delegate returns from -#ruleEditor:child:forCriterion:withRowType: . The corresponding property should be an ordered to-many relationship.
See Also
- setCriteriaKeyPath:

Definition at line 1007 of file CPRuleEditor.j.

- (id) delegate
implementation

Returns the receiver’s delegate.

Returns
The receiver’s delegate.
See Also
- setDelegate:

Definition at line 209 of file CPRuleEditor.j.

- (CPMutableArray) displayValuesForRow: (CPInteger)  row
implementation

Returns the chosen values for a given row.

Parameters
rowThe index of a row in the receiver.
Returns
The chosen values (strings, views, or menu items) for row row. The values returned are the same as those returned from the delegate method -#ruleEditor:displayValueForCriterion:inRow:

Definition at line 492 of file CPRuleEditor.j.

- (CPString) displayValuesKeyPath
implementation

Returns the display values key path.

Returns
The display values key path. The default is "displayValues". The key path is used to get the display values for a row in the "rows" binding. The display values are what the delegate returns from -#ruleEditor:displayValueForCriterion:inRow: The corresponding property should be an ordered to-many relationship.
See Also
- setDisplayValuesKeyPath:

Definition at line 1030 of file CPRuleEditor.j.

- (CPDictionary) formattingDictionary
implementation

Returns the formatting dictionary for the receiver.

Returns
The formatting dictionary for the receiver.
See Also
- setFormattingDictionary:
- setFormattingStringsFilename:

Definition at line 371 of file CPRuleEditor.j.

- (CPString) formattingStringsFilename
implementation

Returns the name of the strings file for the receiver.

Returns
The name of the strings file for the receiver.
See Also
- setFormattingStringsFilename:

Definition at line 394 of file CPRuleEditor.j.

- (void) insertRowAtIndex: (int)  rowIndex
withType: (unsigned int)  rowType
asSubrowOfRow: (CPInteger)  parentRow
animate: (BOOL)  shouldAnimate 
implementation

Adds a new row of a given type at a given location.

Parameters
rowIndexThe index at which the new row should be inserted. rowIndex must be greater than parentRow, and much specify a row that does not fall amongst the children of some other parent.
rowTypeThe type of the new row.
parentRowThe index of the row of which the new row is a child. Pass -1 to indicate that the new row should be a root row.
shouldAnimateYES if creation of the new row should be animated, otherwise NO.
Note
Currently, shouldAnimate has no effect, rows are always animated when calling this method.
See Also
- addRow:

Definition at line 703 of file CPRuleEditor.j.

- (BOOL) isEditable
implementation

Returns a Boolean value that indicates whether the receiver is editable.

Returns
YES if the receiver is editable, otherwise NO. The default is YES.
See Also
- setEditable:

Definition at line 245 of file CPRuleEditor.j.

- (CPRuleEditorNestingMode) nestingMode
implementation

Returns the nesting mode for the receiver.

Returns
The nesting mode for the receiver.
See Also
- setNestingMode:

Definition at line 273 of file CPRuleEditor.j.

- (int) numberOfRows
implementation

Returns the number of rows in the receiver.

Returns
The number of rows in the receiver.

Definition at line 505 of file CPRuleEditor.j.

- (int) parentRowForRow: (CPInteger)  rowIndex
implementation

Returns the index of the parent of a given row.

Parameters
rowIndexThe index of a row in the receiver.
Returns
The index of the parent of the row at rowIndex. If the row at rowIndex is a root row, returns -1.

Definition at line 515 of file CPRuleEditor.j.

- (CPPredicate) predicate
implementation

Returns the predicate for the receiver.

Returns
If the delegate implements -#ruleEditor:predicatePartsForCriterion:withDisplayValue:inRow:, the predicate for the receiver. If not, or if the delegate does not return enough parts to construct a full predicate, returns nil.
See Also
- predicateForRow:

Definition at line 789 of file CPRuleEditor.j.

- (CPPredicate) predicateForRow: (CPInteger)  aRow
implementation

Returns the predicate for a given row.

Parameters
aRowThe index of a row in the receiver.
Returns
The predicate for the row at aRow. You should rarely have a need to call this directly, but you can override this method in a subclass to perform specialized predicate handling for certain criteria or display values.

Definition at line 809 of file CPRuleEditor.j.

- (void) reloadCriteria
implementation

Instructs the receiver to refetch criteria from its delegate. You can use this method to indicate that the available criteria may have changed and should be refetched from the delegate and the popups recalculated.

Definition at line 437 of file CPRuleEditor.j.

- (void) reloadPredicate
implementation

Instructs the receiver to regenerate its predicate by invoking the corresponding delegate method. You typically invoke this method because something has changed (for example, a view's value).

Definition at line 798 of file CPRuleEditor.j.

- (void) removeRowAtIndex: (int)  rowIndex
implementation

Removes the row at a given index.

Parameters
rowIndexThe index of a row in the receiver.
Warning
Raises a CPRangeException if rowIndex is less than 0 or greater than or equal to the number of rows.
See Also
- removeRowsAtIndexes:includeSubrows:

Definition at line 722 of file CPRuleEditor.j.

- (void) removeRowsAtIndexes: (CPIndexSet rowIndexes
includeSubrows: (BOOL)  includeSubrows 
implementation

Removes the rows at a given index.

Parameters
rowIndexesIndexes of one or more rows in the receiver.
includeSubrowsIf YES, then sub-rows of deleted rows are also deleted; if NO, then each sub-row is adopted by its first non-deleted ancestor, or becomes a root row.
Warning
Raises a CPRangeException if any index in rowIndexes is less than 0 or greater than or equal to the number of rows.
See Also
- removeRowAtIndex:

Definition at line 739 of file CPRuleEditor.j.

- (Class) rowClass
implementation

Returns the class used to create a new row in the “rows” binding.

Returns
The class used to create a new row in the "rows" binding.
See Also
- setRowClass:

Definition at line 936 of file CPRuleEditor.j.

- (CPInteger) rowHeight
implementation

Returns the row height for the receiver.

Returns
The row height for the receiver.
See Also
- setRowHeight:

Definition at line 342 of file CPRuleEditor.j.

- (CPRuleEditorRowType) rowTypeForRow: (CPInteger)  rowIndex
implementation

Returns the type of a given row.

Parameters
rowIndexThe index of a row in the receiver.
Returns
The type of the row at rowIndex.
Warning
Raises a CPRangeException if rowIndex is less than 0 or greater than or equal to the number of rows.

Definition at line 556 of file CPRuleEditor.j.

- (CPString) rowTypeKeyPath
implementation

Returns the key path for the row type.

Returns
The key path for the row type. The default value is "rowType". The key path is used to get the row type in the “rows” binding. The corresponding property should be a number that specifies an CPRuleEditorRowType value.
See Also
- setRowTypeKeyPath:

Definition at line 961 of file CPRuleEditor.j.

- (CPIndexSet) selectedRowIndexes
implementation

Returns the indexes of the receiver’s selected rows.

Returns
The indexes of the receiver’s selected rows.

Definition at line 616 of file CPRuleEditor.j.

- (void) selectRowIndexes: (CPIndexSet indexes
byExtendingSelection: (BOOL)  extend 
implementation

Sets in the receiver the indexes of rows that are selected.

Parameters
indexesThe indexes of rows in the receiver to select.
extendIf NO, the selected rows are specified by indexes. If YES, the rows indicated by indexes are added to the collection of already selected rows, providing multiple selection.

Definition at line 626 of file CPRuleEditor.j.

- (void) setAllowsEmptyCompoundRows: (BOOL)  allows
implementation

Sets whether compounds rows can be childless.

Parameters
allowsYES if compounds rows can be childless, otherwise NO.
See Also
- allowsEmptyCompoundRows

Definition at line 331 of file CPRuleEditor.j.

- (void) setAnimation: (CPViewAnimation animation
implementation

Sets the current animation for the receiver.

Parameters
animationA CPViewAnimation object used to animate rows. The default is a CPViewAnimation with a 0.5s duration and a CPAnimationEaseInOut curve.
See Also
- animation

Definition at line 1066 of file CPRuleEditor.j.

- (void) setCanRemoveAllRows: (BOOL)  canRemove
implementation

Sets whether all the rows can be removed.

Parameters
canRemoveYES if all the rows can be removed, otherwise NO.
See Also
- canRemoveAllRows

Definition at line 310 of file CPRuleEditor.j.

- (void) setCriteria: (CPArray)  criteria
andDisplayValues: (CPArray)  values
forRowAtIndex: (int)  rowIndex 
implementation

Modifies the row at a given index to contain the given items and values.

Parameters
criteriaThe array of criteria for the row at rowIndex. Pass an empty array to force the receiver to query its delegate. This value must not be nil.
valuesThe array of values for the row at rowIndex. Pass an empty array to force the receiver to query its delegate. This value must not be nil.
rowIndexThe index of a row in the receiver.

It is your responsibility to ensure that each item in the array is a child of the previous item, and that the first item is a root item for the row type. If the last item has child items, then the items array will be extended by querying the delegate for child items until a childless item is reached.

Definition at line 452 of file CPRuleEditor.j.

- (void) setCriteriaKeyPath: (CPString keyPath
implementation

Sets the key path for the criteria.

Parameters
keyPathThe key path for the criteria.
See Also
- criteriaKeyPath

Definition at line 1017 of file CPRuleEditor.j.

- (void) setDelegate: (id <CPRuleEditorDelegate>)  aDelegate
implementation

Sets the receiver’s delegate.

Parameters
aDelegateThe delegate for the receiver. CPRuleEditor requires a delegate that implements the required delegate methods to function.
See Also
- delegate

Definition at line 220 of file CPRuleEditor.j.

- (void) setDisplayValuesKeyPath: (CPString keyPath
implementation

Sets the key path for the display values.

Parameters
keyPathThe key path for the the display values.
See Also
- displayValuesKeyPath

Definition at line 1040 of file CPRuleEditor.j.

- (void) setEditable: (BOOL)  editable
implementation

Sets whether the receiver is editable.

Parameters
editableYES if the receiver is editable, otherwise NO.
See Also
- isEditable:

Definition at line 255 of file CPRuleEditor.j.

- (void) setFormattingDictionary: (CPDictionary dictionary
implementation

Sets the formatting dictionary for the receiver.

Parameters
dictionaryThe formatting dictionary for the receiver. If you set the formatting dictionary with this method, it sets the current formatting strings file name to nil.
See Also
- formattingDictionary
- formattingStringsFilename

Definition at line 383 of file CPRuleEditor.j.

- (void) setFormattingStringsFilename: (CPString stringsFilename
implementation

Sets the name of the strings file used for formatting.

Parameters
stringsFilenameThe name of the strings file for the receiver. CPRuleEditor looks for a strings file with the given name in the main bundle and (if appropriate) the bundle containing the nib file from which it was loaded. If it finds a strings file resource with the given name, CPRuleEditor loads it and sets it as the formatting dictionary for the receiver. You can obtain the resulting dictionary using formattingDictionary. If you set the formatting dictionary with -setFormattingDictionary:, it sets the current formatting strings file name nil.
See Also
- formattingStringsFilename

Definition at line 406 of file CPRuleEditor.j.

- (void) setNestingMode: (CPRuleEditorNestingMode)  mode
implementation

Sets the nesting mode for the receiver.

Parameters
modeThe nesting mode for the receiver. You typically set the nesting mode at view creation time and do not subsequently modify it. The default is CPRuleEditorNestingModeSimple.
See Also
- nestingMode
Note
Currently CPRuleEditorNestingModeCompound is experimental.

Definition at line 285 of file CPRuleEditor.j.

- (void) setRowClass: (Class)  rowClass
implementation

Sets the class to use to create a new row in the "rows” binding.

Parameters
rowClassThe class to use to create a new row in the "rows” binding.
See Also
- rowClass

Definition at line 946 of file CPRuleEditor.j.

- (void) setRowHeight: (float)  height
implementation

Sets the row height for the receiver.

Parameters
heightThe row height for the receiver.
See Also
- rowHeight

Definition at line 352 of file CPRuleEditor.j.

- (void) setRowTypeKeyPath: (CPString keyPath
implementation

Sets the key path for the row type.

Parameters
keyPathThe key path for the row type.
See Also
- rowTypeKeyPath

Definition at line 971 of file CPRuleEditor.j.

- (void) setSubrowsKeyPath: (CPString keyPath
implementation

Sets the key path for the subrows.

Parameters
keyPathThe key path for the subrows.
See Also
- subrowsKeyPath

Definition at line 994 of file CPRuleEditor.j.

- (CPIndexSet) subrowIndexesForRow: (CPInteger)  rowIndex
implementation

Returns the immediate subrows of a given row.

Parameters
rowIndexThe index of a row in the receiver, or -1 to get the top-level rows.
Returns
The immediate subrows of the row at rowIndex. Rows are numbered starting at 0.

Definition at line 577 of file CPRuleEditor.j.

- (CPString) subrowsKeyPath
implementation

Returns the key path for the subrows.

Returns
The key path for the subrows. The default value is "subrows". The key path is used to get the nested rows in the “rows” binding. The corresponding property should be an ordered to-many relationship containing additional bound row objects.
See Also
- setSubrowsKeyPath:

Definition at line 984 of file CPRuleEditor.j.


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