@@ -46,6 +46,7 @@ public class TextExt extends Text {
4646 styleables .add (StyleableProperties .UNDERLINE_OFFSET );
4747 styleables .add (StyleableProperties .UNDERLINE_WAVE_RADIUS );
4848 styleables .add (StyleableProperties .UNDERLINE_DASH_ARRAY );
49+ styleables .add (StyleableProperties .UNDERLINE_DOUBLE_GAP );
4950 styleables .add (StyleableProperties .UNDERLINE_CAP );
5051
5152 CSS_META_DATA_LIST = Collections .unmodifiableList (styleables );
@@ -91,6 +92,10 @@ public class TextExt extends Text {
9192 null , "underlineDashArray" , this , StyleableProperties .UNDERLINE_DASH_ARRAY
9293 );
9394
95+ private final StyleableObjectProperty <Number > underlineDoubleGap = new CustomStyleableProperty <>(
96+ null , "underlineDoubleGap" , this , StyleableProperties .UNDERLINE_DOUBLE_GAP
97+ );
98+
9499 private final StyleableObjectProperty <StrokeLineCap > underlineCap = new CustomStyleableProperty <>(
95100 null , "underlineCap" , this , StyleableProperties .UNDERLINE_CAP
96101 );
@@ -266,6 +271,22 @@ public ObjectProperty<Paint> borderStrokeColorProperty() {
266271 */
267272 public ObjectProperty <Number > underlineWaveRadiusProperty () { return underlineWaveRadius ; }
268273
274+ public Number getUnderlineDoubleGap () { return underlineDoubleGap .get (); }
275+ public void setUnderlineDoubleGap (Number radius ) { underlineDoubleGap .set (radius ); }
276+
277+ /**
278+ * The size of the gap between two parallel underline lines or wave forms. If null or zero, the
279+ * underline will be a single line or wave form.
280+ *
281+ * Can be styled from CSS using the "-rtfx-underline-double-gap" property.
282+ *
283+ * <p>Note that the underline properties specified here are orthogonal to the {@link #underlineProperty()} inherited
284+ * from {@link Text}. The underline properties defined here in {@link TextExt} will cause an underline to be
285+ * drawn if {@link #underlineWidthProperty()} is non-null and greater than zero, regardless of
286+ * the value of {@link #underlineProperty()}.</p>
287+ */
288+ public ObjectProperty <Number > underlineDoubleGapProperty () { return underlineDoubleGap ; }
289+
269290 // Dash array for the text underline
270291 public Number [] getUnderlineDashArray () { return underlineDashArray .get (); }
271292 public void setUnderlineDashArray (Number [] dashArray ) { underlineDashArray .set (dashArray ); }
@@ -315,7 +336,7 @@ private static class StyleableProperties {
315336 );
316337
317338 private static final CssMetaData <TextExt , StrokeType > BORDER_TYPE = new CustomCssMetaData <>(
318- "-rtfx-border-stroke-type" , ( StyleConverter <?, StrokeType >) StyleConverter .getEnumConverter (StrokeType .class ),
339+ "-rtfx-border-stroke-type" , StyleConverter .getEnumConverter (StrokeType .class ),
319340 StrokeType .INSIDE , n -> n .borderStrokeType
320341 );
321342
@@ -349,8 +370,13 @@ private static class StyleableProperties {
349370 new Double [0 ], n -> n .underlineDashArray
350371 );
351372
373+ private static final CssMetaData <TextExt , Number > UNDERLINE_DOUBLE_GAP = new CustomCssMetaData <>(
374+ "-rtfx-underline-double-gap" , StyleConverter .getSizeConverter (),
375+ 0 , n -> n .underlineDoubleGap
376+ );
377+
352378 private static final CssMetaData <TextExt , StrokeLineCap > UNDERLINE_CAP = new CustomCssMetaData <>(
353- "-rtfx-underline-cap" , ( StyleConverter <?, StrokeLineCap >) StyleConverter .getEnumConverter (StrokeLineCap .class ),
379+ "-rtfx-underline-cap" , StyleConverter .getEnumConverter (StrokeLineCap .class ),
354380 StrokeLineCap .SQUARE , n -> n .underlineCap
355381 );
356382 }
0 commit comments