Package org.robovm.apple.foundation
Class NSAttributedString
- java.lang.Object
-
- org.robovm.rt.bro.NativeObject
-
- org.robovm.objc.ObjCObject
-
- org.robovm.apple.foundation.NSObject
-
- org.robovm.apple.foundation.NSAttributedString
-
- All Implemented Interfaces:
NSCoding
,NSObjectProtocol
,NSSecureCoding
,org.robovm.objc.ObjCProtocol
- Direct Known Subclasses:
NSMutableAttributedString
public class NSAttributedString extends NSObject implements NSSecureCoding
- Since:
- Available in iOS 3.2 and later.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NSAttributedString.NSAttributedStringPtr
-
Nested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInit
-
-
Field Summary
-
Fields inherited from class org.robovm.apple.foundation.NSObject
FLAG_NO_RETAIN
-
-
Constructor Summary
Constructors Modifier Constructor Description NSAttributedString()
NSAttributedString(java.lang.String str)
NSAttributedString(java.lang.String str, CMTextMarkupAttributes attrs)
NSAttributedString(java.lang.String str, CTAttributedStringAttributes attrs)
NSAttributedString(java.lang.String str, NSDictionary<NSString,?> attrs)
NSAttributedString(java.lang.String str, NSAttributedStringAttributes attrs)
NSAttributedString(NSAttributedString attrStr)
NSAttributedString(NSCoder decoder)
NSAttributedString(NSData data, NSAttributedStringDocumentAttributes options)
protected
NSAttributedString(NSObject.Handle h, long handle)
protected
NSAttributedString(NSObject.SkipInit skipInit)
NSAttributedString(NSURL url, NSAttributedStringDocumentAttributes options)
NSAttributedString(NSTextAttachment attachment)
-
Method Summary
-
Methods inherited from class org.robovm.apple.foundation.NSObject
addKeyValueObserver, addKeyValueObserver, afterMarshaled, alloc, autorelease, autorelease, awakeFromNib, conformsToProtocol, copy, description, didChangeValue, didChangeValue, didChangeValues, doDispose, forceSkipInit, getAutoContentAccessingProxy, getClassForCoder, getClassForKeyedArchiver, getKeyValueCoder, getObservationInfo, hash, hashCode, init, isEqual, isKindOfClass, isMemberOfClass, mutableCopy, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelectorInBackground, performSelectorOnMainThread, performSelectorOnMainThread, performSelectorV, performSelectorV, performSelectorV, release, release, removeKeyValueObserver, removeKeyValueObservers, respondsToSelector, retain, retain, retainCount, setObservationInfo, toString, willChangeValue, willChangeValue, willChangeValues
-
-
-
-
Constructor Detail
-
NSAttributedString
public NSAttributedString()
-
NSAttributedString
protected NSAttributedString(NSObject.Handle h, long handle)
-
NSAttributedString
protected NSAttributedString(NSObject.SkipInit skipInit)
-
NSAttributedString
public NSAttributedString(java.lang.String str)
-
NSAttributedString
public NSAttributedString(java.lang.String str, NSDictionary<NSString,?> attrs)
-
NSAttributedString
public NSAttributedString(NSAttributedString attrStr)
-
NSAttributedString
public NSAttributedString(NSCoder decoder)
-
NSAttributedString
public NSAttributedString(java.lang.String str, NSAttributedStringAttributes attrs)
-
NSAttributedString
public NSAttributedString(java.lang.String str, CMTextMarkupAttributes attrs)
-
NSAttributedString
public NSAttributedString(java.lang.String str, CTAttributedStringAttributes attrs)
-
NSAttributedString
public NSAttributedString(NSTextAttachment attachment)
- Since:
- Available in iOS 7.0 and later.
-
NSAttributedString
public NSAttributedString(NSURL url, NSAttributedStringDocumentAttributes options) throws NSErrorException
- Parameters:
url
-options
-- Throws:
NSErrorException
- Since:
- Available in iOS 7.0 and later.
-
NSAttributedString
public NSAttributedString(NSData data, NSAttributedStringDocumentAttributes options) throws NSErrorException
- Parameters:
data
-options
-- Throws:
NSErrorException
- Since:
- Available in iOS 7.0 and later.
-
-
Method Detail
-
getString
public java.lang.String getString()
-
length
public long length()
-
supportsSecureCoding
public static boolean supportsSecureCoding()
-
getAttribute
public NSObject getAttribute(NSAttributedStringAttribute attribute, long location, NSRange range)
-
getAttribute
public NSObject getAttribute(CMTextMarkupAttribute attribute, long location, NSRange range)
-
getAttribute
public NSObject getAttribute(CTAttributedStringAttribute attribute, long location, NSRange range)
-
getAttribute
public NSObject getAttribute(java.lang.String name, long location, NSRange range, NSRange rangeLimit)
-
getAttribute
public NSObject getAttribute(NSAttributedStringAttribute attribute, long location, NSRange range, NSRange rangeLimit)
-
getAttribute
public NSObject getAttribute(CMTextMarkupAttribute attribute, long location, NSRange range, NSRange rangeLimit)
-
getAttribute
public NSObject getAttribute(CTAttributedStringAttribute attribute, long location, NSRange range, NSRange rangeLimit)
-
getAttributes
public NSAttributedStringAttributes getAttributes(long location, NSRange range)
-
getAttributes
public NSAttributedStringAttributes getAttributes(long location, NSRange range, NSRange rangeLimit)
-
getTextMarkupAttributes
public CMTextMarkupAttributes getTextMarkupAttributes(long location, NSRange range)
-
getTextMarkupAttributes
public CMTextMarkupAttributes getTextMarkupAttributes(long location, NSRange range, NSRange rangeLimit)
-
getCoreTextAttributes
public CTAttributedStringAttributes getCoreTextAttributes(long location, NSRange range)
-
getCoreTextAttributes
public CTAttributedStringAttributes getCoreTextAttributes(long location, NSRange range, NSRange rangeLimit)
-
enumerateAttribute
public void enumerateAttribute(java.lang.String name, NSRange enumerationRange, NSAttributedStringEnumerationOptions opts, org.robovm.objc.block.VoidBlock3<NSObject,NSRange,org.robovm.rt.bro.ptr.BooleanPtr> block)
- Since:
- Available in iOS 4.0 and later.
-
enumerateAttribute
public void enumerateAttribute(NSAttributedStringAttribute attribute, NSRange enumerationRange, NSAttributedStringEnumerationOptions opts, org.robovm.objc.block.VoidBlock3<NSObject,NSRange,org.robovm.rt.bro.ptr.BooleanPtr> block)
- Since:
- Available in iOS 4.0 and later.
-
enumerateAttribute
public void enumerateAttribute(CMTextMarkupAttribute attribute, NSRange enumerationRange, NSAttributedStringEnumerationOptions opts, org.robovm.objc.block.VoidBlock3<NSObject,NSRange,org.robovm.rt.bro.ptr.BooleanPtr> block)
- Since:
- Available in iOS 4.0 and later.
-
enumerateAttribute
public void enumerateAttribute(CTAttributedStringAttribute attribute, NSRange enumerationRange, NSAttributedStringEnumerationOptions opts, org.robovm.objc.block.VoidBlock3<NSObject,NSRange,org.robovm.rt.bro.ptr.BooleanPtr> block)
- Since:
- Available in iOS 4.0 and later.
-
getData
public NSData getData(NSRange range, NSAttributedStringDocumentAttributes dict) throws NSErrorException
- Parameters:
range
-dict
-- Returns:
- Throws:
NSErrorException
- Since:
- Available in iOS 7.0 and later.
-
getFileWrapper
public NSFileWrapper getFileWrapper(NSRange range, NSAttributedStringDocumentAttributes dict) throws NSErrorException
- Parameters:
range
-dict
-- Returns:
- Throws:
NSErrorException
- Since:
- Available in iOS 7.0 and later.
-
getSize
public CGSize getSize()
- Since:
- Available in iOS 6.0 and later.
-
draw
public void draw(CGPoint point)
- Since:
- Available in iOS 6.0 and later.
-
draw
public void draw(CGRect rect)
- Since:
- Available in iOS 6.0 and later.
-
draw
public void draw(CGRect rect, NSStringDrawingOptions options, NSStringDrawingContext context)
- Since:
- Available in iOS 6.0 and later.
-
getBoundingRect
public CGRect getBoundingRect(CGSize size, NSStringDrawingOptions options, NSStringDrawingContext context)
- Since:
- Available in iOS 6.0 and later.
-
replace
public void replace(NSRange range, java.lang.String str)
-
setAttributes
public void setAttributes(NSDictionary<NSString,?> attrs, NSRange range)
-
addAttributes
public void addAttributes(NSDictionary<NSString,?> attrs, NSRange range)
-
replace
public void replace(NSRange range, NSAttributedString attrString)
-
insert
public void insert(NSAttributedString attrString, long loc)
-
append
public void append(NSAttributedString attrString)
-
delete
public void delete(NSRange range)
-
setAttributedString
public void setAttributedString(NSAttributedString attrString)
-
beginEditing
public void beginEditing()
-
endEditing
public void endEditing()
-
getAttributesDictionary
public NSDictionary<NSString,?> getAttributesDictionary(long location, NSRange range)
-
substring
public NSAttributedString substring(NSRange range)
-
getAttributesDictionary
public NSDictionary<NSString,?> getAttributesDictionary(long location, NSRange range, NSRange rangeLimit)
-
getAttribute
public NSObject getAttribute(NSString attrName, long location, NSRange range, NSRange rangeLimit)
-
equalsTo
public boolean equalsTo(NSAttributedString other)
-
init
protected long init(java.lang.String str)
-
init
protected long init(java.lang.String str, NSDictionary<NSString,?> attrs)
-
init
protected long init(NSAttributedString attrStr)
-
enumerateAttributes
public void enumerateAttributes(NSRange enumerationRange, NSAttributedStringEnumerationOptions opts, org.robovm.objc.block.VoidBlock3<NSDictionary<NSString,?>,NSRange,org.robovm.rt.bro.ptr.BooleanPtr> block)
- Since:
- Available in iOS 4.0 and later.
-
enumerateAttribute
public void enumerateAttribute(NSString attrName, NSRange enumerationRange, NSAttributedStringEnumerationOptions opts, org.robovm.objc.block.VoidBlock3<NSObject,NSRange,org.robovm.rt.bro.ptr.BooleanPtr> block)
- Since:
- Available in iOS 4.0 and later.
-
init
protected long init(NSCoder decoder)
-
-