Class BorderStyle
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
BorderStyle
Una classe che rappresenta uno stile di bordo completo che può essere applicato ai widget.
Per chiamare un enum, devi chiamare la relativa classe, il nome e la proprietà di base. Ad esempio,
CardService.BorderStyle.NO_BORDER
.
Documentazione dettagliata
setCornerRadius(radius)
Imposta il raggio dell'angolo del bordo, ad esempio 8.
Parametri
Nome | Tipo | Descrizione |
radius | Integer | Il raggio del bordo da applicare al bordo. |
Invio
BorderStyle
: questo oggetto, per l'accodamento.
setStrokeColor(color)
Imposta il colore del bordo.
Parametri
Nome | Tipo | Descrizione |
color | String | Il colore in formato #RGB da applicare al bordo. |
Invio
BorderStyle
: questo oggetto, per l'accodamento.
setType(type)
Imposta il tipo di bordo.
Parametri
Nome | Tipo | Descrizione |
type | BorderType | Il tipo di bordo. |
Invio
BorderStyle
: questo oggetto, per l'accodamento.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-26 UTC.
[null,null,["Ultimo aggiornamento 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."]]