mode
. For the first and
second looks, the foreground
property sets
the main color.link { lineWidth : 10 foreground : pink ; } link.top { mode : MODE_UNICOLOR ; } link.center { mode : MODE_GRADIENT ; } link.bottom { mode : MODE_TEXTURE ; texture : 'file:/home/kaplan/JViews30/\ bin/composer/images/textures/wood2.gif' ; }
borderWidth
property
is greater than 0
, its default value. The
default border color is black, and two other properties control the
line style (for example, dashes).link { lineWidth : 10 ; foreground : 144,238,144 ; endCap : CAP_BUTT ; } link.top { borderWidth : 4 ; borderUpColor : red ; } link.center { borderWidth : 4 ; borderUpColor : gray ; borderStyle : 10,5 ; } link.bottom { borderWidth : 2 ; }
link { lineWidth : 10 ; endCap : CAP_ROUND ; lineJoin : JOIN_ROUND ; borderWidth : 4 ; borderUpColor : white ; borderDownColor : black ; mode : MODE_UNICOLOR ; } link.top { foreground : pink ; } link.center { foreground : orange ; borderStyle : 10,10 ; } link.bottom { borderUpColor : yellow ; borderDownColor : blue ; foreground : 30, 200, 50 ; }
JOIN_MITER
and CAP_SQUARE
.
A miter join is a sharp join formed by extending one edge of each
link. You can change the end cap and join styles, as shown in the
following figure.link { lineWidth : 10 ; foreground : 154,154,255 ; borderWidth : 2 ; } link.top { endCap : CAP_ROUND ; lineJoin : JOIN_ROUND ; } link.center { endCap : CAP_BUTT ; lineJoin : JOIN_MITER ; } link.bottom { endCap : CAP_SQUARE ; lineJoin : JOIN_BEVEL ; }
curved
property uses the
link points to feed a Bezier function which renders a curved link.
Intermediate points show the path for the Bezier computation. With
two points, a standard deviation applies, that is, at 1/4 before the
end of the link. The curved
value is a
floating-point value between 0f
and 1f
.
A value of 0
means no curve at all (the
default), and a value of 1
means the sharpest
curve. Use a value of 0.65f
for an attractive
curve, see the following figure.link { lineWidth : 10 ; endCap : CAP_ROUND ; lineJoin : JOIN_ROUND ; foreground : 255,218,185 ; borderWidth : 2 ; curved : 0.65 ; } link.top { mode : MODE_UNICOLOR ; } link.center { endCap : CAP_SQUARE ; lineStyle : 10,20 ; } link.bottom { borderStyle : 1,10 ; borderWidth : 6 ; }
endCap
values.
Dashes are controlled by the lineStyle property. They are expressed
as a float array. Alternate entries in the array represent lengths
of the opaque and transparent segments of the dashes. Note that the lineStyle
specification
is not affected by zooming.borderStyle
property
overrides it (not shown).link { lineWidth : 10 ; endCap : CAP_BUTT ; lineJoin : JOIN_ROUND ; borderWidth : 2 ; } link.top { foreground : #55BEF3 ; lineStyle : 1,15 ; } link.center { foreground : orange ; lineStyle : 10,8,20,8 ; } link.bottom { foreground : red ; mode : MODE_UNICOLOR ; endCap : CAP_BUTT ; lineStyle : 4,4 ; curved : 0.65 ; }