Interface Border

All Superinterfaces:
BorderRO
All Known Subinterfaces:
Proxy.Border

public interface Border extends BorderRO
Border to parent node: node.style.border - read-write.
Since:
1.11.8

Examples:


 //imports are needed for example node 'A --------------- A'
 import org.freeplane.api.Quantity
 import org.freeplane.api.LengthUnit


 node.createChild('A --------------- A').style.border.with{
     // defining border width using Quantity and LengthUnit
     width = Quantity.fromString('6', LengthUnit.px)
     usesEdgeWidth = false
     usesEdgeDash = false
     dash = 'DASHES'
     usesEdgeColor = false
     colorCode = '#cc00ff'
 }

 node.createChild('B --------------- B').style.border.with{
     //width defined directly in px
     width = 4
     usesEdgeWidth = false
     usesEdgeDash = true
     dash = 'DISTANT_DOTS'
     usesEdgeColor = false
     colorCode = '#00ffcc'
 }

 node.createChild('C --------------- C').style.border.with{
     //using a string to define width's value and unit
     width = '2 mm'
     usesEdgeWidth = false
     usesEdgeDash = false
     dash = 'DOTS_AND_DASHES'
     usesEdgeColor = true
     colorCode = '#ffcc00'
 }

 
  • Method Details

    • setColor

      void setColor(Color color)
    • setColorCode

      void setColorCode(String rgbString)
    • setWidth

      void setWidth(Quantity<LengthUnit> borderWidth)
    • setWidth

      void setWidth(Integer borderWidth)
      sets the border's width in pixels
    • setWidth

      void setWidth(String borderWidth)
      sets the border's width using a string to define its value and LengthUnit
      Parameters:
      borderWidth - string with format "number unit"
      examples: "2 px", "3.2 mm"
      example to get all possible units:
      node.createChild( org.freeplane.api.LengthUnit.values().join(', ') )
    • setDash

      void setDash(Dash dash)
      Parameters:
      dash - any of these: 'SOLID', 'CLOSE_DOTS', 'DASHES', 'DISTANT_DOTS', 'DOTS_AND_DASHES'
      example to get all possible line types:
      node.createChild( org.freeplane.api.Dash.values().join(', ') )
    • setUsesEdgeColor

      void setUsesEdgeColor(Boolean borderColorMatchesEdgeColor)
    • setUsesEdgeWidth

      void setUsesEdgeWidth(Boolean borderColorMatchesEdgeColor)
    • setUsesEdgeDash

      void setUsesEdgeDash(Boolean borderColorMatchesEdgeColor)