Copyright ©1995 by NeXT Computer, Inc. All Rights Reserved.
| DBImageFormatter |
| Inherits From: | DBFormatter : Object | |
| Declared In: | dbkit/DBImageFormatter.h |
| Class Description |
| DBImageFormatter is one of three subclasses of DBFormatter; the others are DBTextFormatter and DBEditableFormatter (which deal with text rather than images). See the description of the superclass, DBFormatter. |
| Instance Variables |
| id | defaultImage; |
| defaultImage | Used when the source to be formatted contains no image |
| Method Types |
| Initializing |
| Default |
| Drawing | ||
| Archiving |
| Instance Methods |
| defaultImage |
| Returns the default image. This is the image that drawFieldAt:... will substitute if asked to draw a field that does not contain an image. |
| drawFieldAt::inside:inView:withAttributes::usePositions:: |
| :(unsigned int) column inside:(NXRect *)frame inView:view withAttributes:(id <DBTableVectors>) rowAttrs :(id <DBTableVectors>) columnAttrs usePositions:useRowPos :(BOOL)useColumnPos |
| Displays an image in one field of data. You never invoke this method directly; it's invoked automatically by the DBTableView that's using this DBEditableFormatter when a field needs to be displayed.
The displayed image is centered vertically; its horizontal alignment is controlled by rowAttrs or columnAttrs; it may be centered, left aligned, or right aligned. The image is clipped to the frame. Returns self. See also: |
| free |
| Frees the DBImageFormatter instance. |
| init |
| Initializes the DBImageFormatter instance. In the course of initializing, an initial value is set for the default image (to be displayed when a field where an image was expected in fact has none). Returns self. |
| read: |
| Restores the values of the object's instance variables from the archive stream, including its font and delegate. Returns self. |
| setDefaultImage: |
| Makes anImage the image that drawFieldAt:... will substitute when asked to draw a field that doesn't contain an image. If you haven't explicitly set a default image, the default established when the DBImageFormatter is initialized is a gray rectangle. Returns self. |
| write: |
| Writes the DBTextFormatter's instance variables to stream, including its font and its delegate. |