- Inherits from:
- NSCell : NSObject
- Package:
- com.apple.yellow.application
NSBrowserCell is the subclass of NSCell used by default to display data in the columns of an NSBrowser. (Each column contains an NSMatrix filled with NSBrowserCells.) An NSBrowserCell can be a leaf or branch cell. A branch cell displays an image indicating that, when the cell is clicked, the NSBrowser will display a new column of NSBrowserCells; branch cells are thus important to the display of hierarchical information typical of NSBrowsers. An NSBrowserCell can also be loaded or unloaded; loaded NSBrowserCells have their state set and are ready for display.
Many of NSBrowserCell's methods are designed to interact with NSBrowser and NSBrowser's delegate. The delegate implements methods for loading the NSCells in NSBrowser by setting their values and status. If your code needs access to a specific NSBrowserCell, you can use the NSBrowser method loadedCellAtLocation.
Because NSBrowserCells do not inherit from NSActionCell, they don't hold target and action values and thus don't participate in the target/action paradigm of the Application Kit. However, NSBrowser does allow you to specify a target and an action, and you can obtain the last selected NSBrowserCell by sending selectedCell to an NSBrowser.
You may find it useful to create a subclass of NSBrowserCell to alter its behavior and to enable it to work with and display the type of data you wish to represent. Use NSBrowser's setCellClass: or setCellPrototype methods to have it use your subclass.
See the NSBrowser class specification for more details. In particular, the class description and the "Methods Implemented By the Delegate" describe how the NSBrowser's delegate interacts with both NSBrowser and NSBrowserCells.
- Constructors
- NSBrowserCell
- Accessing graphic images
- branchImage
- highlightedBranchImage
- alternateImage
- setAlternateImage
- Setting state
- reset
- set
- Determining cell attributes
- isLeaf
- setLeaf
- isLoaded
- setLoaded
public NSBrowserCell()
public NSBrowserCell(String aString)
public NSBrowserCell(NSImage anImage)
public static NSImage branchImage()
See Also: highlightedBranchImage, alternateImage, setAlternateImage
public static NSImage highlightedBranchImage()
See Also: branchImage, alternateImage, setAlternateImage
public NSImage alternateImage()
See Also: setAlternateImage
public boolean isLeaf()
See Also: setLeaf
public boolean isLoaded()
See Also: setLoaded
public void reset()
See Also: set
public void set()
See Also: reset
public void setAlternateImage(NSImage newAltImage)
See Also: alternateImage
public void setLeaf(boolean flag)
See Also: isLeaf
public void setLoaded(boolean flag)
See Also: isLoaded