このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。

翻訳前ページへ


Interface XAccessibleText
Language

The 解放する/自由な and Open 生産性 控訴
解放(する)d: Apache OpenOffice 4.1.16

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: 星/主役にする :: accessibility ::

interface XAccessibleText
Description
器具/実施する this interface to give read-only 接近 to a text.

The XAccessibleText interface should be 器具/実施するd by all UNO 構成要素s that 現在の textual (警察などへの)密告,告訴(状) on the 陳列する,発揮する like buttons, text 入ること/参加(者) fields, or text 部分s of the 文書 window. The interface 供給するs 接近 to the text's content, せいにするs, and spatial 場所. However, text can not be 修正するd with this interface. That is the 仕事 of the XAccessibleEditableText interface.

The text length, i.e. the number of characters in the text, is returned by getCharacterCount. All methods that operate on particular characters (e.g. getCharacterAt) use character indices from 0 to length-1. All methods that operate on character positions (e.g. getTextRange) use indices from 0 to length.

Please 公式文書,認める that accessible text does not やむを得ず support 選択. In this 事例/患者 it should behave as if there where no 選択. An empty 選択 is used for example to 表明する the 現在の cursor position.

Since
OOo 1.1.2
Developers Guide
Accessibility - XAccessibleText

Methods' 要約
getCaretPosition Return the position of the caret.  
setCaretPosition 始める,決める the position of the caret.  
getCharacter Return the character at the 明示するd position.  
getCharacterAttributes Get the せいにする 始める,決める for the 明示するd position.  
getCharacterBounds Return the bounding box of the 明示するd position.  
getCharacterCount Return the number of characters in the 代表するd text.  
getIndexAtPoint Return the text position for the 明示するd 審査する position.  
getSelectedText Return the selected text.  
getSelectionStart Return the position of the start of the 選択.  
getSelectionEnd Return the position of the end of the 選択.  
setSelection 始める,決める a new 選択.  
getText Return the whole text.  
getTextRange Return the 明示するd text 範囲.  
getTextAtIndex Get a text 部分 around the given position.  
getTextBeforeIndex Get a text 部分 before the given position.  
getTextBehindIndex Get a text 部分 behind the given position.  
copyText Copy the 明示するd text into the clipboard.  
Methods' 詳細(に述べる)s
getCaretPosition
long
getCaretPosition();

Description
Return the position of the caret.

Returns the 相殺する of the caret. The caret is often called text cursor. The caret is 現実に the position between two characters. Its position/相殺する is that of the character to the 権利 of it.

Returns
The returned 相殺する is 親族 to the text 代表するd by this 反対する.
setCaretPosition
boolean
setCaretPosition( [in] long  nIndex )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException );

Description
始める,決める the position of the caret.

The caret is often called text cursor. The caret is 現実に the position between two characters. Its position/相殺する is that of the character to the 権利 of it.

Setting the caret position may or may not alter the 現在の 選択. A change of the 選択 is 通知するd to the accessibility event listeners with an AccessibleEventId::ACCESSIBLE_SELECTION_EVENT.

When the new caret position 異なるs from the old one (which, of course, is the 基準 事例/患者) this is 通知するd to the accessibility event listeners with an AccessibleEventId::ACCESSIBLE_CARET_EVENT.

Parameter nIndex
The new 索引 of the caret. This caret is 現実に placed to the left 味方する of the character with that 索引. An 索引 of 0 places the caret so that the next insertion goes before the first character. An 索引 of getCharacterCount leads to insertion after the last character.
Returns
Returns true if the caret has been moved and 誤った さもなければ. A true value does not やむを得ず mean that the caret has been positioned 正確に/まさに at the 要求するd position. If that position lies inside a read-only area the caret is positioned before or behind it. Listen to the caret event to 決定する the new position.
Throws
::com::sun::星/主役にする::lang::IndexOutOfBoundsException if the 索引 is not valid.
getCharacter
char
getCharacter( [in] long  nIndex )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException );

Description
Return the character at the 明示するd position.

Returns the character at the given 索引.

Parameter nIndex
The 索引 of the character to return. The valid 範囲 is 0..length-1.
Returns
the character at the 索引 nIndex.
Throws
::com::sun::星/主役にする::lang::IndexOutOfBoundsException if the 索引 is 無効の
getCharacterAttributes
sequence< ::com::sun::星/主役にする::beans::PropertyValue >
getCharacterAttributes( [in] long  nIndex,
[in] sequence< string >  aRequestedAttributes )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException );

Description
Get the せいにする 始める,決める for the 明示するd position.

Returns a 始める,決める of せいにするs that are associated for the character at the given 索引. To 妨げる the method from returning かもしれない large 始める,決めるs of せいにするs that the 報知係 is not 利益/興味d in the 報知係 has to 供給する a 名簿(に載せる)/表(にあげる) of せいにするs that he wants to be returned.

Parameter nIndex
The 索引 of the character for which to return its せいにするs. The valid 範囲 is 0..length-1.
Parameter aRequestedAttributes
This string sequence defines the 始める,決める of せいにするs that the 報知係 is 利益/興味d in. When there are せいにするs defined that are not 名簿(に載せる)/表(にあげる)d in the sequence then they are not returned. When there are requested せいにするs that are not defined for the character then they are ignored, too.

An empty sequence signals the 報知係s 利益/興味 in all the せいにするs. This is usefull in two 事例/患者s: a) 簡単に as a way to 避ける passing a 潜在的に large array to the called 反対する or b) when the 報知係 does not know what せいにするs the called 反対するs supports but is 利益/興味d in all of them にもかかわらず.

Returns
Returns the explicitly or 暗黙に (empty aRequestedAttributes argument) requested せいにするs of the 明示するd character. Each せいにする is 代表するd by a ::com::sun::星/主役にする::beans::PropertyValue 反対する. The returned 名簿(に載せる)/表(にあげる) of せいにする descriptions 含む/封じ込めるs all せいにするs that are both members of the sequence of requested せいにするs and are defined for the character at the 明示するd 索引.
Throws
::com::sun::星/主役にする::lang::IndexOutOfBoundsException if the 索引 is 無効の
getCharacterBounds
::com::sun::星/主役にする::awt::Rectangle
getCharacterBounds( [in] long  nIndex )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException );

Description
Return the bounding box of the 明示するd position.

Returns the bounding box of the 索引d character.

The 事実上の character after the last character of the 代表するd text, i.e. the one at position length is a special 事例/患者. It 代表するs the 現在の input position and will therefore typically be queried by AT more often than other positions. Because it does not 代表する an 存在するing character its bounding box is defined in relation to 先行する characters. It should be rougly 同等(の) to the bounding box of some character when 挿入するd at the end of the text. Its 高さ typically 存在 the maximal 高さ of all the characters in the text or the 高さ of the 先行する character, its width 存在 at least one pixel so that the bounding box is not degenerate.
公式文書,認める that the 索引 'length' is not always valid. Whether it is or not is 実施 扶養家族. It typically is when text is editable or さもなければ when on the 審査する the caret can be placed behind the text. You can be sure that the 索引 is valid after you have received a CARET event for this 索引.

Parameter nIndex
索引 of the character for which to return its bounding box. The valid 範囲 is 0..length.
Returns
The bounding box of the 言及/関連d character. The bounding box of the 事実上の character at position length has to have 非,不,無-empty dimensions.
Throws
::com::sun::星/主役にする::lang::IndexOutOfBoundsException if the 索引 is 無効の
getCharacterCount
long
getCharacterCount();

Description
Return the number of characters in the 代表するd text.

Returns the number of characters in the text 代表するd by this 反対する or, in other words, the text length.

Returns
Returns the number of characters of this 反対する's text. A 無 value 示すs an empty text.
getIndexAtPoint
long
getIndexAtPoint( [in] ::com::sun::星/主役にする::awt::Point  aPoint );

Description
Return the text position for the 明示するd 審査する position.

Given a point in 地元の 調整するs, i.e. 親族 to the 調整する system of the 反対する, return the 無-based 索引 of the character under that point. The same functionality could be 達成するd by using the bounding boxes for each character as returned by XAccessibleText::getCharacterBounds. The method XAccessibleText::getIndexAtPoint, however, can be 器具/実施するd in a more efficient way.

Parameter aPoint
The position for which to look up the 索引 of the character that is (判決などを)下すd on to the 陳列する,発揮する at that point.
Returns
索引 of the character under the given point or -1 if the point is 無効の or there is no character under the point.
getSelectedText
string
getSelectedText();

Description
Return the selected text.

Returns the 部分 of the text that is selected.

Returns
The returned text is the selected 部分 of the 反対する's text. If no text is selected when this method is called or when 選択 is not supported an empty string is returned.
getSelectionStart
long
getSelectionStart();

Description
Return the position of the start of the 選択.

Returns the 索引 of the start of the selected text.

Returns
If there is no 選択 or 選択 is not supported the position of 選択 start and end will be the same undefined value.
getSelectionEnd
long
getSelectionEnd();

Description
Return the position of the end of the 選択.

Returns the 索引 of the end of the selected text.

Returns
If there is no 選択 or 選択 is not supported the position of 選択 start and end will be the same undefined value.
setSelection
boolean
setSelection( [in] long  nStartIndex,
[in] long  nEndIndex )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException );

Description
始める,決める a new 選択.

始める,決めるs the selected text 部分 によれば the given indices. The old 選択 is 取って代わるd by the new 選択.

The 選択 encompasses the same string of text that XAccessibleText::getTextRange would have selected. See there for 詳細(に述べる)s.

Setting the 選択 may or may not change the caret position. Typically the caret is moved to the position after the second argument. When the caret is moved this is 通知するd to the accessibility event listeners with an AccessibleEventId::ACCESSIBLE_CARET_EVENT.

Parameter nStartIndex
The first character of the new 選択. The valid 範囲 is 0..length. @parm nEndIndex The position after the last character of the new 選択. The valid 範囲 is 0..length.
Returns
Returns true if the 選択 has been 始める,決める 首尾よく and 誤った さもなければ or when 選択 is not supported.
Throws
::com::sun::星/主役にする::lang::IndexOutOfBoundsException if the indices are 無効の
getText
string
getText();

Description
Return the whole text.

Returns the 完全にする text. This is 同等(の) to a call to XAccessibleText::getTextRange with the arguments 無 and getCharacterCount()-1.

Returns
Returns a string that 含む/封じ込めるs the 完全にする text.
getTextRange
string
getTextRange( [in] long  nStartIndex,
[in] long  nEndIndex )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException );

Description
Return the 明示するd text 範囲.

Returns the substring between the two given indices.

The substring starts with the character at nStartIndex (inclusive) and up to the character at nEndIndex (排除的), if nStartIndex is いっそう少なく or equal nEndIndex. If nEndIndex is lower than nStartIndex, the result is the same as a call with the two arguments 存在 交流d.

The whole text can be requested by passing the indices 無 and getCharacterCount(). If both indices have the same value, an empty string is returned.

Parameter nStartIndex
索引 of the first character to 含む in the returned string. The valid 範囲 is 0..length.
Parameter nEndIndex
索引 of the last character to 除外する in the returned string. The valid 範囲 is 0..length.
Returns
Returns the substring starting with the character at nStartIndex (inclusive) and up to the character at nEndIndex (排除的), if nStartIndex is いっそう少なく than or equal to nEndIndex.
Throws
::com::sun::星/主役にする::lang::IndexOutOfBoundsException if the indices are 無効の
getTextAtIndex
TextSegment
getTextAtIndex( [in] long  nIndex,
[in] short  nTextType )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException,
::com::sun::星/主役にする::lang::IllegalArgumentException );

Description
Get a text 部分 around the given position.

Returns the substring of the 明示するd text type that 含む/封じ込めるs the character at the given 索引, if any. For example, given the text type WORD, the word which 含む/封じ込めるs the character at position nIndex is returned, or an empty string if no word is 設立する at the that position.

Parameter nIndex
索引 of the character whose 含む/封じ込めるing text 部分 is to be returned. The valid 範囲 is 0..length.
Parameter nTextType
The type of the text 部分 to return. See AccessibleTextType for the 完全にする 名簿(に載せる)/表(にあげる).
Returns
Returns the requested text 部分. This 部分 may be empty or 無効の when no appropriate text 部分 is 設立する or text type is 無効の.
Throws
::com::sun::星/主役にする::lang::IndexOutOfBoundsException if the 索引 is 無効の
Throws
::com::sun::星/主役にする::lang::InvalidArgumentException if the given text type is not valid.
getTextBeforeIndex
TextSegment
getTextBeforeIndex( [in] long  nIndex,
[in] short  nTextType )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException,
::com::sun::星/主役にする::lang::IllegalArgumentException );

Description
Get a text 部分 before the given position.

Returns the substring of the 明示するd text type that is 位置を示すd before the given character and does not 含む it. The result of this method should be same as a result for XAccessibleText::getTextAtIndex with a 都合よく 減少(する)d 索引 value.

For example, if text type is WORD, then the 完全にする word that is closest to and 位置を示すd before nIndex is returned.

If the 索引 is valid, but no suitable word (or other text type) is 設立する, an empty text segment is returned.

Parameter nIndex
索引 of the character for which to return the text part before it. The 索引 character will not be part of the returned string. The valid 範囲 is 0..length.
Parameter nTextType
The type of the text 部分 to return. See AccessibleTextType for the 完全にする 名簿(に載せる)/表(にあげる).
Returns
Returns the requested text 部分. This 部分 may be empty or 無効の when no appropriate text 部分 is 設立する or text type is 無効の.
Throws
::com::sun::星/主役にする::lang::IndexOutOfBoundsException if the 索引 is 無効の.
Throws
::com::sun::星/主役にする::lang::InvalidArgumentException if the given text type is not valid.
getTextBehindIndex
TextSegment
getTextBehindIndex( [in] long  nIndex,
[in] short  nTextType )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException,
::com::sun::星/主役にする::lang::IllegalArgumentException );

Description
Get a text 部分 behind the given position.

Returns the substring of the 明示するd text type that is 位置を示すd after the given character and does not 含む it. The result of this method should be same as a result for XAccessibleText::getTextAtIndex with a 都合よく 増加するd 索引 value.

For example, if text type is WORD, then the 完全にする word that is closest to and 位置を示すd behind nIndex is returned.

If the 索引 is valid, but no suitable word (or other text type) is 設立する, an empty string is returned.

Parameter nIndex
索引 of the character for which to return the text part after it. The 索引 character will be part of the returned string. The valid 範囲 is 0..length.
Parameter nTextType
The type of the text 部分 to return. See AccessibleTextType for the 完全にする 名簿(に載せる)/表(にあげる).
Returns
Returns the requested text 部分. This 部分 may be empty or 無効の when no appropriate text 部分 is 設立する or text type is 無効の.
Throws
::com::sun::星/主役にする::lang::IndexOutOfBoundsException if the 索引 is 無効の
Throws
::com::sun::星/主役にする::lang::InvalidArgumentException if the given text type is not valid.
copyText
boolean
copyText( [in] long  nStartIndex,
[in] long  nEndIndex )
raises( ::com::sun::星/主役にする::lang::IndexOutOfBoundsException );

Description
Copy the 明示するd text into the clipboard.

Copy the 明示するd text into the clipboard. The text that is copied is the same text that would have been selected by the XAccessibleText::getTextRange method.

The other clipboard 関係のある methods XAccessibleEditableText::cutText and XAccessibleEditableText::deleteText can be 設立する in the XAccessibleEditableText because of their destructive nature.

Parameter nStartIndex
Start 索引 of the text to copied into the clipboard. The valid 範囲 is 0..length.
Parameter nEndIndex
End 索引 of the text to copied into the clipboard. The valid 範囲 is 0..length.
Returns
Returns true if the 明示するd text has been copied 首尾よく into the clipboard.
Throws
::com::sun::星/主役にする::lang::IndexOutOfBoundsException if the indices are 無効の
最高の,を越す of Page

The ASF

Copyright & License | Privacy | 接触する Us | 寄付する | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are 登録(する)d trademarks of The Apache ソフトウェア 創立/基礎. The ASF logo is a trademark of The Apache ソフトウェア 創立/基礎. Other 指名するs appearing on the 場所/位置 may be trademarks of their 各々の owners.