お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、Earth Engine へのアクセスを維持するために
非商用目的での利用資格を確認する必要があります。
ui.Textbox.onChange
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
テキスト ボックス内のテキストが変更されたときに呼び出されるコールバックを登録します。
具体的には、次の場合にコールバックが呼び出されます。
- ユーザーが新しい値を入力し、テキスト ボックスのフォーカスが外れるか、ユーザーが Enter キーを押します。
- set('value', newValue) を使用して、新しい値がプログラムで設定されます。
コールバックの登録を解除するために unlisten() に渡すことができる ID を返します。
用途 | 戻り値 |
---|
Textbox.onChange(callback) | 文字列 |
引数 | タイプ | 詳細 |
---|
これ: ui.textbox | ui.Textbox | ui.Textbox インスタンス。 |
callback | 関数 | テキストが変更されたときに起動するコールバック。コールバックには、テキスト ボックス内の現在のテキストとテキスト ボックス ウィジェットが渡されます。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eTriggers a function when the textbox content is modified, either by user input or programmatically.\u003c/p\u003e\n"],["\u003cp\u003eThe registered function receives the current text and the textbox widget as arguments.\u003c/p\u003e\n"],["\u003cp\u003eProvides a method to unregister the function using a unique ID returned during registration.\u003c/p\u003e\n"],["\u003cp\u003eText change is triggered by user input (typing followed by focus loss or pressing Enter), or by programmatically setting a new value.\u003c/p\u003e\n"]]],[],null,["# ui.Textbox.onChange\n\n\u003cbr /\u003e\n\nRegisters a callback that's called when text in the textbox changes.\n\n\u003cbr /\u003e\n\nIn particular, the callback is called when:\n\n- The user types a new value and then either the textbox loses focus or the user presses enter.\n\n- A new value is set programmatically with set('value', newValue).\n\nReturns an ID which can be passed to unlisten() to unregister the callback.\n\n| Usage | Returns |\n|------------------------------|---------|\n| Textbox.onChange`(callback)` | String |\n\n| Argument | Type | Details |\n|--------------------|------------|------------------------------------------------------------------------------------------------------------------------------|\n| this: `ui.textbox` | ui.Textbox | The ui.Textbox instance. |\n| `callback` | Function | The callback to fire when the text changes. The callback is passed the text currently in the textbox and the textbox widget. |"]]