ui.Panel.clear
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Usuwa wszystkie widżety z panelu.
Zwraca ten panel.
Wykorzystanie | Zwroty |
---|
Panel.clear() | ui.Panel |
Argument | Typ | Szczegóły |
---|
to: ui.panel | ui.Panel | Instancja ui.Panel. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003ePanel.clear()\u003c/code\u003e removes all widgets from the specified panel.\u003c/p\u003e\n"],["\u003cp\u003eThis method returns the ui.Panel object, allowing for method chaining.\u003c/p\u003e\n"],["\u003cp\u003eIt is used to reset the panel to its initial state, effectively removing existing UI elements.\u003c/p\u003e\n"]]],["The `Panel.clear()` method removes all widgets from a specified `ui.Panel` instance. This method directly modifies the panel by clearing its content. It takes a `ui.Panel` instance as input and returns the same `ui.Panel` object after the widgets have been removed. No arguments beside the panel itself are required. This method's primary action is to empty the panel of all widgets.\n"],null,["# ui.Panel.clear\n\n\u003cbr /\u003e\n\nRemoves all widgets from the panel.\n\n\u003cbr /\u003e\n\nReturns this panel.\n\n| Usage | Returns |\n|-----------------|----------|\n| Panel.clear`()` | ui.Panel |\n\n| Argument | Type | Details |\n|------------------|----------|------------------------|\n| this: `ui.panel` | ui.Panel | The ui.Panel instance. |"]]