Class NSAttributedString

    • Constructor Detail

      • NSAttributedString

        protected NSAttributedString​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • attributedStringWithAttachment

        public static NSAttributedString attributedStringWithAttachment​(NSTextAttachment attachment)
        A convenience method for creating an attributed string containing attachment using NSAttachmentCharacter as the base character.
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • version_static

        public static long version_static()
      • attributeAtIndexEffectiveRange

        public java.lang.Object attributeAtIndexEffectiveRange​(java.lang.String attrName,
                                                               long location,
                                                               NSRange range)
      • attributeAtIndexLongestEffectiveRangeInRange

        public java.lang.Object attributeAtIndexLongestEffectiveRangeInRange​(java.lang.String attrName,
                                                                             long location,
                                                                             NSRange range,
                                                                             NSRange rangeLimit)
      • attributesAtIndexEffectiveRange

        public NSDictionary<java.lang.String,​?> attributesAtIndexEffectiveRange​(long location,
                                                                                      NSRange range)
      • attributesAtIndexLongestEffectiveRangeInRange

        public NSDictionary<java.lang.String,​?> attributesAtIndexLongestEffectiveRangeInRange​(long location,
                                                                                                    NSRange range,
                                                                                                    NSRange rangeLimit)
      • containsAttachmentsInRange

        public boolean containsAttachmentsInRange​(NSRange range)
        Returns YES if the receiver contains a property configured (NSAttachmentAttributeName with NSAttachmentCharacter) in range
      • copyWithZone

        public java.lang.Object copyWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • dataFromRangeDocumentAttributesError

        public NSData dataFromRangeDocumentAttributesError​(NSRange range,
                                                           NSDictionary<java.lang.String,​?> dict,
                                                           org.moe.natj.general.ptr.Ptr<NSError> error)
        Generates an NSData object for the receiver contents in range. It requires a document attributes dict specifying at least the NSDocumentTypeDocumentAttribute to determine the format to be written.
      • drawAtPoint

        public void drawAtPoint​(CGPoint point)
      • drawInRect

        public void drawInRect​(CGRect rect)
      • fileWrapperFromRangeDocumentAttributesError

        public NSFileWrapper fileWrapperFromRangeDocumentAttributesError​(NSRange range,
                                                                         NSDictionary<java.lang.String,​?> dict,
                                                                         org.moe.natj.general.ptr.Ptr<NSError> error)
        Returns an NSFileWrapper object for the receiver contents in range. It requires a document attributes dict specifying at least the NSDocumentTypeDocumentAttribute to determine the format to be written. The method returns a directory file wrapper for those document types represented by a file package such as NSRTFDTextDocumentType; otherwise, it returns a regular-file file wrapper.
      • initWithDataOptionsDocumentAttributesError

        public NSAttributedString initWithDataOptionsDocumentAttributesError​(NSData data,
                                                                             NSDictionary<java.lang.String,​?> options,
                                                                             org.moe.natj.general.ptr.Ptr<NSDictionary<java.lang.String,​?>> dict,
                                                                             org.moe.natj.general.ptr.Ptr<NSError> error)
      • initWithFileURLOptionsDocumentAttributesError

        @Deprecated
        public NSAttributedString initWithFileURLOptionsDocumentAttributesError​(NSURL url,
                                                                                NSDictionary<?,​?> options,
                                                                                org.moe.natj.general.ptr.Ptr<NSDictionary<?,​?>> dict,
                                                                                org.moe.natj.general.ptr.Ptr<NSError> error)
        Deprecated.
      • initWithURLOptionsDocumentAttributesError

        public NSAttributedString initWithURLOptionsDocumentAttributesError​(NSURL url,
                                                                            NSDictionary<java.lang.String,​?> options,
                                                                            org.moe.natj.general.ptr.Ptr<NSDictionary<java.lang.String,​?>> dict,
                                                                            org.moe.natj.general.ptr.Ptr<NSError> error)
        Methods initializing the receiver contents with an external document data. options specify document attributes for interpreting the document contents. NSDocumentTypeDocumentAttribute, NSCharacterEncodingDocumentAttribute, and NSDefaultAttributesDocumentAttribute are supported options key. When they are not specified, these methods will examine the data and do their best to detect the appropriate attributes. If dict is non-NULL, it will return a dictionary with various document-wide attributes accessible via NS...DocumentAttribute keys.
      • isEqualToAttributedString

        public boolean isEqualToAttributedString​(NSAttributedString other)
      • length

        public long length()
      • mutableCopyWithZone

        public java.lang.Object mutableCopyWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        mutableCopyWithZone in interface NSMutableCopying
      • string

        public java.lang.String string()
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • itemProviderVisibilityForRepresentationWithTypeIdentifier_static

        public static long itemProviderVisibilityForRepresentationWithTypeIdentifier_static​(java.lang.String typeIdentifier)
      • itemProviderVisibilityForRepresentationWithTypeIdentifier

        public long itemProviderVisibilityForRepresentationWithTypeIdentifier​(java.lang.String typeIdentifier)
      • objectWithItemProviderDataTypeIdentifierError

        public static java.lang.Object objectWithItemProviderDataTypeIdentifierError​(NSData data,
                                                                                     java.lang.String typeIdentifier,
                                                                                     org.moe.natj.general.ptr.Ptr<NSError> outError)
      • readableTypeIdentifiersForItemProvider

        public static NSArray<java.lang.String> readableTypeIdentifiersForItemProvider()
      • writableTypeIdentifiersForItemProvider_static

        public static NSArray<java.lang.String> writableTypeIdentifiersForItemProvider_static()
      • writableTypeIdentifiersForItemProvider

        public NSArray<java.lang.String> writableTypeIdentifiersForItemProvider()
      • loadFromHTMLWithDataOptionsCompletionHandler

        public static void loadFromHTMLWithDataOptionsCompletionHandler​(NSData data,
                                                                        NSDictionary<java.lang.String,​?> options,
                                                                        NSAttributedString.Block_loadFromHTMLWithDataOptionsCompletionHandler completionHandler)
        Converts HTML data into an attributed string. The completionHandler is passed the attributed string result along with any document-level attributes, or an error. If neither NSTextEncodingNameDocumentOption nor NSCharacterEncodingDocumentOption is supplied, a best-guess encoding is used.
        Parameters:
        data - The HTML data to use as the contents.
        options - Document attributes for interpreting the document contents. NSTextSizeMultiplierDocumentOption, NSTimeoutDocumentOption, NSTextEncodingNameDocumentOption, and NSCharacterEncodingDocumentOption are supported option keys.
        completionHandler - A block to invoke when the operation completes or fails.
      • loadFromHTMLWithFileURLOptionsCompletionHandler

        public static void loadFromHTMLWithFileURLOptionsCompletionHandler​(NSURL fileURL,
                                                                           NSDictionary<java.lang.String,​?> options,
                                                                           NSAttributedString.Block_loadFromHTMLWithFileURLOptionsCompletionHandler completionHandler)
        Converts a local HTML file into an attributed string. The completionHandler is passed the attributed string result along with any document-level attributes, or an error. If NSReadAccessURLDocumentOption references a single file, only that file may be loaded by WebKit. If NSReadAccessURLDocumentOption references a directory, files inside that directory may be loaded by WebKit.
        Parameters:
        fileURL - The file URL to load.
        options - Document attributes for interpreting the document contents. NSTextSizeMultiplierDocumentOption, NSTimeoutDocumentOption and NSReadAccessURLDocumentOption are supported option keys.
        completionHandler - A block to invoke when the operation completes or fails.
      • loadFromHTMLWithRequestOptionsCompletionHandler

        public static void loadFromHTMLWithRequestOptionsCompletionHandler​(NSURLRequest request,
                                                                           NSDictionary<java.lang.String,​?> options,
                                                                           NSAttributedString.Block_loadFromHTMLWithRequestOptionsCompletionHandler completionHandler)
        Loads an HTML URL request and converts the contents into an attributed string. The completionHandler is passed the attributed string result along with any document-level attributes, or an error.
        Parameters:
        request - The request specifying the URL to load.
        options - Document attributes for interpreting the document contents. NSTextSizeMultiplierDocumentOption and NSTimeoutDocumentOption are supported option keys.
        completionHandler - A block to invoke when the operation completes or fails.
      • loadFromHTMLWithStringOptionsCompletionHandler

        public static void loadFromHTMLWithStringOptionsCompletionHandler​(java.lang.String string,
                                                                          NSDictionary<java.lang.String,​?> options,
                                                                          NSAttributedString.Block_loadFromHTMLWithStringOptionsCompletionHandler completionHandler)
        Converts an HTML string into an attributed string. The completionHandler is passed the attributed string result along with any document-level attributes, or an error. NSBaseURLDocumentOption is used to resolve relative URLs within the document.
        Parameters:
        string - The HTML string to use as the contents.
        options - Document attributes for interpreting the document contents. NSTextSizeMultiplierDocumentOption, NSTimeoutDocumentOption and NSBaseURLDocumentOption are supported option keys.
        completionHandler - A block to invoke when the operation completes or fails.