Interface UITextPasteItem

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      @NotNull NSDictionary<java.lang.String,​?> defaultAttributes()
      These will be the default attributes that will be applied to plain strings when they are provided.
      @NotNull NSItemProvider itemProvider()
      This is the NSItemProvider for the item being pasted or dropped.
      @Nullable java.lang.Object localObject()
      This is nil for normal pastes, but might be filled with the UIDragItem's localObject for pastes from drops.
      void setAttachmentResult​(@NotNull NSTextAttachment textAttachment)
      provide an attachment result from this NSItemProvider's data
      void setAttributedStringResult​(@NotNull NSAttributedString string)
      provide an attributed representation result from this NSItemProvider's data
      void setDefaultResult()
      Use this to indicate that want the default transformation to happen.
      void setNoResult()
      Use this to indicate that you don't want the data of this NSItemProvider included in the resulting string.
      void setStringResult​(@NotNull java.lang.String string)
      provide a plain string representation result from this NSItemProvider's data
    • Method Detail

      • defaultAttributes

        @NotNull
        @NotNull NSDictionary<java.lang.String,​?> defaultAttributes()
        These will be the default attributes that will be applied to plain strings when they are provided. You can use these to make your own attributed string if you want.
      • itemProvider

        @NotNull
        @NotNull NSItemProvider itemProvider()
        This is the NSItemProvider for the item being pasted or dropped. You should set a result for this item using one of the methods below.
      • localObject

        @Nullable
        @Nullable java.lang.Object localObject()
        This is nil for normal pastes, but might be filled with the UIDragItem's localObject for pastes from drops.
      • setAttachmentResult

        void setAttachmentResult​(@NotNull
                                 @NotNull NSTextAttachment textAttachment)
        provide an attachment result from this NSItemProvider's data
      • setAttributedStringResult

        void setAttributedStringResult​(@NotNull
                                       @NotNull NSAttributedString string)
        provide an attributed representation result from this NSItemProvider's data
      • setDefaultResult

        void setDefaultResult()
        Use this to indicate that want the default transformation to happen. If the item data for the item provider is not supported, this action will be the same as `setNoResult`. You can use this as a fallback for any items you are not handling yourself.
      • setNoResult

        void setNoResult()
        Use this to indicate that you don't want the data of this NSItemProvider included in the resulting string.
      • setStringResult

        void setStringResult​(@NotNull
                             @NotNull java.lang.String string)
        provide a plain string representation result from this NSItemProvider's data