Bản khảo sát nghiên cứu: Cho chúng tôi biết trải nghiệm của bạn khi sử dụng Blockly
Bắt đầu khảo sát
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
blockly > ISelectable
Giao diện ISelectable
Giao diện cho một đối tượng có thể chọn.
Các phương thức triển khai thường được dự kiến sẽ sử dụng các phương thức triển khai onNodeFocus() và onNodeBlur() để gọi setSelected() với chính các phương thức đó và giá trị rỗng, tương ứng, để đảm bảo rằng các lựa chọn được cập nhật chính xác và sự kiện thay đổi lựa chọn được kích hoạt.
Chữ ký:
export interface ISelectable extends IFocusableNode
Mở rộng: IFocusableNode
Thuộc tính
Phương thức
Phương thức |
Mô tả |
select() |
Chọn mục này. Đánh dấu bằng hình ảnh. |
unselect() |
Bỏ chọn mục này. Bỏ đánh dấu bằng hình ảnh. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-25 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"]]