Inherits from: NSActionCell : NSCell : NSObject
Package: com.apple.yellow.application
This class is used to implement text entry fields in an NSForm. The left part of an NSFormCell is a title. The right part is an editable text entry field.
For more on the use of NSFormCell, see the class specification for NSForm.
- Initializing an NSFormCell
- initTextCell:
- Asking about a cell's appearance
- isOpaque
- Asking about a cell's title
- attributedTitle
- title
- titleAlignment
- titleFont
- titleWidth
- Changing the cell's title
- setAttributedTitle
- setTitle
- setTitleAlignment
- setTitleFont
- setTitleWidth
- Setting a keyboard equivalent
- setTitleWithMnemonic
public NSFormCell(String aString)
public NSFormCell(NSImage anImage)
public NSAttributedString attributedTitle()
public boolean isOpaque()
true
if
both the title and the entry field are opaque, false
if
one or both of them are transparent. Because titles
are transparent by default, this method usually returns false
.public void setAttributedTitle(
NSAttributedString aNSAttributedString)
public void setTitle(
String aString)
public void setTitleAlignment(
int alignment)
public void setTitleFont(
NSFont font)
public void setTitleWidth(
float width)
Once you have set the width this way, the Application Kit stops setting the width automatically; you will need to invoke setTitleWidth every time the title changes. If you want the Application Kit to resume automatic width assignments, invoke setTitleWidth with a negative width value.
public void setTitleWithMnemonic(
String titleWithAmpersand)
For example, if titleWithAmpersand is "T&itle," the cell's title will be displayed as "Title" (the mnemonic character, i, is underlined). If a user types Alt-i, it will have the same effect as clicking in the text entry field.
See Also: setTitle
public String title()
public int titleAlignment()
public NSFont titleFont()
public float titleWidth()
See Also: titleWidthWithSize
public float titleWidthWithSize(
NSSize aSize)
See Also: titleWidth