- 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.
- Constructors
- NSTableColumn
- 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
- dataCellForRow
public NSTableColumn()
public NSTableColumn(Object anObject)
public NSCell dataCell()
See Also: setDataCell
public NSCell dataCellForRow(int row)
public NSCell headerCell()
See Also: setHeaderCell
public Object identifier()
See Also: setIdentifier
public boolean isEditable()
true
if
the user can edit cells associated with the receiver by double-clicking
the column in the NSTableView, false
otherwise. You
can initiate editing programmatically regardless of this setting
with NSTableView's editLocation method.See Also: setEditable
public boolean isResizable()
true
if
the user is allowed to resize the receiver 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, autoresizesAllColumnsToFit (NSTableView)
public float minWidth()
See Also: maxWidth, width, setMinWidth, autoresizesAllColumnsToFit (NSTableView)
public void setDataCell(NSCell aCell)
See Also: dataCell
public void setEditable(boolean 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 editLocation 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, autoresizesAllColumnsToFit (NSTableView)
public void setMinWidth(float minWidth)
See Also: setMaxWidth, setWidth, minWidth, 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 TableViewColumnDidResizeNotification on behalf of the receiver's NSTableView.
See Also: width, setMinWidth, setMaxWidth, autoresizesAllColumnsToFit (NSTableView)
public void sizeToFit()
See Also: width, minWidth, maxWidth, autoresizesAllColumnsToFit (NSTableView)
public NSTableView tableView()
See Also: setTableView
public float width()