Gwt-cellbrowser-widget
GWT-CellBrowserウィジェット
前書き
クラス宣言
以下は com.google.gwt.user.cellview.client.CellBrowser <T> クラスの宣言です-
クラスコンストラクター
Sr.No. | Constructor & Description |
---|---|
1 |
CellBrowser(TreeViewModel viewModel, T rootValue) 新しいCellBrowserを作成します。 |
2 |
CellBrowser(TreeViewModel viewModel, T rootValue, CellBrowser.Resources resources) 指定されたCellBrowser.Resourcesで新しいCellBrowserを構築します。 |
クラスメソッド
Sr.No. | Function name & Description |
---|---|
1 |
protected <C> Widget createPager(HasData<C> display) リストビューを制御するページャーを作成します。 |
2 |
int getDefaultColumnWidth() 新しい列のデフォルトの幅を取得します。 |
3 |
int getMinimumColumnWidth() 列の最小幅を取得します。 |
4 |
TreeNode getRootTreeNode() ルートTreeNodeを取得します。 |
5 |
boolean isAnimationEnabled() アニメーションが有効な場合はtrue、有効でない場合はfalseを返します。 |
6 |
void onBrowserEvent(Event event) ブラウザイベントが受信されるたびに発生します。 |
7 |
void onResize() このメソッドは、実装者のサイズが変更されるたびに呼び出す必要があります。 |
8 |
void setAnimationEnabled(boolean enable) アニメーションを有効または無効にします。 |
9 |
void setDefaultColumnWidth(int width) 新しい列のデフォルトの幅を設定します。 |
10 |
void set Keyboard Selection Policy (Has Keyboard Selection Policy.Keyboard Selection Policy policy) HasKeyboardSelectionPolicy.KeyboardSelectionPolicyを設定します。 |
11 |
void setMinimumColumnWidth(int minWidth) 列の最小幅を設定します。 |
継承されるメソッド
このクラスは、次のクラスからメソッドを継承します-
- com.google.gwt.user.client.ui.UIObject
- com.google.gwt.user.client.ui.Widget
- com.google.gwt.user.client.ui.Composite
- com.google.gwt.user.cellview.client.AbstractCellTree
- java.lang.Object
CellBrowserウィジェットの例
この例では、GWTでCellBrowserウィジェットの使用方法を示す簡単な手順を紹介します。 次の手順に従って、_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 の内容です。
CellBrowserウィジェットの使用方法を示すJavaファイル src/com.finddevguides/HelloWorld.java の内容を見てみましょう。
すべての変更が完了したら、link:/gwt/gwt_create_application [GWT-アプリケーションの作成]の章で行ったように、アプリケーションをコンパイルして開発モードで実行します。 すべてがあなたのアプリケーションでうまくいけば、これは次の結果を生成します-