Class BorderStyle
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
BorderStyle
מחלקה שמייצגת סגנון גבול מלא שאפשר להחיל על ווידג'טים.
כדי לקרוא למאפיין enum, צריך לקרוא לכיתה ההורה, לשם ולנכס שלו. לדוגמה,
CardService.BorderStyle.NO_BORDER
.
מסמכים מפורטים
setCornerRadius(radius)
הגדרת רדיוס הפינה של הגבול, לדוגמה 8.
פרמטרים
שם | סוג | תיאור |
radius | Integer | רדיוס הפינה שיחול על הגבול. |
חזרה
BorderStyle
– האובייקט הזה, לצורך קישור.
setStrokeColor(color)
הגדרת הצבע של הגבול.
פרמטרים
שם | סוג | תיאור |
color | String | הצבע בפורמט #RGB שיחול על הגבול. |
חזרה
BorderStyle
– האובייקט הזה, לצורך קישור.
setType(type)
הגדרת סוג הגבול.
פרמטרים
חזרה
BorderStyle
– האובייקט הזה, לצורך קישור.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003e\u003ccode\u003eBorderStyle\u003c/code\u003e objects define the style of borders applied to widgets, including corner radius, color, and type.\u003c/p\u003e\n"],["\u003cp\u003eYou can customize border styles using methods like \u003ccode\u003esetCornerRadius()\u003c/code\u003e, \u003ccode\u003esetStrokeColor()\u003c/code\u003e, and \u003ccode\u003esetType()\u003c/code\u003e, which allow you to specify the desired attributes.\u003c/p\u003e\n"],["\u003cp\u003eEach customization method returns the \u003ccode\u003eBorderStyle\u003c/code\u003e object, enabling chained method calls for efficient styling.\u003c/p\u003e\n"],["\u003cp\u003eBorder attributes such as corner radius and stroke color are specified using integers and RGB color strings respectively, providing flexibility in design.\u003c/p\u003e\n"],["\u003cp\u003eBorder types are selected from the \u003ccode\u003eBorderType\u003c/code\u003e enum, which offers predefined border styles for easy implementation.\u003c/p\u003e\n"]]],[],null,["# Class BorderStyle\n\nBorderStyle\n\nA class that represents a complete border style that can be applied to widgets.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.BorderStyle.NO_BORDER`. \n\n### Methods\n\n| Method | Return type | Brief description |\n|------------------------------------------------------|------------------|------------------------------------------------------|\n| [setCornerRadius(radius)](#setCornerRadius(Integer)) | [BorderStyle](#) | Sets the corner radius of the border, for example 8. |\n| [setStrokeColor(color)](#setStrokeColor(String)) | [BorderStyle](#) | Sets the color of the border. |\n| [setType(type)](#setType(BorderType)) | [BorderStyle](#) | Sets the type of the border. |\n\nDetailed documentation\n----------------------\n\n### `set``Corner``Radius(radius)`\n\nSets the corner radius of the border, for example 8.\n\n#### Parameters\n\n| Name | Type | Description |\n|----------|-----------|------------------------------------------------|\n| `radius` | `Integer` | The corner radius to be applied to the border. |\n\n#### Return\n\n\n[BorderStyle](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `set``Stroke``Color(color)`\n\nSets the color of the border.\n\n#### Parameters\n\n| Name | Type | Description |\n|---------|----------|-------------------------------------------------------|\n| `color` | `String` | The color in #RGB format to be applied to the border. |\n\n#### Return\n\n\n[BorderStyle](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `set``Type(type)`\n\nSets the type of the border.\n\n#### Parameters\n\n| Name | Type | Description |\n|--------|---------------------------------------------------------------|------------------|\n| `type` | [BorderType](/apps-script/reference/card-service/border-type) | The border type. |\n\n#### Return\n\n\n[BorderStyle](#) --- This object, for chaining."]]