סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
blockly > IToolboxItem
ממשק של פריט בכלי.
Signature:
export interface IToolboxItem extends IFocusableNode
ממשיכה: IFocusableNode
Methods
שיטה |
תיאור |
dispose() |
יש להשליך את הפריט הזה לכלי. פעולה ללא תוצאה כברירת מחדל. |
getClickTarget() |
הפונקציה מקבלת את אלמנט ה-HTML שניתן ללחוץ עליו. |
getDiv() |
הפונקציה מקבלת את ה-div של פריט תיבת הכלים. |
getId() |
הפונקציה מקבלת מזהה ייחודי של פריט תיבת הכלים הזה. |
getParent() |
הפונקציה מקבלת את ההורה אם פריט תיבת הכלים נמצא בתצוגת עץ. |
init() |
אתחול הפריט בכלי. זה כולל יצירת DOM ועדכון המצב של פריטים על סמך אובייקט המידע. |
isCollapsible() |
האם אפשר לכווץ את הפריט בתיבה. |
isSelectable() |
אם אפשר לבחור את הפריט בכלי. |
setVisible_(isVisible) |
הגדרה של סטטוס החשיפה של הקטגוריה. כדי שקטגוריה תהיה גלויה, צריך להרחיב גם את קטגוריית ההורה שלה. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-05-16 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-05-16 (שעון UTC)."],[[["The `IToolboxItem` interface defines the structure and behavior of items within the Blockly toolbox."],["It provides methods for managing an item's lifecycle, including initialization, disposal, and interaction."],["Toolbox items can be clickable, have a visual representation (div), and may be nested within other items."],["Properties like visibility, selectability, and collapsibility are also managed through this interface."],["Each toolbox item has a unique identifier for easy reference and manipulation."]]],["The `IToolboxItem` interface defines the structure for items within a toolbox. Key methods include `dispose()` for cleanup, `getClickTarget()` and `getDiv()` to access the item's HTML, and `getId()` to retrieve its unique identifier. `getParent()` identifies nested items. `init()` initializes the item, `isCollapsible()` and `isSelectable()` determine item behavior. Finally, `setVisible_()` controls the visibility of the item. Each of the methods has a corresponding description.\n"]]