封鎖 >工具箱 >shouldSelectItem_
決定是否應選取新項目。
Signature:
protected shouldSelectItem_(oldItem: ISelectableToolboxItem | null, newItem: ISelectableToolboxItem | null): boolean;
參數
傳回:
布林值
如果應選取新項目,則為「true」,否則傳回「false」。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-08-22 (世界標準時間)。
[null,null,["上次更新時間:2024-08-22 (世界標準時間)。"],[[["The `Toolbox.shouldSelectItem_()` method determines if a newly selected toolbox item should be selected or not."],["It takes the previously and newly selected items as input, both of type `ISelectableToolboxItem` or null."],["The method returns `true` if the new item should be selected, and `false` otherwise, controlling selection behavior within the toolbox."]]],[]]