Package apple.uikit
Class NSTextContainer
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.uikit.NSTextContainer
-
- All Implemented Interfaces:
NSCoding,NSSecureCoding,NSObject,NSTextLayoutOrientationProvider
public class NSTextContainer extends NSObject implements NSSecureCoding, NSTextLayoutOrientationProvider
-
-
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 protectedNSTextContainer(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean_supportsSecureCoding()This property must return YES on all classes that allow secure coding.static booleanaccessInstanceVariablesDirectly()static NSTextContaineralloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)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()static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()voidencodeWithCoder(NSCoder coder)NSArray<? extends UIBezierPath>exclusionPaths()Default value : empty array An array of UIBezierPath representing the exclusion paths inside the receiver's bounding rect.static longhash_static()booleanheightTracksTextView()NSTextContainerinit()NSTextContainerinitWithCoder(NSCoder coder)NS_DESIGNATED_INITIALIZERNSTextContainerinitWithSize(CGSize size)Initialization ***************************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)booleanisSimpleRectangularTextContainer()Returns YES if the receiver is a rectangular shape defined simply by -size.static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)NSLayoutManagerlayoutManager()Accessor for the NSLayoutManager object owning the receiver.longlayoutOrientation()A property describing the receiver's layout orientation.longlineBreakMode()Default value: NSLineBreakByWordWrapping The line break mode defines the behavior of the last line inside the text container.doublelineFragmentPadding()Default value: 5.0 The layout padding at the beginning and end of the line fragment rects insetting the layout width available for the contents.CGRectlineFragmentRectForProposedRectAtIndexWritingDirectionRemainingRect(CGRect proposedRect, long characterIndex, long baseWritingDirection, CGRect remainingRect)Returns the bounds of a line fragment rect inside the receiver for proposedRect.longmaximumNumberOfLines()Default value: 0 (no limit) The maximum number of lines that can be stored in the receiver.static java.lang.Objectnew_objc()voidreplaceLayoutManager(NSLayoutManager newLayoutManager)This method should be used instead of the primitive -setLayoutManager: if you need to replace a container's layoutManager with a new one leaving the rest of the web intact.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetExclusionPaths(NSArray<? extends UIBezierPath> value)Default value : empty array An array of UIBezierPath representing the exclusion paths inside the receiver's bounding rect.voidsetHeightTracksTextView(boolean value)voidsetLayoutManager(NSLayoutManager value)Accessor for the NSLayoutManager object owning the receiver.voidsetLayoutManager_unsafe(NSLayoutManager value)Accessor for the NSLayoutManager object owning the receiver.voidsetLineBreakMode(long value)Default value: NSLineBreakByWordWrapping The line break mode defines the behavior of the last line inside the text container.voidsetLineFragmentPadding(double value)Default value: 5.0 The layout padding at the beginning and end of the line fragment rects insetting the layout width available for the contents.voidsetMaximumNumberOfLines(long value)Default value: 0 (no limit) The maximum number of lines that can be stored in the receiver.voidsetSize(CGSize value)Default value: CGSizeZero Defines the maximum size for the layout area returned from -lineFragmentRectForProposedRect:writingDirection:remainingRect:. 0.0 and less means no limitation.static voidsetVersion_static(long aVersion)voidsetWidthTracksTextView(boolean value)Default value: NO Define whether the text container view bounds changes can affect the text container size.CGSizesize()Default value: CGSizeZero Defines the maximum size for the layout area returned from -lineFragmentRectForProposedRect:writingDirection:remainingRect:. 0.0 and less means no limitation.static org.moe.natj.objc.Classsuperclass_static()static booleansupportsSecureCoding()static longversion_static()booleanwidthTracksTextView()Default value: NO Define whether the text container view bounds changes can affect the text container size.-
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()
-
alloc
public static NSTextContainer alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
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()
-
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()
-
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()
-
encodeWithCoder
public void encodeWithCoder(NSCoder coder)
- Specified by:
encodeWithCoderin interfaceNSCoding
-
exclusionPaths
public NSArray<? extends UIBezierPath> exclusionPaths()
Default value : empty array An array of UIBezierPath representing the exclusion paths inside the receiver's bounding rect.
-
heightTracksTextView
public boolean heightTracksTextView()
-
init
public NSTextContainer init()
-
initWithCoder
public NSTextContainer initWithCoder(NSCoder coder)
Description copied from interface:NSCodingNS_DESIGNATED_INITIALIZER- Specified by:
initWithCoderin interfaceNSCoding
-
initWithSize
public NSTextContainer initWithSize(CGSize size)
Initialization ***************************
-
isSimpleRectangularTextContainer
public boolean isSimpleRectangularTextContainer()
Returns YES if the receiver is a rectangular shape defined simply by -size. TextKit utilizes this information for enabling various layout optimizations. NSLayoutManager disables non-contiguous layout when this property is NO. The default implementation returns NO when -exclusionPaths has 1 or more items, -maximumNumberOfLines is not 0, or -lineFragmentRectForProposedRect:atIndex:writingDirection:remainingRect: is overridden. It's recommended to override this property when -lineFragmentRectForProposedRect:atIndex:writingDirection:remainingRect: is overridden.
-
layoutManager
public NSLayoutManager layoutManager()
Accessor for the NSLayoutManager object owning the receiver. Avoid assigning a layout manager directly through this property. Adding a text container to a layout manager through -[NSLayoutManager addTextContainer:] will use the property for assigning the new layout manager.
-
layoutOrientation
public long layoutOrientation()
Description copied from interface:NSTextLayoutOrientationProviderA property describing the receiver's layout orientation. This property defines the default value for the range of string laid out in the receiver in absence of explicit NSVerticalGlyphFormAttributeName attribute. For example, when NSTextLayoutOrientationVertical, the default value for NSVerticalGlyphFormAttributeName is 1. When rendering into the receiver, the Text System assumes the coordinate system is appropriately rotated.- Specified by:
layoutOrientationin interfaceNSTextLayoutOrientationProvider
-
lineBreakMode
public long lineBreakMode()
Default value: NSLineBreakByWordWrapping The line break mode defines the behavior of the last line inside the text container.
-
lineFragmentPadding
public double lineFragmentPadding()
Default value: 5.0 The layout padding at the beginning and end of the line fragment rects insetting the layout width available for the contents. This value is utilized by NSLayoutManager for determining the layout width.
-
lineFragmentRectForProposedRectAtIndexWritingDirectionRemainingRect
public CGRect lineFragmentRectForProposedRectAtIndexWritingDirectionRemainingRect(CGRect proposedRect, long characterIndex, long baseWritingDirection, CGRect remainingRect)
Returns the bounds of a line fragment rect inside the receiver for proposedRect. This is the intersection of proposedRect and the receiver's bounding rect defined by -size property. The regions defined by -exclusionPaths property are excluded from the return value. charIndex is the character location inside the text storage for the line fragment being processed. It is possible that proposedRect can be divided into multiple line fragments due to exclusion paths. In that case, remainingRect returns the remainder that can be passed in as the proposed rect for the next iteration. baseWritingDirection determines the direction of advancement for line fragments inside a visual horizontal line. The values passed into the method are either NSWritingDirectionLeftToRight or NSWritingDirectionRightToLeft. This method can be overridden by subclasses for further text container region customization.
-
maximumNumberOfLines
public long maximumNumberOfLines()
Default value: 0 (no limit) The maximum number of lines that can be stored in the receiver. This value is utilized by NSLayoutManager for determining the maximum number of lines associated with the text container.
-
replaceLayoutManager
public void replaceLayoutManager(NSLayoutManager newLayoutManager)
This method should be used instead of the primitive -setLayoutManager: if you need to replace a container's layoutManager with a new one leaving the rest of the web intact. All the NSTextContainers on the old NSLayoutManager get transferred to the new one. This method deals with all the work of making sure the containers don't get deallocated and removing the old layoutManager from the text storage and replacing it with the new one.
-
setExclusionPaths
public void setExclusionPaths(NSArray<? extends UIBezierPath> value)
Default value : empty array An array of UIBezierPath representing the exclusion paths inside the receiver's bounding rect.
-
setHeightTracksTextView
public void setHeightTracksTextView(boolean value)
-
setLayoutManager_unsafe
public void setLayoutManager_unsafe(NSLayoutManager value)
Accessor for the NSLayoutManager object owning the receiver. Avoid assigning a layout manager directly through this property. Adding a text container to a layout manager through -[NSLayoutManager addTextContainer:] will use the property for assigning the new layout manager.
-
setLayoutManager
public void setLayoutManager(NSLayoutManager value)
Accessor for the NSLayoutManager object owning the receiver. Avoid assigning a layout manager directly through this property. Adding a text container to a layout manager through -[NSLayoutManager addTextContainer:] will use the property for assigning the new layout manager.
-
setLineBreakMode
public void setLineBreakMode(long value)
Default value: NSLineBreakByWordWrapping The line break mode defines the behavior of the last line inside the text container.
-
setLineFragmentPadding
public void setLineFragmentPadding(double value)
Default value: 5.0 The layout padding at the beginning and end of the line fragment rects insetting the layout width available for the contents. This value is utilized by NSLayoutManager for determining the layout width.
-
setMaximumNumberOfLines
public void setMaximumNumberOfLines(long value)
Default value: 0 (no limit) The maximum number of lines that can be stored in the receiver. This value is utilized by NSLayoutManager for determining the maximum number of lines associated with the text container.
-
setSize
public void setSize(CGSize value)
Default value: CGSizeZero Defines the maximum size for the layout area returned from -lineFragmentRectForProposedRect:writingDirection:remainingRect:. 0.0 and less means no limitation.
-
setWidthTracksTextView
public void setWidthTracksTextView(boolean value)
Default value: NO Define whether the text container view bounds changes can affect the text container size.
-
size
public CGSize size()
Default value: CGSizeZero Defines the maximum size for the layout area returned from -lineFragmentRectForProposedRect:writingDirection:remainingRect:. 0.0 and less means no limitation.
-
widthTracksTextView
public boolean widthTracksTextView()
Default value: NO Define whether the text container view bounds changes can affect the text container size.
-
supportsSecureCoding
public static boolean supportsSecureCoding()
-
_supportsSecureCoding
public boolean _supportsSecureCoding()
Description copied from interface:NSSecureCodingThis 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:
_supportsSecureCodingin interfaceNSSecureCoding
-
-