Class NSUndoManager

  • All Implemented Interfaces:
    NSObject

    public class NSUndoManager
    extends NSObject
    API-Since: 3.0
    • Constructor Detail

      • NSUndoManager

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static NSUndoManager 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()
      • 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)
      • 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()
      • beginUndoGrouping

        public void beginUndoGrouping()
        Begin/End Grouping
      • canRedo

        public boolean canRedo()
      • canUndo

        public boolean canUndo()
        Undoes a nested grouping without first trying to close a top level undo group.
      • disableUndoRegistration

        public void disableUndoRegistration()
        Enable/Disable registration
      • enableUndoRegistration

        public void enableUndoRegistration()
      • endUndoGrouping

        public void endUndoGrouping()
      • groupingLevel

        public long groupingLevel()
        These nest.
      • groupsByEvent

        public boolean groupsByEvent()
        Groups By Event
      • isRedoing

        public boolean isRedoing()
      • isUndoRegistrationEnabled

        public boolean isUndoRegistrationEnabled()
      • isUndoing

        public boolean isUndoing()
        returns whether or not the UndoManager has anything to undo or redo
      • levelsOfUndo

        public long levelsOfUndo()
        Undo levels
      • prepareWithInvocationTarget

        @NotNull
        public @NotNull java.lang.Object prepareWithInvocationTarget​(@NotNull
                                                                     @NotNull java.lang.Object target)
        Invocation based undo
      • redo

        public void redo()
        Undo until a matching begin. It terminates a top level undo if necesary. Useful for undoing when groupByEvents is on (default is on)
      • redoActionIsDiscardable

        public boolean redoActionIsDiscardable()
        API-Since: 5.0
      • redoActionName

        @NotNull
        public @NotNull java.lang.String redoActionName()
      • redoMenuItemTitle

        @NotNull
        public @NotNull java.lang.String redoMenuItemTitle()
      • redoMenuTitleForUndoActionName

        @NotNull
        public @NotNull java.lang.String redoMenuTitleForUndoActionName​(@NotNull
                                                                        @NotNull java.lang.String actionName)
      • registerUndoWithTargetHandler

        public void registerUndoWithTargetHandler​(@NotNull
                                                  @NotNull java.lang.Object target,
                                                  @NotNull
                                                  @NotNull NSUndoManager.Block_registerUndoWithTargetHandler undoHandler)
        records single undo operation for the specified target As with other undo operations, this does not strongly retain target. Care should be taken to avoid introducing retain cycles by other references captured by the block. API-Since: 9.0
        Parameters:
        target - non-nil target of the undo operation
        undoHandler - non-nil block to be executed for the undo operation
      • registerUndoWithTargetSelectorObject

        public void registerUndoWithTargetSelectorObject​(@NotNull
                                                         @NotNull java.lang.Object target,
                                                         @NotNull
                                                         @NotNull org.moe.natj.objc.SEL selector,
                                                         @Nullable
                                                         @Nullable java.lang.Object anObject)
        Object based Undo
      • removeAllActions

        public void removeAllActions()
        remove
      • removeAllActionsWithTarget

        public void removeAllActionsWithTarget​(@NotNull
                                               @NotNull java.lang.Object target)
      • runLoopModes

        @NotNull
        public @NotNull NSArray<java.lang.String> runLoopModes()
        Run Loop Modes
      • setActionIsDiscardable

        public void setActionIsDiscardable​(boolean discardable)
        API-Since: 5.0
      • setActionName

        public void setActionName​(@NotNull
                                  @NotNull java.lang.String actionName)
        Call undoActionName or redoActionName to get the name of the next action to be undone or redone. Returns @"" if there is nothing to undo/redo or no action names were registered.
      • setGroupsByEvent

        public void setGroupsByEvent​(boolean value)
        Groups By Event
      • setLevelsOfUndo

        public void setLevelsOfUndo​(long value)
        Undo levels
      • setRunLoopModes

        public void setRunLoopModes​(@NotNull
                                    @NotNull NSArray<java.lang.String> value)
        Run Loop Modes
      • undo

        public void undo()
        Undo/Redo
      • undoActionIsDiscardable

        public boolean undoActionIsDiscardable()
        API-Since: 5.0
      • undoActionName

        @NotNull
        public @NotNull java.lang.String undoActionName()
        Undo/Redo action name
      • undoMenuItemTitle

        @NotNull
        public @NotNull java.lang.String undoMenuItemTitle()
        Undo/Redo menu item title
      • undoMenuTitleForUndoActionName

        @NotNull
        public @NotNull java.lang.String undoMenuTitleForUndoActionName​(@NotNull
                                                                        @NotNull java.lang.String actionName)
        localization hooks
      • undoNestedGroup

        public void undoNestedGroup()
        Will redo last top-level undo.
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.