Package apple.uikit
Class UIDocument
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.uikit.UIDocument
-
- All Implemented Interfaces:
NSFilePresenter,NSProgressReporting,NSObject,UINavigationItemRenameDelegate,UIUserActivityRestoring
- Direct Known Subclasses:
UIManagedDocument
public class UIDocument extends NSObject implements NSFilePresenter, NSProgressReporting, UINavigationItemRenameDelegate, UIUserActivityRestoring
API-Since: 5.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceUIDocument.Block_autosaveWithCompletionHandlerstatic interfaceUIDocument.Block_closeWithCompletionHandlerstatic interfaceUIDocument.Block_openWithCompletionHandlerstatic interfaceUIDocument.Block_performAsynchronousFileAccessUsingBlockstatic interfaceUIDocument.Block_revertToContentsOfURLCompletionHandlerstatic interfaceUIDocument.Block_saveToURLForSaveOperationCompletionHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
Nested classes/interfaces inherited from interface apple.foundation.protocol.NSFilePresenter
NSFilePresenter.Block_accommodatePresentedItemDeletionWithCompletionHandler, NSFilePresenter.Block_accommodatePresentedSubitemDeletionAtURLCompletionHandler, NSFilePresenter.Block_relinquishPresentedItemToReader, NSFilePresenter.Block_relinquishPresentedItemToWriter, NSFilePresenter.Block_savePresentedItemChangesWithCompletionHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedUIDocument(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()voidaccommodatePresentedItemDeletionWithCompletionHandler(NSFilePresenter.Block_accommodatePresentedItemDeletionWithCompletionHandler completionHandler)Given that something in the system is waiting to delete the presented file or directory, do whatever it takes to ensure that the deleting will succeed and that the receiver's application will behave properly when the deleting has happened, and then invoke the completion handler.voidaccommodatePresentedSubitemDeletionAtURLCompletionHandler(@NotNull NSURL url, NSFilePresenter.Block_accommodatePresentedSubitemDeletionAtURLCompletionHandler completionHandler)Given that something in the system is waiting to delete a file or directory contained by the directory, do whatever it takes to ensure that the deleting will succeed and that the receiver's application will behave properly when the deleting has happened, and then invoke the completion handler.static UIDocumentalloc()static UIDocumentallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)voidautosaveWithCompletionHandler(@Nullable UIDocument.Block_autosaveWithCompletionHandler completionHandler)Clients should not need to call this method directly.static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)@NotNull java.lang.ObjectchangeCountTokenForSaveOperation(long saveOperation)Change count tokens can be used to encapsulate the record of document changes being made in a particular save.static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()voidcloseWithCompletionHandler(@Nullable UIDocument.Block_closeWithCompletionHandler completionHandler)Close the document.@Nullable java.lang.ObjectcontentsForTypeError(@NotNull java.lang.String typeName, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)Typical subclasses will implement this method and return an NSFileWrapper or NSData encapsulating a snapshot of their data to be written to disk during saving.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()voiddisableEditing()Subclasses should override these methods so that they do not allow the user to edit the document between calls to -disableEditing and -enableEditing.longdocumentState()voidenableEditing()@Nullable NSDictionary<?,?>fileAttributesToWriteToURLForSaveOperationError(@NotNull NSURL url, long saveOperation, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)Called by -saveToURL: before executing asynchronous writing to get a dictionary of attributes understood by NSFileManager for writing to the file.@Nullable NSDatefileModificationDate()The last known modification date of the document's on-disk representation.@NotNull java.lang.StringfileNameExtensionForTypeSaveOperation(@Nullable java.lang.String typeName, long saveOperation)For a specified type, and a particular kind of save operation, return a file name extension that can be appended to a base file name.@Nullable java.lang.StringfileType()The file's UTI.@NotNull NSURLfileURL()UIKit may call these methods on background threads, so subclasses that override them must have thread safe implementations.voidfinishedHandlingErrorRecovered(@NotNull NSError error, boolean recovered)Called when handling of an error (including any user interaction) is complete.voidhandleErrorUserInteractionPermitted(@NotNull NSError error, boolean userInteractionPermitted)Called by the default implementations of -openWithCompletionHandler: and -saveToURL:forSaveOperation:completionHandler:.static longhash_static()booleanhasUnsavedChanges()Subclasses should generally not need to override this.UIDocumentinit()UIDocumentinitWithFileURL(@NotNull NSURL url)The designated initializer.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)booleanloadFromContentsOfTypeError(@NotNull java.lang.Object contents, @Nullable java.lang.String typeName, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)Typical subclasses will implement this method to do reading.@NotNull java.lang.StringlocalizedName()The default implementation derives the name from the URL.voidnavigationItemDidEndRenamingWithTitle(@NotNull UINavigationItem navigationItem, @NotNull java.lang.String title)This method is called when renaming has ended.booleannavigationItemShouldBeginRenaming(@NotNull UINavigationItem navigationItem)Controls whether the rename action is supported for the given navigation item.booleannavigationItemShouldEndRenamingWithTitle(@NotNull UINavigationItem navigationItem, @NotNull java.lang.String title)This method can be used to prevent renaming from happening.@NotNull java.lang.StringnavigationItemWillBeginRenamingWithSuggestedTitleSelectedRange(@NotNull UINavigationItem navigationItem, @NotNull java.lang.String title, @NotNull NSRange selectedRange)Called when we begin renaming.static UIDocumentnew_objc()@NotNull NSSet<java.lang.String>observedPresentedItemUbiquityAttributes()The set of ubiquity attributes, which the receiver wishes to be notified about when they change for presentedItemURL.voidopenWithCompletionHandler(@Nullable UIDocument.Block_openWithCompletionHandler completionHandler)Subclassing this method without calling super should be avoided.voidperformAsynchronousFileAccessUsingBlock(@NotNull UIDocument.Block_performAsynchronousFileAccessUsingBlock block)The default implementations of saveToURL: and openWithCompletionHandler: both use this to serialize file access.voidpresentedItemDidChange()Be notified that the file or file package's contents or attributes have been been written to.voidpresentedItemDidChangeUbiquityAttributes(@NotNull NSSet<java.lang.String> attributes)Be notified that the presented file or file package's ubiquity attributes have changed.voidpresentedItemDidGainVersion(@NotNull NSFileVersion version)Be notified that something in the system has added, removed, or resolved a version of the file or file package.voidpresentedItemDidLoseVersion(@NotNull NSFileVersion version)voidpresentedItemDidMoveToURL(@NotNull NSURL newURL)Be notified that the file or directory has been moved or renamed, or a directory containing it has been moved or renamed.voidpresentedItemDidResolveConflictVersion(@NotNull NSFileVersion version)@NotNull NSOperationQueuepresentedItemOperationQueue()The operation queue in which all of the other NSFilePresenter messages except -presentedItemURL will be sent to the receiver.@Nullable NSURLpresentedItemURL()The NSURL that locates the file or directory that the receiver is presenting to the user.voidpresentedSubitemAtURLDidGainVersion(@NotNull NSURL url, @NotNull NSFileVersion version)Be notified that the something in the system has added, removed, or resolved a version of a file or directory contained by the directory.voidpresentedSubitemAtURLDidLoseVersion(@NotNull NSURL url, @NotNull NSFileVersion version)voidpresentedSubitemAtURLDidMoveToURL(@NotNull NSURL oldURL, @NotNull NSURL newURL)Be notified that a file or directory contained by the directory has been moved or renamed.voidpresentedSubitemAtURLDidResolveConflictVersion(@NotNull NSURL url, @NotNull NSFileVersion version)voidpresentedSubitemDidAppearAtURL(@NotNull NSURL url)Be notified that a file or directory contained by the directory has been added.voidpresentedSubitemDidChangeAtURL(@NotNull NSURL url)Be notified that the contents or attributes of a file or directory contained by the directory have been been written to.@Nullable NSProgressprogress()booleanreadFromURLError(@NotNull NSURL url, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)Direct calls to this method should not be necessary for typical subclasses where the entire file is read during opening.voidrelinquishPresentedItemToReader(NSFilePresenter.Block_relinquishPresentedItemToReader reader)Given that something in the system is waiting to read from the presented file or directory, do whatever it takes to ensure that the application will behave properly while that reading is happening, and then invoke the completion handler.voidrelinquishPresentedItemToWriter(NSFilePresenter.Block_relinquishPresentedItemToWriter writer)Given that something in the system is waiting to write to the presented file or directory, do whatever it takes to ensure that the application will behave properly while that writing is happening, and then invoke the completion handler.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidrestoreUserActivityState(@NotNull NSUserActivity userActivity)voidrevertToContentsOfURLCompletionHandler(@NotNull NSURL url, @Nullable UIDocument.Block_revertToContentsOfURLCompletionHandler completionHandler)Discard all unsaved document modifications and replace the document's contents by reading a file or file package located by a URL.voidsavePresentedItemChangesWithCompletionHandler(NSFilePresenter.Block_savePresentedItemChangesWithCompletionHandler completionHandler)Given that something in the system is waiting to read from the presented file or directory, do whatever it takes to ensure that the contents of the presented file or directory is completely up to date, and then invoke the completion handler.voidsaveToURLForSaveOperationCompletionHandler(@NotNull NSURL url, long saveOperation, @Nullable UIDocument.Block_saveToURLForSaveOperationCompletionHandler completionHandler)Subclassing this method without calling super should be avoided.@Nullable java.lang.StringsavingFileType()The default implementation returns the current file type.voidsetFileModificationDate(@Nullable NSDate value)The last known modification date of the document's on-disk representation.voidsetUndoManager(NSUndoManager value)The document's undo manager.voidsetUserActivity(@Nullable NSUserActivity value)API-Since: 8.0static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()NSUndoManagerundoManager()The document's undo manager.voidupdateChangeCount(long change)Record the fact that a change affecting the value returned by -hasUnsavedChanges has occurred.voidupdateChangeCountWithTokenForSaveOperation(@NotNull java.lang.Object changeCountToken, long saveOperation)voidupdateUserActivityState(@NotNull NSUserActivity userActivity)API-Since: 8.0@Nullable NSUserActivityuserActivity()API-Since: 8.0voiduserInteractionNoLongerPermittedForError(@NotNull NSError error)UIKit calls this method when it is no longer safe to proceed without immediately handling the error, such as when the app is being suspended.static booleanuseStoredAccessor()Deprecated.static longversion_static()booleanwriteContentsAndAttributesSafelyToURLForSaveOperationError(@NotNull java.lang.Object contents, @Nullable NSDictionary<?,?> additionalFileAttributes, @NotNull NSURL url, long saveOperation, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)This method is responsible for doing document writing in a way that minimizes the danger of leaving the disk to which writing is being done in an inconsistent state in the event of an application crash, system crash, hardware failure, power outage, etc.booleanwriteContentsToURLForSaveOperationOriginalContentsURLError(@NotNull java.lang.Object contents, @NotNull NSURL url, long saveOperation, @Nullable NSURL originalContentsURL, @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)Called by -writeContents:andAttributes:safelyToURL:forSaveOperation:error: to write the data to disk.-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static UIDocument alloc()
-
allocWithZone
public static UIDocument allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull 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()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
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
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
new_objc
public static UIDocument 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()
-
version_static
public static long version_static()
-
accommodatePresentedItemDeletionWithCompletionHandler
public void accommodatePresentedItemDeletionWithCompletionHandler(@NotNull NSFilePresenter.Block_accommodatePresentedItemDeletionWithCompletionHandler completionHandler)Description copied from interface:NSFilePresenterGiven that something in the system is waiting to delete the presented file or directory, do whatever it takes to ensure that the deleting will succeed and that the receiver's application will behave properly when the deleting has happened, and then invoke the completion handler. If successful (including when there is simply nothing to do) pass nil to the completion handler, or if not successful pass an NSError that encapsulates the reason why preparation failed. Implementations of this method must always invoke the completion handler because other parts of the system will wait until it is invoked or until the user loses patience and cancels the waiting. For example, NSDocument has an implementation of this method that closes the document. That way if the document is in the trash and the user empties the trash the document is simply closed before its file is deleted. This means that emptying the trash will not fail with an alert about the file being "in use" just because the document's file is memory mapped by the application. It also means that the document won't be left open with no document file underneath it. A shoebox application would only implement this method to be robust against surprising things like the user deleting its data directory while the application is running. The file coordination mechanism does not always send -relinquishPresentedItemToReader: or -relinquishPresentedItemToWriter: to your NSFilePresenter before sending this message. For example, other process' use of -[NSFileCoordinator prepareForReadingItemsAtURLs:options:writingItemsAtURLs:options:error:byAccessor:] can cause this to happen.- Specified by:
accommodatePresentedItemDeletionWithCompletionHandlerin interfaceNSFilePresenter
-
accommodatePresentedSubitemDeletionAtURLCompletionHandler
public void accommodatePresentedSubitemDeletionAtURLCompletionHandler(@NotNull @NotNull NSURL url, @NotNull NSFilePresenter.Block_accommodatePresentedSubitemDeletionAtURLCompletionHandler completionHandler)Description copied from interface:NSFilePresenterGiven that something in the system is waiting to delete a file or directory contained by the directory, do whatever it takes to ensure that the deleting will succeed and that the receiver's application will behave properly when the deleting has happened, and then invoke the completion handler. If successful (including when there is simply nothing to do) pass nil to the completion handler, or if not successful pass an NSError that encapsulates the reason why preparation failed. Implementations of this method must always invoke the completion handler because other parts of the system will wait until it is invoked or until the user loses patience and cancels the waiting. The file coordination mechanism does not always send -relinquishPresentedItemToReader: or -relinquishPresentedItemToWriter: to your NSFilePresenter before sending this message. For example, other process' use of -[NSFileCoordinator prepareForReadingItemsAtURLs:options:writingItemsAtURLs:options:error:byAccessor:] can cause this to happen.- Specified by:
accommodatePresentedSubitemDeletionAtURLCompletionHandlerin interfaceNSFilePresenter
-
autosaveWithCompletionHandler
public void autosaveWithCompletionHandler(@Nullable @Nullable UIDocument.Block_autosaveWithCompletionHandler completionHandler)Clients should not need to call this method directly. It exists as an override point for subclasses that want to do special things with autosaving. The default implementation of this method invokes [self hasUnsavedChanges] and, if that returns YES, invokes [self saveToURL:[self fileURL] forSaveOperation:UIDocumentSaveForOverwriting completionHandler:completionHandler].
-
changeCountTokenForSaveOperation
@NotNull public @NotNull java.lang.Object changeCountTokenForSaveOperation(long saveOperation)
Change count tokens can be used to encapsulate the record of document changes being made in a particular save. Subclasses that don't register changes via -updateChangeCount: or by using the undoManager should implement these methods to determine if the model has new unsaved changes at the end of a save. -changeCountTokenForSaveOperation: is called at the beginning of a save operation and the token returned is passed to -updateChangeCountWithToken:forSaveOperation: at the conclusion of a save. The default implementation of updateChangeCountWithToken:forSaveOperation: calls [self updateChangeCount:UIDocumentChangeCleared] if no changes are made during the save.
-
closeWithCompletionHandler
public void closeWithCompletionHandler(@Nullable @Nullable UIDocument.Block_closeWithCompletionHandler completionHandler)Close the document. The default implementation calls [self autosaveWithCompletionHandler:completionHandler] which will save if [self hasUnsavedChanges] returns YES.
-
contentsForTypeError
@Nullable public @Nullable java.lang.Object contentsForTypeError(@NotNull @NotNull java.lang.String typeName, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)Typical subclasses will implement this method and return an NSFileWrapper or NSData encapsulating a snapshot of their data to be written to disk during saving. Subclasses that return something other than a valid NSFileWrapper or NSData instance, or don't override this method must override one of the writing methods in the Advanced Saving section to write data to disk.
-
disableEditing
public void disableEditing()
Subclasses should override these methods so that they do not allow the user to edit the document between calls to -disableEditing and -enableEditing. UIKit will call -disableEditing when it is unsafe to make changes to the document, such as during a close or revert, and call -enableEditing when it is safe again. The default implementation of these methods do nothing.
-
documentState
public long documentState()
-
enableEditing
public void enableEditing()
-
fileAttributesToWriteToURLForSaveOperationError
@Nullable public @Nullable NSDictionary<?,?> fileAttributesToWriteToURLForSaveOperationError(@NotNull @NotNull NSURL url, long saveOperation, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)
Called by -saveToURL: before executing asynchronous writing to get a dictionary of attributes understood by NSFileManager for writing to the file. The attributes are passed to -writeContents:andAttributes:safelyToURL:forSaveOperation:error: for writing to the file
-
fileModificationDate
@Nullable public @Nullable NSDate fileModificationDate()
The last known modification date of the document's on-disk representation. Updated by openWithCompletionHandler:, revertToContentsOfURL:, and saveToURL: and will return nil if none of these has completed successfully at least once.
-
fileNameExtensionForTypeSaveOperation
@NotNull public @NotNull java.lang.String fileNameExtensionForTypeSaveOperation(@Nullable @Nullable java.lang.String typeName, long saveOperation)For a specified type, and a particular kind of save operation, return a file name extension that can be appended to a base file name.
-
fileType
@Nullable public @Nullable java.lang.String fileType()
The file's UTI. Derived from the fileURL by default.
-
fileURL
@NotNull public @NotNull NSURL fileURL()
UIKit may call these methods on background threads, so subclasses that override them must have thread safe implementations. These values will be set by UIKit before the completion handlers to the opening, reverting, and saving methods are called. Clients that wish to access these properties outside of an open, save, or revert completion handler and wait for any pending file operations should wrap the accesses in -performAsynchronousFileAccessUsingBlock:
-
finishedHandlingErrorRecovered
public void finishedHandlingErrorRecovered(@NotNull @NotNull NSError error, boolean recovered)Called when handling of an error (including any user interaction) is complete. Subclasses only need to call this method if they override -handleError:userInteractionPermitted: and do not call super. If overridden, subclasses must call super
-
handleErrorUserInteractionPermitted
public void handleErrorUserInteractionPermitted(@NotNull @NotNull NSError error, boolean userInteractionPermitted)Called by the default implementations of -openWithCompletionHandler: and -saveToURL:forSaveOperation:completionHandler:. Subclasses should call -handleError:userInteractionPermitted: with any errors that arise from direct calls to the advanced reading and writing methods that return NSErrors by indirection. Notes for overriding: 1. Subclasses that do not call super are responsible for calling -finishedHandlingError: when done with the error (i.e. when the app will not require any additional user feedback from the error). 2. Subclasses that do not call super are also responsible for implementing -userInteractionNoLongerPermittedForError: to wrap up error handling immediately when required. 3. If the userInteractionPermitted flag is NO, you should immediately handle the error and call [self finishedHandlingError:] within the context of -handleError:userInteractionPermitted:
-
hasUnsavedChanges
public boolean hasUnsavedChanges()
Subclasses should generally not need to override this. Instead they should use the undoManager or call -updateChangeCount: every time they get a change and UIKit will calculate -hasUnsavedChanges automatically. The default implementation of -autosaveWithCompletionHandler: initiates a save if [self hasUnsavedChanges] is YES.
-
init
public UIDocument init()
-
initWithFileURL
public UIDocument initWithFileURL(@NotNull @NotNull NSURL url)
The designated initializer. Passing an empty URL will cause this method to throw an NSInvalidArgumentException.
-
loadFromContentsOfTypeError
public boolean loadFromContentsOfTypeError(@NotNull @NotNull java.lang.Object contents, @Nullable @Nullable java.lang.String typeName, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)Typical subclasses will implement this method to do reading. UIKit will pass NSData typed contents for flat files and NSFileWrapper typed contents for file packages. typeName is the UTI of the loaded file.
-
localizedName
@NotNull public @NotNull java.lang.String localizedName()
The default implementation derives the name from the URL. Subclasses may override to provide a custom name for presentation to the user, such as in error strings.
-
openWithCompletionHandler
public void openWithCompletionHandler(@Nullable @Nullable UIDocument.Block_openWithCompletionHandler completionHandler)Subclassing this method without calling super should be avoided. Subclassers who don't call super must use NSFileCoordinator for coordinated reading themselves. Open the document located by the fileURL. This will call readFromURL:error: on a background queue and then invoke the completionHandler on the current dispatch queue when openWithCompletionHandler: is invoked.
-
performAsynchronousFileAccessUsingBlock
public void performAsynchronousFileAccessUsingBlock(@NotNull @NotNull UIDocument.Block_performAsynchronousFileAccessUsingBlock block)The default implementations of saveToURL: and openWithCompletionHandler: both use this to serialize file access. Direct calls to reading and writing methods should use this method to serialize file access on a background queue.
-
presentedItemDidChange
public void presentedItemDidChange()
Description copied from interface:NSFilePresenterBe notified that the file or file package's contents or attributes have been been written to. Because this method may be be invoked when the attributes have changed but the contents have not, implementations that read the contents must use modification date checking to avoid needless rereading. They should check that the modification date has changed since the receiver most recently read from or wrote to the item. To avoid race conditions, getting the modification date should typically be done within invocations of one of the -[NSFileCoordinator coordinate...] methods. For example, NSDocument implements this method to react to both contents changes (like the user overwriting the document file with another application) and attribute changes (like the user toggling the "Hide extension" checkbox in a Finder info panel). It uses modification date checking as described above. Not all programs use file coordination. Your NSFileProvider may be sent this message without being sent -relinquishPresentedItemToWriter: first. Make your application do the best it can in that case.- Specified by:
presentedItemDidChangein interfaceNSFilePresenter
-
presentedItemDidGainVersion
public void presentedItemDidGainVersion(@NotNull @NotNull NSFileVersion version)Description copied from interface:NSFilePresenterBe notified that something in the system has added, removed, or resolved a version of the file or file package. For example, NSDocument has implementations of these methods that help decide whether to present a versions browser when it has reacquired after relinquishing to a writer, and to react to versions being added and removed while it is presenting the versions browser.- Specified by:
presentedItemDidGainVersionin interfaceNSFilePresenter
-
presentedItemDidLoseVersion
public void presentedItemDidLoseVersion(@NotNull @NotNull NSFileVersion version)- Specified by:
presentedItemDidLoseVersionin interfaceNSFilePresenter
-
presentedItemDidMoveToURL
public void presentedItemDidMoveToURL(@NotNull @NotNull NSURL newURL)Description copied from interface:NSFilePresenterBe notified that the file or directory has been moved or renamed, or a directory containing it has been moved or renamed. A typical implementation of this method will cause subsequent invocations of -presentedItemURL to return the new URL. The new URL may have a different file name extension than the current value of the presentedItemURL property. For example, NSDocument implements this method to handle document file moving and renaming. A shoebox application would only implement this method to be robust against surprising things like the user moving its data directory while the application is running. Not all programs use file coordination. Your NSFileProvider may be sent this message without being sent -relinquishPresentedItemToWriter: first. Make your application do the best it can in that case.- Specified by:
presentedItemDidMoveToURLin interfaceNSFilePresenter
-
presentedItemDidResolveConflictVersion
public void presentedItemDidResolveConflictVersion(@NotNull @NotNull NSFileVersion version)- Specified by:
presentedItemDidResolveConflictVersionin interfaceNSFilePresenter
-
presentedItemOperationQueue
@NotNull public @NotNull NSOperationQueue presentedItemOperationQueue()
Description copied from interface:NSFilePresenterThe operation queue in which all of the other NSFilePresenter messages except -presentedItemURL will be sent to the receiver. Implementations of this method must be prepared to be invoked by Cocoa in any queue, at any time, including from within invocations of NSFileCoordinator methods. A nil value is not valid. For example, NSDocument has a -presentedItemOperationQueue method that returns a private queue. In very simple cases you can return [NSOperationQueue mainQueue], but doing so is often an invitation to deadlocks.- Specified by:
presentedItemOperationQueuein interfaceNSFilePresenter
-
presentedItemURL
@Nullable public @Nullable NSURL presentedItemURL()
Description copied from interface:NSFilePresenterThe NSURL that locates the file or directory that the receiver is presenting to the user. Implementations of this method must be prepared to be invoked by Cocoa in any queue, at any time, including from within invocations of NSFileCoordinator methods. A nil value is valid and means that the presented item does not exist yet. An NSFilePresenter with a nil presentedItemURL will be asked for its presentedItemURL again when coordinated file access on behalf of that NSFilePresenter completes, in case the presented item was just created. For example, NSDocument has a -presentedItemURL method that usually returns [self fileURL]. In a shoebox application that stores the user's data in files somewhere on the user's computer you can implement this method to specify the directory that contains those files.- Specified by:
presentedItemURLin interfaceNSFilePresenter
-
presentedSubitemAtURLDidGainVersion
public void presentedSubitemAtURLDidGainVersion(@NotNull @NotNull NSURL url, @NotNull @NotNull NSFileVersion version)Description copied from interface:NSFilePresenterBe notified that the something in the system has added, removed, or resolved a version of a file or directory contained by the directory.- Specified by:
presentedSubitemAtURLDidGainVersionin interfaceNSFilePresenter
-
presentedSubitemAtURLDidLoseVersion
public void presentedSubitemAtURLDidLoseVersion(@NotNull @NotNull NSURL url, @NotNull @NotNull NSFileVersion version)- Specified by:
presentedSubitemAtURLDidLoseVersionin interfaceNSFilePresenter
-
presentedSubitemAtURLDidMoveToURL
public void presentedSubitemAtURLDidMoveToURL(@NotNull @NotNull NSURL oldURL, @NotNull @NotNull NSURL newURL)Description copied from interface:NSFilePresenterBe notified that a file or directory contained by the directory has been moved or renamed. If this method is not implemented but -presentedItemDidChange is, and the directory is actually a file package, then the file coordination machinery will invoke -presentedItemDidChange instead. Not all programs use file coordination. Your NSFileProvider may be sent this message without being sent -relinquishPresentedItemToWriter: first. Make your application do the best it can in that case.- Specified by:
presentedSubitemAtURLDidMoveToURLin interfaceNSFilePresenter
-
presentedSubitemAtURLDidResolveConflictVersion
public void presentedSubitemAtURLDidResolveConflictVersion(@NotNull @NotNull NSURL url, @NotNull @NotNull NSFileVersion version)- Specified by:
presentedSubitemAtURLDidResolveConflictVersionin interfaceNSFilePresenter
-
presentedSubitemDidAppearAtURL
public void presentedSubitemDidAppearAtURL(@NotNull @NotNull NSURL url)Description copied from interface:NSFilePresenterBe notified that a file or directory contained by the directory has been added. If this method is not implemented but -presentedItemDidChange is, and the directory is actually a file package, then the file coordination machinery will invoke -presentedItemDidChange instead. Not all programs use file coordination. Your NSFileProvider may be sent this message without being sent -relinquishPresentedItemToWriter: first. Make your application do the best it can in that case.- Specified by:
presentedSubitemDidAppearAtURLin interfaceNSFilePresenter
-
presentedSubitemDidChangeAtURL
public void presentedSubitemDidChangeAtURL(@NotNull @NotNull NSURL url)Description copied from interface:NSFilePresenterBe notified that the contents or attributes of a file or directory contained by the directory have been been written to. Depending on the situation the advice given for -presentedItemDidChange may apply here too. If this method is not implemented but -presentedItemDidChange is, and the directory is actually a file package, then the file coordination machinery will invoke -presentedItemDidChange instead. Not all programs use file coordination. Your NSFileProvider may be sent this message without being sent -relinquishPresentedItemToWriter: first. Make your application do the best it can in that case.- Specified by:
presentedSubitemDidChangeAtURLin interfaceNSFilePresenter
-
progress
@Nullable public @Nullable NSProgress progress()
- Specified by:
progressin interfaceNSProgressReporting
-
readFromURLError
public boolean readFromURLError(@NotNull @NotNull NSURL url, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)Direct calls to this method should not be necessary for typical subclasses where the entire file is read during opening. If direct calls are used, the client must use NSFileCoordinator API to ensure coordinated reads and performAsynchronousFileAccessUsingBlock: to serialize with any active writes. Default implementation calls [self loadFromContents:ofType:error:] on the queue that called openWithCompletionHandler:, or the main queue if called directly, with NSData or NSFileWrapper contents.
-
restoreUserActivityState
public void restoreUserActivityState(@NotNull @NotNull NSUserActivity userActivity)- Specified by:
restoreUserActivityStatein interfaceUIUserActivityRestoring
-
revertToContentsOfURLCompletionHandler
public void revertToContentsOfURLCompletionHandler(@NotNull @NotNull NSURL url, @Nullable @Nullable UIDocument.Block_revertToContentsOfURLCompletionHandler completionHandler)Discard all unsaved document modifications and replace the document's contents by reading a file or file package located by a URL. Default implementation calls [self disableEditing] in the beginning and [self enableEditing] on completion to indicate that the document should not accept changes from the user while this is happening. The default implementation also calls [self openWithCompletionHandler:] after updating the fileURL. Subclasses that override this method must call super or use NSFileCoordinator directly to initiate a coordinated read.
-
savePresentedItemChangesWithCompletionHandler
public void savePresentedItemChangesWithCompletionHandler(@NotNull NSFilePresenter.Block_savePresentedItemChangesWithCompletionHandler completionHandler)Description copied from interface:NSFilePresenterGiven that something in the system is waiting to read from the presented file or directory, do whatever it takes to ensure that the contents of the presented file or directory is completely up to date, and then invoke the completion handler. If successful (including when there is simply nothing to do) pass nil to the completion handler, or if not successful pass an NSError that encapsulates the reason why saving failed. Implementations of this method must always invoke the completion handler because other parts of the system will wait until it is invoked or the user loses patience and cancels the waiting. If this method is not implemented then the NSFilePresenter is assumed to be one that never lets the user make changes that need to be saved. For example, NSDocument has an implementation of this method that autosaves the document if it has been changed since the last time it was saved or autosaved. That way when another process tries to read the document file it always reads the same version of the document that the user is looking at in your application. (WYSIWGCBF - What You See Is What Gets Copied By Finder.) A shoebox application would also implement this method. The file coordination mechanism does not always send -relinquishPresentedItemToReader: or -relinquishPresentedItemToWriter: to your NSFilePresenter before sending this message. For example, other process' use of -[NSFileCoordinator prepareForReadingItemsAtURLs:options:writingItemsAtURLs:options:error:byAccessor:] can cause this to happen.- Specified by:
savePresentedItemChangesWithCompletionHandlerin interfaceNSFilePresenter
-
saveToURLForSaveOperationCompletionHandler
public void saveToURLForSaveOperationCompletionHandler(@NotNull @NotNull NSURL url, long saveOperation, @Nullable @Nullable UIDocument.Block_saveToURLForSaveOperationCompletionHandler completionHandler)Subclassing this method without calling super should be avoided. Subclassers who don't call super must use NSFileCoordinator for coordinated writing themselves. The default implementation of this method invokes [self contentsOfType:error:] synchronously on the calling queue, and then invokes [self writeContents:andAttributes:safelyToURL:ForSaveOperation:completionHandler:] on a background queue. The completion handler is executed on the calling queue.
-
savingFileType
@Nullable public @Nullable java.lang.String savingFileType()
The default implementation returns the current file type. saveToURL: will save to an extension based on this type so subclasses can override this to allow moving the document to a new type.
-
setFileModificationDate
public void setFileModificationDate(@Nullable @Nullable NSDate value)The last known modification date of the document's on-disk representation. Updated by openWithCompletionHandler:, revertToContentsOfURL:, and saveToURL: and will return nil if none of these has completed successfully at least once.
-
setUndoManager
public void setUndoManager(NSUndoManager value)
The document's undo manager. Setting the undo manager also registers the document as an observer of various NSUndoManager notifications so that -updateChangeCount: is invoked as undoable changes are made to the document. Asking for the undo manager creates a default one if one is not already set. Typically, when a subclass sets the undoManager, it does not need to override -hasUnsavedChanges or call updateChangeCount: manually.
-
setUserActivity
public void setUserActivity(@Nullable @Nullable NSUserActivity value)API-Since: 8.0
-
undoManager
public NSUndoManager undoManager()
The document's undo manager. Setting the undo manager also registers the document as an observer of various NSUndoManager notifications so that -updateChangeCount: is invoked as undoable changes are made to the document. Asking for the undo manager creates a default one if one is not already set. Typically, when a subclass sets the undoManager, it does not need to override -hasUnsavedChanges or call updateChangeCount: manually.
-
updateChangeCount
public void updateChangeCount(long change)
Record the fact that a change affecting the value returned by -hasUnsavedChanges has occurred. Subclasses should not need to call this if they set the undoManager.
-
updateChangeCountWithTokenForSaveOperation
public void updateChangeCountWithTokenForSaveOperation(@NotNull @NotNull java.lang.Object changeCountToken, long saveOperation)
-
updateUserActivityState
public void updateUserActivityState(@NotNull @NotNull NSUserActivity userActivity)API-Since: 8.0
-
userActivity
@Nullable public @Nullable NSUserActivity userActivity()
API-Since: 8.0
-
userInteractionNoLongerPermittedForError
public void userInteractionNoLongerPermittedForError(@NotNull @NotNull NSError error)UIKit calls this method when it is no longer safe to proceed without immediately handling the error, such as when the app is being suspended. Subclasses must immediately wrap up error handling (including dismissing any interactive UI) and call [self finishedHandlingError:] before returning. It is only necessary to override this method if you override -handleError:userInteractionPermitted: without calling super
-
writeContentsAndAttributesSafelyToURLForSaveOperationError
public boolean writeContentsAndAttributesSafelyToURLForSaveOperationError(@NotNull @NotNull java.lang.Object contents, @Nullable @Nullable NSDictionary<?,?> additionalFileAttributes, @NotNull @NotNull NSURL url, long saveOperation, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)This method is responsible for doing document writing in a way that minimizes the danger of leaving the disk to which writing is being done in an inconsistent state in the event of an application crash, system crash, hardware failure, power outage, etc. Because it does several different things, and because the things are likely to change in future releases of iOS, it's probably not a good idea to override this method without invoking super.
-
writeContentsToURLForSaveOperationOriginalContentsURLError
public boolean writeContentsToURLForSaveOperationOriginalContentsURLError(@NotNull @NotNull java.lang.Object contents, @NotNull @NotNull NSURL url, long saveOperation, @Nullable @Nullable NSURL originalContentsURL, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)Called by -writeContents:andAttributes:safelyToURL:forSaveOperation:error: to write the data to disk. Override point for subclasses that need access to the on-disk representation of the document while saving.
-
observedPresentedItemUbiquityAttributes
@NotNull public @NotNull NSSet<java.lang.String> observedPresentedItemUbiquityAttributes()
Description copied from interface:NSFilePresenterThe set of ubiquity attributes, which the receiver wishes to be notified about when they change for presentedItemURL. Valid attributes include only NSURLIsUbiquitousItemKey and any other attributes whose names start with "NSURLUbiquitousItem" or "NSURLUbiquitousSharedItem". The default set, in case this property is not implemented, includes of all such attributes. This property will normally be checked only at the time addFilePresenter: is called. However, if presentedItemURL is nil at that time, it will instead be checked only at the end of a coordinated write where presentedItemURL became non-nil. The value of this property should not change depending on whether presentedItemURL is currently ubiquitous or is located a ubiquity container. For example, NSDocument implements this property to always return NSURLIsUbiquitousItemKey, NSURLUbiquitousItemIsSharedKey, and various other properties starting with "NSURLUbiquitousSharedItem". It needsto be notified about changes to these properties in order to implement support for ubiquitous and shared documents. API-Since: 11.0- Specified by:
observedPresentedItemUbiquityAttributesin interfaceNSFilePresenter
-
presentedItemDidChangeUbiquityAttributes
public void presentedItemDidChangeUbiquityAttributes(@NotNull @NotNull NSSet<java.lang.String> attributes)Description copied from interface:NSFilePresenterBe notified that the presented file or file package's ubiquity attributes have changed. The possible attributes that can appear in the given set include only those specified by the receiver's value for observedPresentedItemUbiquityAttributes, or those in the default set if that property is not implemented. Note that changes to these attributes do not normally align with -presentedItemDidChange notifications. API-Since: 11.0- Specified by:
presentedItemDidChangeUbiquityAttributesin interfaceNSFilePresenter
-
relinquishPresentedItemToReader
public void relinquishPresentedItemToReader(@NotNull NSFilePresenter.Block_relinquishPresentedItemToReader reader)Description copied from interface:NSFilePresenterGiven that something in the system is waiting to read from the presented file or directory, do whatever it takes to ensure that the application will behave properly while that reading is happening, and then invoke the completion handler. The definition of "properly" depends on what kind of ownership model the application implements. Implementations of this method must always invoke the passed-in reader block because other parts of the system will wait until it is invoked or until the user loses patience and cancels the waiting. When an implementation of this method invokes the passed-in block it can pass that block yet another block, which will be invoked in the receiver's operation queue when reading is complete. A common sequence that your NSFilePresenter must handle is the file coordination mechanism sending this message, then sending -savePresentedItemChangesWithCompletionHandler:, and then, after you have invoked that completion handler, invoking your reacquirer.- Specified by:
relinquishPresentedItemToReaderin interfaceNSFilePresenter
-
relinquishPresentedItemToWriter
public void relinquishPresentedItemToWriter(@NotNull NSFilePresenter.Block_relinquishPresentedItemToWriter writer)Description copied from interface:NSFilePresenterGiven that something in the system is waiting to write to the presented file or directory, do whatever it takes to ensure that the application will behave properly while that writing is happening, and then invoke the completion handler. The definition of "properly" depends on what kind of ownership model the application implements. Implementations of this method must always invoke the passed-in writer block because other parts of the system will wait until it is invoked or until the user loses patience and cancels the waiting. When an implementation of this method invokes the passed-in block it can pass that block yet another block, which will be invoked in the receiver's operation queue when writing is complete. A common sequence that your NSFilePresenter must handle is the file coordination mechanism sending this message, then sending -accommodatePresentedItemDeletionWithCompletionHandler: or -savePresentedItemChangesWithCompletionHandler:, and then, after you have invoked that completion handler, invoking your reacquirer. It is also common for your NSFilePresenter to be sent a combination of the -presented... messages listed below in between relinquishing and reacquiring.- Specified by:
relinquishPresentedItemToWriterin interfaceNSFilePresenter
-
navigationItemDidEndRenamingWithTitle
public void navigationItemDidEndRenamingWithTitle(@NotNull @NotNull UINavigationItem navigationItem, @NotNull @NotNull java.lang.String title)Description copied from interface:UINavigationItemRenameDelegateThis method is called when renaming has ended. The title on the navigation item has already been changed when this method is called but clients can make further adjustments to it when necessary.- Specified by:
navigationItemDidEndRenamingWithTitlein interfaceUINavigationItemRenameDelegate
-
navigationItemShouldEndRenamingWithTitle
public boolean navigationItemShouldEndRenamingWithTitle(@NotNull @NotNull UINavigationItem navigationItem, @NotNull @NotNull java.lang.String title)Description copied from interface:UINavigationItemRenameDelegateThis method can be used to prevent renaming from happening. However there are cases (e.g. when a new navigation item is pushed on the navigation bar) where this method will not be called and instead navigationItem:didEndRenamingWithTitle: is called right away. Clients are therefore expected to handle titles in navigationItem:didEndRenamingWithTitle: for which they would return NO from navigationItem:shouldEndRenamingWithTitle:.- Specified by:
navigationItemShouldEndRenamingWithTitlein interfaceUINavigationItemRenameDelegate
-
navigationItemWillBeginRenamingWithSuggestedTitleSelectedRange
@NotNull public @NotNull java.lang.String navigationItemWillBeginRenamingWithSuggestedTitleSelectedRange(@NotNull @NotNull UINavigationItem navigationItem, @NotNull @NotNull java.lang.String title, @NotNull @NotNull NSRange selectedRange)Description copied from interface:UINavigationItemRenameDelegateCalled when we begin renaming. Implementing this method allows for customizing the initial text that will show up in the text field as well as the selected range of that text.- Specified by:
navigationItemWillBeginRenamingWithSuggestedTitleSelectedRangein interfaceUINavigationItemRenameDelegate
-
navigationItemShouldBeginRenaming
public boolean navigationItemShouldBeginRenaming(@NotNull @NotNull UINavigationItem navigationItem)Description copied from interface:UINavigationItemRenameDelegateControls whether the rename action is supported for the given navigation item. For example this method is called when the navigation bar's document menu is shown to validate if the rename action should be part of that menu.- Specified by:
navigationItemShouldBeginRenamingin interfaceUINavigationItemRenameDelegate
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-