|
Java プラットフォーム 1.2 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--java.awt.dnd.DragGestureRecognizer
DragGestureRecognizer は、プラットフォーム依存のドラッグ&ドロップアクション開始ジェスチャーを識別するために、特定の Component に関連付けることができる、プラットフォーム依存のリスナーを指定するための抽象基底クラスです。
適切な DragGestureRecognizer のサブクラスは、特定の Component に関連付けられている DragSource、または createDragGestureRecognizer() メソッドを介して Toolkit オブジェクトから取得されます。
特定の Component に関連付けられると、DragGestureRecognizer は Component に送られる入力イベントを追跡するためにその Component で適切な Listener インタフェースを登録します。
Component でイベントのシーケンスをドラッグ&ドロップアクション開始ジェスチャーとして識別すると、DragGestureRecognizer は gestureRecognized() メソッドを呼び出してそのユニキャスト DragGestureListener に通知します。
DragGestureListener
,
DragGestureEvent
,
DragSource
フィールドの概要 | |
protected Component |
component
|
protected DragGestureListener |
dragGestureListener
|
protected DragSource |
dragSource
|
protected ArrayList |
events
|
protected int |
sourceActions
|
コンストラクタの概要 | |
protected |
DragGestureRecognizer(DragSource ds)
新しい DragGestureRecognizer を構築します。 |
protected |
DragGestureRecognizer(DragSource ds,
Component c)
新しい DragGestureRecognizer を構築します。 |
protected |
DragGestureRecognizer(DragSource ds,
Component c,
int sa)
新しい DragGestureRecognizer を構築します。 |
protected |
DragGestureRecognizer(DragSource ds,
Component c,
int sa,
DragGestureListener dgl)
新しい DragGestureRecognizer を構築します。 |
メソッドの概要 | |
void |
addDragGestureListener(DragGestureListener dgl)
新しい DragGestureListener を登録します。 |
protected void |
appendEvent(InputEvent awtie)
このレコグナイザによって Component で登録されたリスナーは、この API を介して、ドラッグ&ドロップ開始ジェスチャーを構成する一連のイベントの一部として認識されるすべてのイベントを記録します。 |
protected void |
fireDragGestureRecognized(int dragAction,
Point p)
ドラッグ&ドロップ開始ジェスチャーが発生したことを DragGestureListener に通知します。 |
Component |
getComponent()
|
DragSource |
getDragSource()
|
int |
getSourceActions()
|
InputEvent |
getTriggerEvent()
|
protected abstract void |
registerListeners()
Component にこの DragGestureRecognizer の Listener を登録します。 |
void |
removeDragGestureListener(DragGestureListener dgl)
現在の DragGestureListener の登録を解除します。 |
void |
resetRecognizer()
Recognizer を取り消します。 |
void |
setComponent(Component c)
DragGestureRecognizer に関連付けられる Component を設定します。 |
void |
setSourceActions(int actions)
許可されるソースドラッグアクションを設定します。 |
protected abstract void |
unregisterListeners()
Component でこの DragGestureRecognizer の Listener の登録を解除します。 |
クラス java.lang.Object から継承したメソッド |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
フィールドの詳細 |
protected DragSource dragSource
protected Component component
protected DragGestureListener dragGestureListener
protected int sourceActions
protected ArrayList events
コンストラクタの詳細 |
protected DragGestureRecognizer(DragSource ds, Component c, int sa, DragGestureListener dgl)
ds
- Component c の DragSourcec
- 監視される Componentsa
- ソースドラッグアクションdgl
- ジェスチャーが検出されたときに通知する DragGestureRecognizerprotected DragGestureRecognizer(DragSource ds, Component c, int sa)
ds
- Component c の DragSourcesa
- ソースドラッグアクションc
- 監視される Componentprotected DragGestureRecognizer(DragSource ds, Component c)
ds
- Component c の DragSourcec
- 監視される Componentprotected DragGestureRecognizer(DragSource ds)
ds
- Component c の DragSourceメソッドの詳細 |
protected abstract void registerListeners()
protected abstract void unregisterListeners()
public DragSource getDragSource()
public Component getComponent()
public void setComponent(Component c)
c
- Component または nullpublic int getSourceActions()
public void setSourceActions(int actions)
public InputEvent getTriggerEvent()
public void resetRecognizer()
public void addDragGestureListener(DragGestureListener dgl) throws TooManyListenersException
public void removeDragGestureListener(DragGestureListener dgl)
protected void fireDragGestureRecognized(int dragAction, Point p)
dragAction
- ユーザジェスチャーが最初に選択したアクションp
- ジェスチャーが発生したポイント (Component の座標)protected void appendEvent(InputEvent awtie)
|
Java プラットフォーム 1.2 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |