Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
blockly > IToolboxItem
Interfejs elementu w skrzynce z narzędziami.
Podpis:
export interface IToolboxItem extends IFocusableNode
Rozszerza: IFocusableNode
Metody
Metoda |
Opis |
dispose() |
Wyrzuć ten element z skrzynki narzędzi. Domyślnie nieaktywna. |
getClickTarget() |
Pobiera element HTML, który można kliknąć. |
getDiv() |
Pobiera element div dla elementu Toolbox. |
getId() |
Pobiera unikalny identyfikator tego elementu w skrzynce narzędzi. |
getParent() |
Pobiera element nadrzędny, jeśli element toolboxa jest zagnieżdżony. |
init() |
Inicjuje element narzędzia. Obejmuje to tworzenie DOM-u i aktualizowanie stanu wszystkich elementów na podstawie obiektu informacji. |
isCollapsible() |
Określa, czy element skrzynki narzędzi jest zwijany. |
isSelectable() |
Określa, czy element w skrzynce narzędzi jest możliwy do wybrania. |
setVisible_(isVisible) |
Określa, czy kategoria ma być widoczna. Aby kategoria była widoczna, musisz również rozwinąć jej kategorię nadrzędną. |
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-05-16 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-05-16 UTC."],[[["The `IToolboxItem` interface defines the structure and behavior of items within the Blockly toolbox."],["It provides methods for managing an item's lifecycle, including initialization, disposal, and interaction."],["Toolbox items can be clickable, have a visual representation (div), and may be nested within other items."],["Properties like visibility, selectability, and collapsibility are also managed through this interface."],["Each toolbox item has a unique identifier for easy reference and manipulation."]]],["The `IToolboxItem` interface defines the structure for items within a toolbox. Key methods include `dispose()` for cleanup, `getClickTarget()` and `getDiv()` to access the item's HTML, and `getId()` to retrieve its unique identifier. `getParent()` identifies nested items. `init()` initializes the item, `isCollapsible()` and `isSelectable()` determine item behavior. Finally, `setVisible_()` controls the visibility of the item. Each of the methods has a corresponding description.\n"]]