Gwt-flextable-widget
GWT-FlexTableウィジェット
前書き
クラス宣言
以下は、 com.google.gwt.user.client.ui.FlowPanel クラスの宣言です-
クラスコンストラクター
Sr.No. | Constructor & Description |
---|---|
1 |
FlexTable() 空のFlexテーブルのコンストラクター。 |
クラスメソッド
Sr.No. | Function name & Description |
---|---|
1 |
void addCell(int row) 指定した行にセルを追加します。 |
2 |
int getCellCount(int row) 特定の行のセルの数を取得します。 |
3 |
FlexTable.FlexCellFormatter getFlexCellFormatter() FlexTable.FlexCellFormatterを明示的に取得します。 |
4 |
int getRowCount() 行数を取得します。 |
5 |
void insertCell(int beforeRow, int beforeColumn) セルをFlexTableに挿入します。 |
6 |
int insertRow(int beforeRow) FlexTableに行を挿入します。 |
7 |
protected void prepareCell(int row, int column) セルが存在することを確認してください。 |
8 |
protected void prepareRow(int row) 行が存在することを確認してください。 |
9 |
void removeAllRows() このテーブルのすべての行を削除します。 |
10 |
void removeCell(int row, int col) 指定されたセルをテーブルから削除します。 |
11 |
void removeCells(int row, int column, int num) テーブルの行から多数のセルを削除します。 |
12 |
void removeRow(int row) 指定された行をテーブルから削除します。 |
継承されるメソッド
このクラスは、次のクラスからメソッドを継承します-
- 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.HTMLTable
- java.lang.Object
FlexTableウィジェットの例
この例では、GWTでのFlexTableウィジェットの使用法を示す簡単な手順を紹介します。 次の手順に従って、_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 の内容です。
FlexTableウィジェットの使用方法を示すJavaファイル src/com.finddevguides/HelloWorld.java の内容を見てみましょう。
すべての変更が完了したら、link:/gwt/gwt_create_application [GWT-アプリケーションの作成]の章で行ったように、アプリケーションをコンパイルして開発モードで実行します。 すべてがあなたのアプリケーションでうまくいけば、これは次の結果を生成します-