Class ToolboxItem
Class untuk item di toolbox.
Tanda Tangan:
export declare class ToolboxItem implements IToolboxItem
Mengimplementasikan: IToolboxItem
Konstruktor
| Konstruktor | Pengubah | Deskripsi |
|---|---|---|
| (constructor)(toolboxItemDef, parentToolbox, opt_parent) | Membuat instance baru class ToolboxItem |
Properti
| Properti | Pengubah | Jenis | Deskripsi |
|---|---|---|---|
| id_ | protected |
string | |
| level_ | protected |
angka | |
| parent_ | protected |
ICollapsibleToolboxItem | null | |
| parentToolbox_ |
|
IToolbox | Toolbox tempat kategori ini berada. |
| toolboxItemDef_ | protected |
toolbox.ToolboxItemInfo | null | |
| workspace_ | protected |
WorkspaceSvg |
Metode
| Metode | Pengubah | Deskripsi |
|---|---|---|
| canBeFocused() | Lihat IFocusableNode.canBeFocused. | |
| dispose() | Buang item toolbox ini. Tanpa pengoperasian secara default. | |
| getClickTarget() | Mendapatkan elemen HTML yang dapat diklik. Elemen toolbox induk menerima klik. Toolbox induk akan menambahkan ID ke elemen ini sehingga dapat meneruskan peristiwa onClick ke toolboxItem yang benar. | |
| getDiv() | Mendapatkan div untuk item toolbox. | |
| getFocusableElement() | Lihat IFocusableNode.getFocusableElement. | |
| getFocusableTree() | Lihat IFocusableNode.getFocusableTree. | |
| 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. | |
| onNodeBlur() | Lihat IFocusableNode.onNodeBlur. | |
| onNodeFocus() | Lihat IFocusableNode.onNodeFocus. | |
| setVisible_(_isVisible) | Menetapkan apakah kategori terlihat atau tidak. Agar kategori terlihat, kategori induknya juga harus diluaskan. |