Stay organized with collections
Save and categorize content based on your preferences.
blockly > ISelectable
ISelectable interface
The interface for an object that is selectable.
Implementations are generally expected to use their implementations of onNodeFocus() and onNodeBlur() to call setSelected() with themselves and null, respectively, in order to ensure that selections are correctly updated and the selection change event is fired.
Signature:
export interface ISelectable extends IFocusableNode
Extends: IFocusableNode
Properties
Methods
Method |
Description |
select() |
Select this. Highlight it visually. |
unselect() |
Unselect this. Unhighlight it visually. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-16 UTC.
[null,null,["Last updated 2025-05-16 UTC."],[],["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"],null,[]]