- 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" .
- Constructors
- NSFormCell
- 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()
public NSFormCell(String aString)
public NSFormCell(NSImage anImage)
public NSAttributedString attributedTitle()
public boolean isOpaque()
public void setAttributedTitle(NSAttributedString anAttributedString)
public void setTitle(String aString)
public void setTitleAlignment(int alignment)
NSText.LeftTextAlignment
, NSText.RightTextAlignment
,
or NSText.CenterTextAlignment
.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()
NSText.LeftTextAlignment
, NSText.CenterTextAlignment
,
or NSText.RightTextAlignment
(the default).public NSFont titleFont()
public float titleWidth()
See Also: titleWidthWithSize
public float titleWidthWithSize(NSSize aSize)
See Also: titleWidth