Inherits from: NSObject
Package: com.apple.yellow.application
An NSTableColumn stores the display characteristics and attribute identifier for a column in an NSTableView. The NSTableColumn determines the width and width limits, resizability, and editability of its column in the NSTableView. It also stores two NSCell objects: the header cell, which is used to draw the column header, and the data cell, used to draw the values for each row. You can control the display of the column by setting the subclasses of NSCell used and by setting the font and other display characteristics for these NSCells. For example, you can use the default NSTextFieldCell for displaying string values or substitute an NSImageCell to display pictures.
See the NSTableView class specification for a general overview.
- Creating an NSTableColumn instance
- initWithIdentifier:
- Setting the identifier
- setIdentifier
- identifier
- Setting the NSTableView
- setTableView
- tableView
- Controlling size
- setWidth
- width
- setMinWidth
- minWidth
- setMaxWidth
- maxWidth
- setResizable
- isResizable
- sizeToFit
- Controlling editability
- setEditable
- isEditable
- Setting component cells
- setHeaderCell
- headerCell
- setDataCell
- dataCell
public NSTableColumn(Object anObject)
public NSCell dataCell()
See Also: setDataCell
public NSCell headerCell()
See Also: setHeaderCell
- (id)initWithIdentifier:anObject
See the NSTableView class specification for information on identifiers.
See Also: setIdentifier
public Object identifier()
See Also: setIdentifier
public boolean isEditable()
true
if
the user can edit cells associated with the NSTableColumn by double-clicking
the column in the NSTableView, false
otherwise. You
can initiate editing programmatically regardless of this setting
with NSTableView's editColumn:row:withEvent:select: method.See Also: setEditable
public boolean isResizable()
true
if
the user is allowed to resize the NSTableColumn in its NSTableView, false
otherwise. You
can change the size programmatically regardless of this setting.See Also: setWidth, setMinWidth, setMaxWidth, setResizable
public float maxWidth()
See Also: minWidth, width, setMaxWidth, - sizeToFit (NSTableView) - autoresizesAllColumnsToFit (NSTableView)
public float minWidth()
See Also: maxWidth, width, setMinWidth, - sizeToFit (NSTableView) - autoresizesAllColumnsToFit (NSTableView)
public void setDataCell(NSCell aCell)
See Also: dataCell
public void setEditable(boolean flag)
- (void)setEditable:(BOOL)flag
true
a
double click initiates editing; if flag is false
it merely
sends the double action to the NSTableView's target. You can initiate editing
programmatically regardless of this setting with NSTableView's editColumn:row:withEvent:select: method.See Also: isEditable
public void setHeaderCell(NSCell aCell)
null
.See Also: headerCell
public void setIdentifier(Object anObject)
See Also: identifier
public void setMaxWidth(float maxWidth)
See Also: setMinWidth, setWidth, maxWidth, - sizeToFit (NSTableView) - autoresizesAllColumnsToFit (NSTableView)
public void setMinWidth(float minWidth)
See Also: setMaxWidth, setWidth, minWidth, - sizeToFit (NSTableView) - autoresizesAllColumnsToFit (NSTableView)
public void setResizable(boolean flag)
true
the
user can resize the receiver; if flag is false
the
user can't resize it. You can always set the size programmatically.See Also: isResizable, setWidth, setMinWidth, setMaxWidth
public void setTableView(NSTableView aTableView)
See Also: tableView, - addTableColumn: (NSTableView)
public void setWidth(float newWidth)
This method posts NSTableViewColumnDidResizeNotification on behalf of the NSTableColumn's NSTableView.
See Also: width, setMinWidth, setMaxWidth, - sizeToFit (NSTableView) - autoresizesAllColumnsToFit (NSTableView)
public void sizeToFit()
See Also: width, minWidth, maxWidth, - sizeToFit (NSTableView) - autoresizesAllColumnsToFit (NSTableView)
public NSTableView tableView()
See Also: setTableView
public float width()