| Developing with the SDK > Using CSS Syntax in the Style Sheet > Customizing General Nodes in the Style Sheet > Controlling the Node's Border |
Controlling the Node's Border |
INDEX
PREVIOUS
NEXT
|
The stroke (that is, the border) of the shape is controlled by the properties strokeColor, strokeWidth, strokeDashArray, strokeEndCaps, strokeLineJoins, strokeMiterLimit, and strokeDashPhase.
The strokeColor property sets the color used to paint the stroke.
The other properties are used to create an instance of java.awt.BasicStroke:
strokeWidth specifies the width of the stroke.
strokeDashArray is used to create dashed or dotted strokes. It is an array of floating-point values that specify the lengths of the alternate painted and transparent segments.
strokeEndCaps specifies the shape of the ends of the dash segments.
strokeLineJoins and strokeMiterLimit specify how the stroke looks at the angles between two segments.
Code Sample 3.2 shows how to create a blue dashed stroke, with rounded segment ends, visible segments that have a length of 4, and transparent segments that have a length of 2, in the style sheet.
node { strokeColor : "blue"; strokeDashArray : "4,2"; strokeEndCaps : "CAP_ROUNDS"; } |
For more details of the stroke-related properties, see the documentation of the BasicStroke class in the Java documentation.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |