- Inherits from:
- NSAttributedString : NSObject
- Package:
- com.apple.yellow.foundation
NSMutableAttributedString declares the programmatic interface to objects that manage mutable attributed strings. You can add and remove characters (raw strings) and attributes separately, or together as attributed strings. See NSAttributedString's class description for more information about attributed strings.
When working with the Application Kit, you must also clean up changed attributes using the various fix... methods. See the Application Kit's specification for this class cluster for more information on fixing attributes.
NSMutableAttributedString adds two primitive methods to those of NSAttributedString. These primitive methods provide the basis for all the other methods in its class. The primitive replaceCharactersInRange method replaces a range of characters with those from a string, leaving all attribute information outside that range intact. The primitive setAttributesInRange method sets attributes and values for a given range of characters, replacing any previous attributes and values for that range.
- Constructors
- NSMutableAttributedString
- Retrieving character information
- mutableStringReference
- Changing characters
- deleteCharactersInRange:
- Changing attributes
- setAttributesInRange
- addAttributeInRange
- addAttributesInRange
- removeAttributeInRange
- Changing characters and attributes
- appendAttributedString:
- applyFontTraitsInRange
- fixAttachmentAttributeInRange
- fixAttributesInRange
- fixFontAttributeInRange
- fixParagraphStyleAttributeInRange
- insertAttributedStringAtIndex
- replaceCharactersInRange
- setAlignmentInRange
- setAttributedString
- subscriptRange
- superscriptRange
- unscriptRange
- updateAttachmentsFromPath
- Grouping changes
- beginEditing
- endEditing
public NSMutableAttributedString()
public NSMutableAttributedString(NSAttributedString anAttributedString)
public NSMutableAttributedString(
NSData aData,
NSMutableDictionary aMutableDictionary)
public NSMutableAttributedString(
NSData aData,
Object anObject,
NSMutableDictionary aMutableDictionary)
public NSMutableAttributedString(
Object anObject,
NSMutableDictionary aMutableDictionary)
public NSMutableAttributedString(String aString)
public NSMutableAttributedString(
String aString,
NSDictionary aDictionary)
public NSMutableAttributedString(
java.net.URL anURL,
NSMutableDictionary aMutableDictionary)
public void addAttributeInRange(
String name,
Object value,
NSRange aRange)
null
,
and a RangeException if any part of aRange lies
beyond the end of the receiver's characters.See Also: addAttributesInRange, removeAttributeInRange
public void addAttributesInRange(
NSDictionary attributes,
NSRange aRange)
null
and
a RangeException if any part of aRange lies beyond
the end of the receiver's characters.See Also: addAttributeInRange, removeAttributeInRange
public void appendAttributedString(NSAttributedString attributedString)
See Also: insertAttributedStringAtIndex
public void applyFontTraitsInRange(
int anInt,
NSRange aRange)
public void beginEditing()
public void deleteCharactersInRange(NSRange aRange)
See Also: replaceCharactersInRange
public void endEditing()
See Also: - processEditing (NSTextStorage class in the Application Kit)
public void fixAttachmentAttributeInRange(NSRange aRange)
public void fixAttributesInRange(NSRange aRange)
public void fixFontAttributeInRange(NSRange aRange)
public void fixParagraphStyleAttributeInRange(NSRange aRange)
public void insertAttributedStringAtIndex(
NSAttributedString attributedString,
int index)
See Also: appendAttributedString:
public NSMutableStringReference mutableStringReference()
public void removeAttributeInRange(
String name,
NSRange aRange)
See Also: addAttributeInRange, addAttributesInRange
public void replaceCharactersInRange(
NSRange aRange,
NSAttributedString attributedString)
public void replaceCharactersInRange(
NSRange aRange,
String aString)
Throws a RangeException if any part of aRange lies beyond the end of the receiver's characters.
See Also: insertAttributedStringAtIndex, deleteCharactersInRange:
public void setAlignmentInRange(
int anInt,
NSRange aRange)
public void setAttributedString(NSAttributedString attributedString)
See Also: appendAttributedString:
public void setAttributesInRange(
NSDictionary attributes,
NSRange aRange)
See Also: addAttributesInRange, removeAttributeInRange
public void subscriptRange(NSRange aRange)
public void superscriptRange(NSRange aRange)
public void unscriptRange(NSRange aRange)
public void updateAttachmentsFromPath(String aString)