Class Border

  • The Border class describes the border around an element.

  • Methods are available to get and set the dash style, line fill, and weight of the border, as well as check its visibility and set it to transparent.

Border

Describes the border around an element.

Methods

MethodReturn typeBrief description
getDashStyle()DashStyle|nullGets theDashStyle of the border.
getLineFill()LineFillGets theLineFill of the border.
getWeight()Number|nullGets the thickness of the border in points.
isVisible()BooleanGets whether the border is visible or not.
setDashStyle(style)BorderSets theDashStyle of the border.
setTransparent()BorderSets the border to be transparent.
setWeight(points)BorderSets the thickness of the border in points.

Detailed documentation

getDashStyle()

Gets theDashStyle of the border.

Return

DashStyle|null

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getLineFill()

Gets theLineFill of the border.

Return

LineFill

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getWeight()

Gets the thickness of the border in points. Returnsnull if the element does not have aborder.

Return

Number|null

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

isVisible()

Gets whether the border is visible or not.

Return

Boolean

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

setDashStyle(style)

Sets theDashStyle of the border.

Setting aDashStyle on a transparent border makes it visible.

Parameters

NameTypeDescription
styleDashStyle

Return

Border

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

setTransparent()

Sets the border to be transparent.

Return

Border

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

setWeight(points)

Sets the thickness of the border in points.

Setting a weight on a transparent border makes it visible.

Parameters

NameTypeDescription
pointsNumber

Return

Border

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.