Pengumuman: Semua project nonkomersial yang terdaftar untuk menggunakan Earth Engine sebelum
15 April 2025 harus
memverifikasi kelayakan nonkomersial untuk mempertahankan akses Earth Engine.
ui.Panel.Layout.flow
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Menampilkan tata letak yang menempatkan widgetnya dalam alur, baik horizontal maupun vertikal.
Secara default, widget menempati ruang alaminya dalam panel tata letak alur. Tetapkan properti gaya "stretch" pada widget yang ditambahkan untuk meregangkannya agar mengisi ruang yang tersedia ke arah yang relevan:
- horizontal, vertikal, keduanya
Saat beberapa widget diregangkan, ruang yang tersedia dibagi secara merata di antara widget tersebut. Panel adalah widget itu sendiri dan dapat diregangkan dengan menentukan properti gaya "stretch".
Penggunaan | Hasil |
---|
ui.Panel.Layout.flow(direction, wrap) | ui.Panel.Layout |
Argumen | Jenis | Detail |
---|
direction | String, opsional | Arah alur. Salah satu dari
'horizontal' atau 'vertical'. Nilai defaultnya adalah 'vertical'. |
wrap | Boolean, opsional | Apakah akan membungkus turunan dalam tata letak jika terlalu banyak untuk ditampilkan dalam satu baris. Nilai defaultnya adalah false (salah). |
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-26 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eui.Panel.Layout.flow()\u003c/code\u003e function arranges widgets within a panel in either a horizontal or vertical flow.\u003c/p\u003e\n"],["\u003cp\u003eWidgets naturally occupy their required space but can be stretched to fill available space using the "stretch" style property.\u003c/p\u003e\n"],["\u003cp\u003eWhen multiple widgets have the "stretch" property, the available space is divided equally among them, including panels which are also widgets.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eflow\u003c/code\u003e layout can be customized using the \u003ccode\u003edirection\u003c/code\u003e argument for flow orientation (horizontal or vertical) and the \u003ccode\u003ewrap\u003c/code\u003e argument to control wrapping of overflowing widgets.\u003c/p\u003e\n"]]],[],null,["# ui.Panel.Layout.flow\n\n\u003cbr /\u003e\n\nReturns a layout that places its widgets in a flow, either horizontal or vertical.\n\n\u003cbr /\u003e\n\nBy default, widgets take up their natural space within a flow layout panel. Set the \"stretch\" style property on an added widget to stretch it to fill available space in the relevant direction:\n\n- horizontal, vertical, both\n\nWhen multiple widgets are stretched, the available space is split equally among them. Panels are widgets themselves and can be stretched by specifying a \"stretch\" style property.\n\n| Usage | Returns |\n|--------------------------------------------------|-----------------|\n| `ui.Panel.Layout.flow(`*direction* `, `*wrap*`)` | ui.Panel.Layout |\n\n| Argument | Type | Details |\n|-------------|-------------------|------------------------------------------------------------------------------------------------------|\n| `direction` | String, optional | The direction of the flow. One of 'horizontal' or 'vertical'. Defaults to 'vertical'. |\n| `wrap` | Boolean, optional | Whether to wrap children in the layout if there are too many to show in one line. Defaults to false. |"]]