Developer Documentation
PATH  Mac OS X Documentation > Application Kit Reference: Java


[Previous] [Class List] [Next]

NSImageCell


Inherits from: NSCell : NSObject
Package: com.apple.yellow.application


Class Description


An NSImageCell displays a single NSImage in a frame. This class provides methods for choosing the frame, and for aligning and scaling the image to fit the frame.

The object value of an NSImageCell must be an NSImage, so if you use NSCell's setObjectValue: method, be sure to supply an NSImage as an argument. Because an NSImage doesn't need to be converted for display, you won't use the NSCell methods relating to formatters.

An NSImageCell is usually associated with some kind of NSControl-an NSImageView, an NSMatrix, or an NSTableView. For more information, see the specifications for those classes.


Method Types


Aligning and scaling the image
imageAlignment
setImageAlignment
imageScaling
setImageScaling
Choosing the frame
imageFrameStyle
setImageFrameStyle

Constructors


NSImageCell

public NSImageCell()

public NSImageCell(java.lang.String aString)

public NSImageCell(NSImage aNSImage)



Instance Methods



imageAlignment

public int imageAlignment()

Returns the position of the cell's image in the frame. For a list of possible alignments, see setImageAlignment.

imageFrameStyle

public int imageFrameStyle()

Returns the style of frame that appears around the image. For a list of frame styles, see setImageFrameStyle.

imageScaling

public int imageScaling()

Returns the way the cell's image alters to fit the frame. For a list of possible values, see setImageScaling.

setImageAlignment

public void setImageAlignment(int alignment)

Lets you specify the position of the image in the frame.

See Also: imageAlignment



setImageFrameStyle

public void setImageFrameStyle(int frameStyle)

Lets you specify the kind of frame that borders the image.

See Also: imageFrameStyle



setImageScaling

public void setImageScaling(int scaling)

Lets you specify the way the image alters to fit the frame.

See Also: imageScaling




[Previous] [Next]