文档管理中心

您当前正在浏览HarmonyOS开发者3.0版本配套的开发者文档,对应API能力级别为API 8 Release。此版本文档已归档不再维护,推荐您使用HarmonyOS NEXT版本

API参考Java API参考ohos.miscservices.inputmethodClassEditingCapability

EditingCapability

java.lang.Object

|---ohos.miscservices.inputmethod.EditingCapability

收起
自动换行
深色代码主题
复制
  1. public class EditingCapability
  2. extends Object
  3. implements Sequenceable
Describes the attributes of the text obtained by an input method.

This class describes the attributes of the text that an input method expects to obtain from an application. The text is transferred from the edit box of the application to the input method. The text attributes include the maximum number of lines and maximum number of characters in the text.

Since:

3

Nested Class Summary

展开

Nested classes/interfaces inherited from interface ohos.utils.Sequenceable

Sequenceable.Producer<T>

Constructor Summary

展开

Constructor

Description

EditingCapability​()

  

Method Summary

展开

Modifier and Type

Method

Description

int

getMaxChars​()

Obtains the maximum number of characters in the text.

int

getMaxLines​()

Obtains the maximum number of lines in the text.

boolean

marshalling​(Parcel out)

Marshals this Sequenceable object into a Parcel.

void

setMaxChars​(int maxChars)

Sets the maximum number of characters in the text.

void

setMaxLines​(int maxLines)

Sets the maximum number of lines in the text.

boolean

unmarshalling​(Parcel in)

Unmarshals this Sequenceable object from a Parcel.

展开

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

展开

Methods inherited from interface ohos.utils.Sequenceable

hasFileDescriptor

Constructor Detail

EditingCapability

public EditingCapability​()

Method Detail

marshalling

public boolean marshalling​(Parcel out)

Description copied from interface: Sequenceable

Marshals this Sequenceable object into a Parcel.

Specified by:

marshalling in interface Sequenceable

Parameters:

展开

Parameter Name

Parameter Description

out

Indicates the Parcel object to which the Sequenceable object will be marshaled..

Returns:

Returns true if the marshalling is successful; returns false otherwise.

unmarshalling

public boolean unmarshalling​(Parcel in)

Description copied from interface: Sequenceable

Unmarshals this Sequenceable object from a Parcel.

Specified by:

unmarshalling in interface Sequenceable

Parameters:

展开

Parameter Name

Parameter Description

in

Indicates the Parcel object into which the Sequenceable object has been marshaled.

Returns:

Returns true if the unmarshalling is successful; returns false otherwise.

getMaxLines

public int getMaxLines​()

Obtains the maximum number of lines in the text.

This method obtains the maximum number of text lines that the component should return, as suggested by the input method.

Returns:

Returns the maximum number of lines in the text.

Since:

3

setMaxLines

public void setMaxLines​(int maxLines)

Sets the maximum number of lines in the text.

Parameters:

展开

Parameter Name

Parameter Description

maxLines

Indicates the maximum number of lines to set. The value is a positive integer.

Since:

3

getMaxChars

public int getMaxChars​()

Obtains the maximum number of characters in the text.

This method obtains the maximum number of characters that the component should return, as suggested by the input method.

Returns:

Returns the maximum number of characters in the text.

Since:

3

setMaxChars

public void setMaxChars​(int maxChars)

Sets the maximum number of characters in the text.

Parameters:

展开

Parameter Name

Parameter Description

maxChars

Indicates the maximum number of characters to set. The value is a positive integer.

Since:

3

搜索
请输入您想要搜索的关键词