Package org.freeplane.api
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 Summary
Modifier and Type Method Description voidsetColor(java.awt.Color color)voidsetColorCode(java.lang.String rgbString)voidsetDash(Dash dash)voidsetUsesEdgeColor(java.lang.Boolean borderColorMatchesEdgeColor)voidsetUsesEdgeDash(java.lang.Boolean borderColorMatchesEdgeColor)voidsetUsesEdgeWidth(java.lang.Boolean borderColorMatchesEdgeColor)voidsetWidth(java.lang.Integer borderWidth)sets the border's width in pixelsvoidsetWidth(java.lang.String borderWidth)sets 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
void setColor(java.awt.Color color) -
setColorCode
void setColorCode(java.lang.String rgbString) -
setWidth
-
setWidth
void setWidth(java.lang.Integer borderWidth)sets the border's width in pixels -
setWidth
void setWidth(java.lang.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
- 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(java.lang.Boolean borderColorMatchesEdgeColor) -
setUsesEdgeWidth
void setUsesEdgeWidth(java.lang.Boolean borderColorMatchesEdgeColor) -
setUsesEdgeDash
void setUsesEdgeDash(java.lang.Boolean borderColorMatchesEdgeColor)
-