Package org.freeplane.api
Interface Border
- All Superinterfaces:
BorderRO
- All Known Subinterfaces:
Proxy.Border
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 Summary
Modifier and TypeMethodDescriptionvoidvoidsetColorCode(String rgbString) voidvoidsetUsesEdgeColor(Boolean borderColorMatchesEdgeColor) voidsetUsesEdgeDash(Boolean borderColorMatchesEdgeColor) voidsetUsesEdgeWidth(Boolean borderColorMatchesEdgeColor) voidsets the border's width in pixelsvoidsets the border's width using a string to define its value and LengthUnitvoidsetWidth(Quantity<LengthUnit> borderWidth) Methods inherited from interface org.freeplane.api.BorderRO
getColor, getColorCode, getDash, getUsesEdgeColor, getUsesEdgeDash, getUsesEdgeWidth, getWidth, isColorSet, isDashSet, isUsesEdgeColorSet, isUsesEdgeDashSet, isUsesEdgeWidthSet, isWidthSet
-
Method Details
-
setColor
-
setColorCode
-
setWidth
-
setWidth
sets the border's width in pixels -
setWidth
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
- 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
-
setUsesEdgeWidth
-
setUsesEdgeDash
-