- Inherits from:
- NSActionCell : NSCell : NSObject
- Package:
- com.apple.yellow.application
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.
- Constructors
- NSTextFieldCell
- Setting the text color
- setTextColor
- textColor
- Controlling the background
- setBackgroundColor
- backgroundColor
- setDrawsBackground
- drawsBackground
- Changing the field editor
- setUpFieldEditorAttributes
public NSTextFieldCell()
public NSTextFieldCell(String aString)
public NSTextFieldCell(NSImage anImage)
public NSColor backgroundColor()
See Also: drawsBackground, backgroundColor (NSTextField), setBackgroundColor
public boolean drawsBackground()
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
public void setBackgroundColor(NSColor aColor)
See Also: setDrawsBackground, setBackgroundColor (NSTextField), backgroundColor
public void setDrawsBackground(boolean flag)
true
,
then it does; if flag is false
,
then it draws nothing behind its text.See Also: setBackgroundColor, setDrawsBackground (NSTextField), drawsBackground
public void setTextColor(NSColor aColor)
See Also: setBackgroundColor, setTextColor (NSTextField), textColor
public NSText setUpFieldEditorAttributes(NSText textObj)
super
's
implementation, and return the textObj argument.
For information on field editors, see "The Field Editor" (page 1736) in
the NSWindow class description.public NSColor textColor()
See Also: backgroundColor, textColor (NSTextField), setTextColor