Survei Riset: Ceritakan pengalaman Anda dengan Blockly
Mulai survei
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
blockly > ISelectable
Antarmuka ISelectable
Antarmuka untuk objek yang dapat dipilih.
Implementasi umumnya diharapkan menggunakan implementasi onNodeFocus() dan onNodeBlur() untuk memanggil setSelected() dengan dirinya sendiri dan null, untuk memastikan bahwa pilihan diperbarui dengan benar dan peristiwa perubahan pilihan diaktifkan.
Tanda Tangan:
export interface ISelectable extends IFocusableNode
Memperluas: IFocusableNode
Properti
Metode
Metode |
Deskripsi |
select() |
Pilih opsi ini. Tandai secara visual. |
unselect() |
Batalkan pilihan ini. Hapus sorotan secara visual. |
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 ISelectable interface defines objects that can be selected and unselected within a Blockly workspace."],["It includes properties for the object's ID and its associated workspace."],["Objects implementing this interface have methods for visual selection and deselection."]]],["The `ISelectable` interface defines objects that can be selected within a workspace. It mandates the presence of an `id` (string) and a `workspace` property of `Workspace` type. Key actions include `select()`, which visually highlights the object, and `unselect()`, which removes the visual highlight. These methods control the visual state of the selectable object within its designated workspace.\n"]]