Survei Riset: Ceritakan pengalaman Anda dengan Blockly
Mulai survei
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
blockly > IToolboxItem
Antarmuka untuk item di kotak alat.
Tanda Tangan:
export interface IToolboxItem extends IFocusableNode
Memperluas: IFocusableNode
Metode
Metode |
Deskripsi |
dispose() |
Buang item toolbox ini. Tanpa pengoperasian secara default. |
getClickTarget() |
Mendapatkan elemen HTML yang dapat diklik. |
getDiv() |
Mendapatkan div untuk item toolbox. |
getId() |
Mendapatkan ID unik untuk item toolbox ini. |
getParent() |
Mendapatkan induk jika item toolbox bertingkat. |
init() |
Melakukan inisialisasi item toolbox. Hal ini mencakup pembuatan DOM dan memperbarui status item apa pun berdasarkan objek info. |
isCollapsible() |
Apakah item toolbox dapat diciutkan. |
isSelectable() |
Apakah item toolbox dapat dipilih. |
setVisible_(isVisible) |
Menetapkan apakah kategori terlihat atau tidak. Agar kategori terlihat, kategori induknya juga harus diluaskan. |
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-05-16 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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"]]