|
|||||
前のクラス 次のクラス | フレームあり フレームなし | ||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--java.awt.Component | +--LWTextComponent | +--ActiveClient
オンザスポットテキスト入力を実装します。インプットメソッドともっとも密接に統合された連携の方式です。このクラスは、Input Method Framework のアクティブクライアントです。つまり、Input Method Framework の API をアクティブに使って、統合を実現します。
このクラスは、Input Method Framework の 2 つのクライアントインタフェース InputMethodListener と InputMethodRequests を直接実装します。これは必須ではありません。特に、クラスライブラリの中など、インタフェースの公開性が重要である場合は、これら 2 つのインタフェースの実装を個別のクラスに隠した方がよい場合があります。
クラス java.awt.Component から継承したフィールド |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
コンストラクタの概要 | |
ActiveClient(String name)
ActiveClient を生成します。 |
メソッドの概要 | |
AttributedCharacterIterator |
cancelLatestCommittedText(AttributedCharacterIterator.Attribute[] attributes)
この単純なテキストコンポーネントでは、「確定取り消し」機能がサポートされていないことを示す null を返します。 |
void |
caretPositionChanged(InputMethodEvent event)
変換テキスト内のキャレットに対する変更を処理します。 |
TextHitInfo |
getCaret()
現在のキャレット (挿入ポイント) を示すテキストヒット情報を返します。 |
AttributedCharacterIterator |
getCommittedText(int beginIndex,
int endIndex,
AttributedCharacterIterator.Attribute[] attributes)
未確定テキスト以外の、テキスト編集コンポーネントに含まれるテキストおよび属性の全体に、アクセスする反復子を取得します。 |
AttributedCharacterIterator |
getDisplayText()
ユーザが入力したテキストを返します。 |
InputMethodRequests |
getInputMethodRequests()
this を返すことで、ActiveClient の getInputMethodRequests を実装します。 |
int |
getInsertPositionOffset()
テキスト編集コンポーネントに含まれる確定テキスト内の挿入位置のオフセットを取得します。 |
TextHitInfo |
getLocationOffset(int x,
int y)
指定された画面上の絶対座標 x と y とに対応する変換テキスト内のオフセットを取得します。 |
AttributedCharacterIterator |
getSelectedText(AttributedCharacterIterator.Attribute[] attributes)
テキスト編集コンポーネントから、現在選択されているテキストを取得します。 |
Rectangle |
getTextLocation(TextHitInfo offset)
現在の変換テキスト内の指定されたオフセットの場所、または確定テキスト内の選択部分の場所を取得します。 |
void |
inputMethodTextChanged(InputMethodEvent event)
インプットメソッドを使って入力されたテキストへの変更を処理します。 |
クラス java.lang.Object から継承したメソッド |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
コンストラクタの詳細 |
public ActiveClient(String name)
name
- テキストの上部に表示されるコンポーネント名メソッドの詳細 |
public InputMethodRequests getInputMethodRequests()
public AttributedCharacterIterator getDisplayText()
public TextHitInfo getCaret()
public void inputMethodTextChanged(InputMethodEvent event)
この単純なコンポーネントでは、インプットメソッドの強調表示属性だけが保持されます。より高機能のコンポーネントでは、言語、読み、インプットメソッドセグメントなど、ほかの属性も保持しなければならない場合があります。
public void caretPositionChanged(InputMethodEvent event)
public Rectangle getTextLocation(TextHitInfo offset)
public TextHitInfo getLocationOffset(int x, int y)
public int getInsertPositionOffset()
public AttributedCharacterIterator getCommittedText(int beginIndex, int endIndex, AttributedCharacterIterator.Attribute[] attributes)
public AttributedCharacterIterator cancelLatestCommittedText(AttributedCharacterIterator.Attribute[] attributes)
public AttributedCharacterIterator getSelectedText(AttributedCharacterIterator.Attribute[] attributes)
|
|||||
前のクラス 次のクラス | フレームあり フレームなし | ||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |