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


[Previous] [Class List] [Next]

NSMutableParagraphStyle


Inherits from: NSParagraphStyle
Package: com.apple.yellow.application


Class Description


NSMutableParagraphStyle adds methods to its superclass, NSParagraphStyle, for changing the values of the sub-attributes in a paragraph style attribute. See the NSParagraphStyle and NSAttributedString specifications for more information.


Method Types


Setting tab stops
setTabStops
addTabStop
removeTabStop
Setting other style information
setParagraphStyle
setAlignment
setFirstLineHeadIndent
setHeadIndent
setTailIndent:
setLineBreakMode:
setMaximumLineHeight
setMinimumLineHeight
setLineSpacing
setParagraphSpacing


Instance Methods



addTabStop

public void addTabStop(NSTextTab tabStop)

Adds tabStop to the receiver.

See Also: removeTabStop, setTabStops, - tabStops (NSParagraphStyle)



removeTabStop

public void removeTabStop(NSTextTab tabStop)

Removes the first text tab whose location and type are equal to those of tabStop.

See Also: addTabStop, setTabStops, - tabStops (NSParagraphStyle)



setAlignment

public void setAlignment(int alignment)

Sets the alignment of the receiver to alignment. alignment which may be one of:

See Also: - alignment (NSParagraphStyle)



setFirstLineHeadIndent

public void setFirstLineHeadIndent(float aFloat)

Sets the distance in points from the leading margin of a text container to the beginning of the paragraph's first line to aFloat. This value must be nonnegative.

See Also: setHeadIndent, setTailIndent:, - firstLineHeadIndent (NSParagraphStyle)



setHeadIndent

public void setHeadIndent(float aFloat)

Sets the distance in points from the leading margin of a text container to the beginning of lines other than the first to aFloat. This value must be nonnegative.

See Also: setFirstLineHeadIndent, setTailIndent:, - headIndent (NSParagraphStyle)



setLineBreakMode:

public void setLineBreakMode(int mode)

Sets the mode used to break lines in a layout container to mode. mode may be one of:

See the description of lineBreakMode in the NSParagraphStyle class specification for descriptions of these values.



setLineSpacing

public void setLineSpacing(float aFloat)

Sets the space in points added between lines within the paragraph to aFloat. This value must be nonnegative.

See Also: setMaximumLineHeight, setMinimumLineHeight, setParagraphSpacing, - lineSpacing (NSParagraphStyle)



setMaximumLineHeight

public void setMaximumLineHeight(float aFloat)

Sets the maximum height that any line in the paragraph style will occupy, regardless of the font size or size of any attached graphic, to aFloat. Glyphs and graphics exceeding this height will overlap neighboring lines; however, a maximum height of zero implies no line height limit. This value must be nonnegative.

Although this limit applies to the line itself, line spacing adds extra space between adjacent lines.

See Also: setMinimumLineHeight, setLineSpacing, - maximumLineHeight (NSParagraphStyle)



setMinimumLineHeight

public void setMinimumLineHeight(float aFloat)

Sets the minimum height that any line in the paragraph style will occupy, regardless of the font size or size of any attached graphic, to aFloat. This value must be nonnegative.

See Also: setMaximumLineHeight, setLineSpacing, - minimumLineHeight (NSParagraphStyle)



setParagraphSpacing

public void setParagraphSpacing(float aFloat)

Sets the space added at the end of the paragraph to separate it from the following paragraph to aFloat. This value must be nonnegative.

See Also: setLineSpacing, - paragraphSpacing (NSParagraphStyle)



setParagraphStyle

public void setParagraphStyle(NSParagraphStyle aStyle)

Replaces the sub-attributes of the receiver with those in aStyle.

setTabStops

public void setTabStops(NSArray tabStops)

Replaces the tab stops in the receiver with tabStops.

See Also: addTabStop, removeTabStop, - tabStops (NSParagraphStyle)



setTailIndent:

public void setTailIndent(float aFloat)

Sets the distance in points from the margin of a text container to the end of lines to aFloat. If positive, this is the distance from the leading margin (for example, the left margin in left-to-right text). If zero or negative, it's the distance from the trailing margin.

For example, to create a paragraph style that fits exactly in a 2-inch wide container, set its head indent to 0.0 and its tail indent to 0.0. To create a paragraph style with quarter-inch margins, set its head indent to 0.25 and its tail indent to -0.25.

See Also: setHeadIndent, setFirstLineHeadIndent, - tailIndent (NSParagraphStyle)




[Previous] [Next]