Package apple.pdfkit
Class PDFSelection
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.pdfkit.PDFSelection
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPDFSelection(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()voidaddSelection(PDFSelection selection)Add a selection to this selection.voidaddSelections(NSArray<? extends PDFSelection> selections)For adding several selections, you can get better performance calling -[addSelections:] and passing in an array of PDFSelections than calling -[addSelection] above inside a loop.static PDFSelectionalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)NSAttributedStringattributedString()static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)CGRectboundsForPage(PDFPage page)Given a PDFPage, returns the bounds in page-space of the text covered by the selection on that page.static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()UIColorcolor()If no color is ever specified, PDFSelections will draw using [NSColor selectedTextBackgroundColor] when active and [NSColor secondarySelectedControlColor] when not active.java.lang.ObjectcopyWithZone(org.moe.natj.general.ptr.VoidPtr zone)static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()voiddrawForPageActive(PDFPage page, boolean active)Calls the below method passing kPDFDisplayBoxCropBox for box.voiddrawForPageWithBoxActive(PDFPage page, long box, boolean active)Draws the selection in page space relative to the origin of box.voidextendSelectionAtEnd(long succeed)Extends the selection at either end.voidextendSelectionAtStart(long precede)voidextendSelectionForLineBoundaries()Extend to the selection to the beginning and end of the currently selected lines of text.static longhash_static()PDFSelectioninit()PDFSelectioninitWithDocument(PDFDocument document)Returns and empty PDFSelection.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 NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static java.lang.Objectnew_objc()longnumberOfTextRangesOnPage(PDFPage page)Returns the number of contiguous ranges of text on the specified page.NSArray<? extends PDFPage>pages()Array of pages covered by the selection.NSRangerangeAtIndexOnPage(long index, PDFPage page)Returns a range of contiguous text at index on the specified page.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)NSArray<? extends PDFSelection>selectionsByLine()Returns an array of PDFSelection objects - one for each line of text covered by the receiver.voidsetColor(UIColor value)If no color is ever specified, PDFSelections will draw using [NSColor selectedTextBackgroundColor] when active and [NSColor secondarySelectedControlColor] when not active.static voidsetVersion_static(long aVersion)java.lang.Stringstring()String representing the text covered by the selection.static org.moe.natj.objc.Classsuperclass_static()static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, 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, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
addSelection
public void addSelection(PDFSelection selection)
Add a selection to this selection. Selections don't have to be contiguous. If the selection added overlaps with this selection, overlaps are removed.
-
addSelections
public void addSelections(NSArray<? extends PDFSelection> selections)
For adding several selections, you can get better performance calling -[addSelections:] and passing in an array of PDFSelections than calling -[addSelection] above inside a loop. It is the "normalization" (removing the overlaps) that can be slow when adding a selection to another. This function adds all the selections first and then normalizes just once at the end.
-
alloc
public static PDFSelection alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
attributedString
public NSAttributedString attributedString()
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
boundsForPage
public CGRect boundsForPage(PDFPage page)
Given a PDFPage, returns the bounds in page-space of the text covered by the selection on that page. Note that the bounds are relative to the origin of the page content, not the origin of any particular PDFDisplayBox.
-
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()
-
color
public UIColor color()
If no color is ever specified, PDFSelections will draw using [NSColor selectedTextBackgroundColor] when active and [NSColor secondarySelectedControlColor] when not active. Calling -[setColor] will force the specified color to be used for both active and inactive drawing.
-
copyWithZone
public java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
- Specified by:
copyWithZonein interfaceNSCopying
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
drawForPageActive
public void drawForPageActive(PDFPage page, boolean active)
Calls the below method passing kPDFDisplayBoxCropBox for box.
-
drawForPageWithBoxActive
public void drawForPageWithBoxActive(PDFPage page, long box, boolean active)
Draws the selection in page space relative to the origin of box. Box can be kPDFDisplayBoxMediaBox, kPDFDisplayBoxCropBox, kPDFDisplayBoxBleedBox, kPDFDisplayBoxTrimBox or kPDFDisplayBoxArtBox. If active is true, it is drawn using -[NSColor selectedTextBackgroundColor], otherwise it is drawn using -[NSColor secondarySelectedControlColor].
-
extendSelectionAtEnd
public void extendSelectionAtEnd(long succeed)
Extends the selection at either end. Selections can be extended right off onto neighboring pages even to include the entire PDF document.
-
extendSelectionAtStart
public void extendSelectionAtStart(long precede)
-
extendSelectionForLineBoundaries
public void extendSelectionForLineBoundaries()
Extend to the selection to the beginning and end of the currently selected lines of text. If the current selection is on a single line, then this will extend it to the entire line width. If the selection is across multiple lines, then the first and last lines are expected to wholly contain their respective rows of text.
-
hash_static
public static long hash_static()
-
init
public PDFSelection init()
-
initWithDocument
public PDFSelection initWithDocument(PDFDocument document)
Returns and empty PDFSelection. Generally this is not useful but you can use this empty PDFSelection as a container into which you -[addSelection] or -[addSelections] below.
-
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
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object new_objc()
-
numberOfTextRangesOnPage
public long numberOfTextRangesOnPage(PDFPage page)
Returns the number of contiguous ranges of text on the specified page. Returns zero if page is not in selection. A typical, simple selection will contain a single range of text.
-
pages
public NSArray<? extends PDFPage> pages()
Array of pages covered by the selection. These are sorted by page index.
-
rangeAtIndexOnPage
public NSRange rangeAtIndexOnPage(long index, PDFPage page)
Returns a range of contiguous text at index on the specified page. A typical, simple selection will contain a single range of text.
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
selectionsByLine
public NSArray<? extends PDFSelection> selectionsByLine()
Returns an array of PDFSelection objects - one for each line of text covered by the receiver. For example if the receiver PDFSelection represents a selected paragraph, calling this method would return several PDFSelections - one for each line of text in the paragraph.
-
setColor
public void setColor(UIColor value)
If no color is ever specified, PDFSelections will draw using [NSColor selectedTextBackgroundColor] when active and [NSColor secondarySelectedControlColor] when not active. Calling -[setColor] will force the specified color to be used for both active and inactive drawing.
-
setVersion_static
public static void setVersion_static(long aVersion)
-
string
public java.lang.String string()
String representing the text covered by the selection. May contain line-feeds.
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
-