Gwt-focuspanel-widget
GWT-FocusPanelウィジェット
前書き
クラス宣言
以下は com.google.gwt.user.client.ui.FocusPanel クラスの宣言です-
クラスコンストラクター
Sr.No. | Constructor & Description |
---|---|
1 |
FocusPanel() 空のフォーカスパネルを作成します。 |
2 |
FocusPanel(Widget child) 指定された子ウィジェットで新しいフォーカスパネルを作成します。 |
クラスメソッド
Sr.No. | Function name & Description |
---|---|
1 |
HandlerRegistration addBlurHandler(BlurHandler handler) BlurEventハンドラーを追加します。 |
2 |
HandlerRegistration addClickHandler(ClickHandler handler) ClickEventハンドラーを追加します。 |
3 |
void addClickListener(ClickListener listener) 廃止予定です。 代わりにaddClickHandler(com.google.gwt.event.dom.client.ClickHandler)を使用してください |
4 |
HandlerRegistration addDoubleClickHandler (DoubleClickHandler handler) DoubleClickEventハンドラーを追加します。 |
5 |
HandlerRegistration addFocusHandler(FocusHandler handler) FocusEventハンドラーを追加します。 |
6 |
void addFocusListener (FocusListener listener) 廃止予定です。 代わりにaddFocusHandler(com.google.gwt.event.dom.client.FocusHandler)を使用してください |
7 |
void addKeyboardListener (KeyboardListener listener) 廃止予定です。 addKeyDownHandler(com.google.gwt.event.dom.client.KeyDownHandler)、addKeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler)、addKeyPressHandler(com.google.gwt.event.dom.dom.client.KeyPressHandlerを使用します)代わりに |
8 |
HandlerRegistration addKeyDownHandler (KeyDownHandler handler) KeyDownEventハンドラーを追加します。 |
9 |
HandlerRegistration addKeyPressHandler (KeyPressHandler handler) KeyPressEventハンドラーを追加します。 |
10 |
HandlerRegistration addKeyUpHandler (KeyUpHandler handler) KeyUpEventハンドラーを追加します。 |
11 |
HandlerRegistration addMouseDownHandler (MouseDownHandler handler) MouseDownEventハンドラーを追加します。 |
12 |
void addMouseListener(MouseListener listener) 廃止予定です。 addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler)、addMouseMoveHandler(com.google.gwt.event.dom.client.MouseMoveHandler)、addMouseDownHandler(com.google.gwt.event.dom.client.MouseDownHandlerを使用します)、代わりにaddMouseUpHandler(com.google.gwt.event.dom.client.MouseUpHandler)およびaddMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler) |
13 |
HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler) MouseMoveEventハンドラーを追加します。 |
14 |
HandlerRegistration addMouseOutHandler(MouseOutHandler handler) MouseOutEventハンドラーを追加します。 |
15 |
HandlerRegistration addMouseOverHandler(MouseOverHandler handler) MouseOverEventハンドラーを追加します。 |
16 |
HandlerRegistration addMouseUpHandler(MouseUpHandler handler) MouseUpEventハンドラーを追加します。 |
17 |
HandlerRegistration addMouseWheelHandler(MouseWheelHandler handler) MouseWheelEventハンドラーを追加します。 |
18 |
void addMouseWheelListener(MouseWheelListener listener) 廃止予定です。 代わりにaddMouseWheelHandler(com.google.gwt.event.dom.client.MouseWheelHandler)を使用してください |
19 |
int getTabIndex() タブインデックス内のウィジェットの位置を取得します。 |
20 |
void removeClickListener(ClickListener listener) 廃止予定です。 代わりに、addClickHandler(com.google.gwt.event.dom.client.ClickHandler)によって返されたオブジェクトでHandlerRegistration.removeHandler()メソッドを使用します |
21 |
void removeFocusListener(FocusListener listener) 廃止予定です。 代わりに、addFocusHandler(com.google.gwt.event.dom.client.FocusHandler)によって返されたオブジェクトでHandlerRegistration.removeHandler()メソッドを使用します |
22 |
void removeKeyboardListener(KeyboardListener listener) 廃止予定です。 代わりに、add *Handlerメソッドによって返されたオブジェクトでHandlerRegistration.removeHandler()メソッドを使用します |
23 |
廃止予定です。 代わりに、add *Handlerメソッドによって返されたオブジェクトでHandlerRegistration.removeHandler()メソッドを使用します |
24 |
廃止予定です。 代わりに、addMouseWheelHandler(com.google.gwt.event.dom.client.MouseWheelHandler)によって返されたオブジェクトでHandlerRegistration.removeHandler()メソッドを使用します |
25 |
void setAccessKey(char key) ウィジェットの「アクセスキー」を設定します。 |
26 |
void setFocus(boolean focused) このウィジェットを明示的にフォーカス/フォーカス解除します。 |
27 |
void setTabIndex(int index) タブインデックスでのウィジェットの位置を設定します。 |
継承されるメソッド
このクラスは、次のクラスからメソッドを継承します-
- com.google.gwt.user.client.ui.UIObject
- com.google.gwt.user.client.ui.Widget
- com.google.gwt.user.client.ui.Panel
- com.google.gwt.user.client.ui.SimplePanel
- java.lang.Object
FocusPanelウィジェットの例
この例では、GWTでのFocusPanelウィジェットの使用方法を示す簡単な手順を紹介します。 次の手順に従って、_GWTで作成したGWTアプリケーションを更新します-アプリケーションの作成_の章-
Step | Description |
---|---|
1 | Create a project with a name HelloWorld under a package com.finddevguides as explained in the GWT - Create Application chapter. |
2 | Modify HelloWorld.gwt.xml, HelloWorld.css, HelloWorldl and HelloWorld.java as explained below. Keep rest of the files unchanged. |
3 | Compile and run the application to verify the result of the implemented logic. |
以下は、変更されたモジュール記述子 src/com.finddevguides/HelloWorld.gwt.xml の内容です。
以下は、変更されたスタイルシートファイル war/HelloWorld.css の内容です。
以下は、変更されたHTMLホストファイル war/HelloWorldl の内容です。
FocusPanelウィジェットの使用法を示すJavaファイル src/com.finddevguides/HelloWorld.java の内容を見てみましょう。
すべての変更が完了したら、link:/gwt/gwt_create_application [GWT-アプリケーションの作成]の章で行ったように、アプリケーションをコンパイルして開発モードで実行します。 すべてがあなたのアプリケーションでうまくいけば、これは次の結果を生成します-