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-07-25 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-25 UTC."],[],["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"],null,[]]