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

Table of Contents

NSTextFieldCell


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


Class Description


NSTextFieldCell adds to NSCell's text-display capabilities by allowing you to set the color of both the text and its background. You can also specify whether the cell draws its background at all. All of the methods declared by this class are also declared by NSTextField, which uses NSTextFieldCells to draw and edit text.




Method Types


Constructors
NSTextFieldCell
Setting the text color
setTextColor
textColor
Controlling the background
setBackgroundColor
backgroundColor
setDrawsBackground
drawsBackground
Changing the field editor
setUpFieldEditorAttributes


Constructors



NSTextFieldCell

public NSTextFieldCell()

Description forthcoming.

public NSTextFieldCell(String aString)

Description forthcoming.

public NSTextFieldCell(NSImage anImage)

Description forthcoming.


Instance Methods



backgroundColor

public NSColor backgroundColor()

Returns the color of the background the receiver draws behind the text.

See Also: drawsBackground, backgroundColor (NSTextField), setBackgroundColor



drawsBackground

public boolean drawsBackground()

Returns true if the receiver's cell draws its background color behind its text, false if it draws no background.

See Also: backgroundColor, drawsBackground (NSTextField), setDrawsBackground



setBackgroundColor

public void setBackgroundColor(NSColor aColor)

Sets the color of the background that the receiver draws behind the text to aColor.

See Also: setDrawsBackground, setBackgroundColor (NSTextField), backgroundColor



setDrawsBackground

public void setDrawsBackground(boolean flag)

Controls whether the receiver draws its background color behind its text. If flag is true, then it does; if flag is false, then it draws nothing behind its text.

See Also: setBackgroundColor, setDrawsBackground (NSTextField), drawsBackground



setTextColor

public void setTextColor(NSColor aColor)

Sets the color used to draw the receiver's text to aColor.

See Also: setBackgroundColor, setTextColor (NSTextField), textColor



setUpFieldEditorAttributes

public NSText setUpFieldEditorAttributes(NSText textObj)

You never invoke this method directly; by overriding it, however, you can customize or replace the field editor. When you override this method, you should generally invoke super's implementation, and return the textObj argument. For information on field editors, see "The Field Editor" (page 1736) in the NSWindow class description.

textColor

public NSColor textColor()

Returns the color used to draw the receiver's text.

See Also: backgroundColor, textColor (NSTextField), setTextColor




Table of Contents