2222import java .util .function .UnaryOperator ;
2323import java .util .stream .Stream ;
2424
25+ import javafx .beans .NamedArg ;
2526import javafx .beans .binding .Binding ;
2627import javafx .beans .binding .Bindings ;
2728import javafx .beans .binding .ObjectBinding ;
@@ -502,15 +503,20 @@ public Optional<Tuple2<Codec<PS>, Codec<SEG>>> getStyleCodecs() {
502503 * @param nodeFactory A function which is used to create the JavaFX scene nodes for a
503504 * particular segment.
504505 */
505- public GenericStyledArea (PS initialParagraphStyle , BiConsumer <TextFlow , PS > applyParagraphStyle ,
506- S initialTextStyle , TextOps <SEG , S > segmentOps ,
507- Function <SEG , Node > nodeFactory ) {
506+ public GenericStyledArea (@ NamedArg ("initialParagraphStyle" ) PS initialParagraphStyle ,
507+ @ NamedArg ("applyParagraphStyle" ) BiConsumer <TextFlow , PS > applyParagraphStyle ,
508+ @ NamedArg ("initialTextStyle" ) S initialTextStyle ,
509+ @ NamedArg ("segmentOps" ) TextOps <SEG , S > segmentOps ,
510+ @ NamedArg ("nodeFactory" ) Function <SEG , Node > nodeFactory ) {
508511 this (initialParagraphStyle , applyParagraphStyle , initialTextStyle , segmentOps , true , nodeFactory );
509512 }
510513
511- public GenericStyledArea (PS initialParagraphStyle , BiConsumer <TextFlow , PS > applyParagraphStyle ,
512- S initialTextStyle , TextOps <SEG , S > segmentOps ,
513- boolean preserveStyle , Function <SEG , Node > nodeFactory ) {
514+ public GenericStyledArea (@ NamedArg ("initialParagraphStyle" ) PS initialParagraphStyle ,
515+ @ NamedArg ("applyParagraphStyle" ) BiConsumer <TextFlow , PS > applyParagraphStyle ,
516+ @ NamedArg ("initialTextStyle" ) S initialTextStyle ,
517+ @ NamedArg ("segmentOps" ) TextOps <SEG , S > segmentOps ,
518+ @ NamedArg ("preserveStyle" ) boolean preserveStyle ,
519+ @ NamedArg ("nodeFactory" ) Function <SEG , Node > nodeFactory ) {
514520 this (initialParagraphStyle , applyParagraphStyle , initialTextStyle ,
515521 new GenericEditableStyledDocument <>(initialParagraphStyle , initialTextStyle , segmentOps ), segmentOps , preserveStyle , nodeFactory );
516522 }
@@ -521,30 +527,30 @@ public GenericStyledArea(PS initialParagraphStyle, BiConsumer<TextFlow, PS> appl
521527 * shares the same {@link EditableStyledDocument}.
522528 */
523529 public GenericStyledArea (
524- PS initialParagraphStyle ,
525- BiConsumer <TextFlow , PS > applyParagraphStyle ,
526- S initialTextStyle ,
527- EditableStyledDocument <PS , SEG , S > document ,
528- TextOps <SEG , S > textOps ,
529- Function <SEG , Node > nodeFactory ) {
530- this (initialParagraphStyle , applyParagraphStyle , initialTextStyle , document , textOps , true , nodeFactory );
530+ @ NamedArg ( "initialParagraphStyle" ) PS initialParagraphStyle ,
531+ @ NamedArg ( "applyParagraphStyle" ) BiConsumer <TextFlow , PS > applyParagraphStyle ,
532+ @ NamedArg ( "initialTextStyle" ) S initialTextStyle ,
533+ @ NamedArg ( "document" ) EditableStyledDocument <PS , SEG , S > document ,
534+ @ NamedArg ( "segmentOps" ) TextOps <SEG , S > segmentOps ,
535+ @ NamedArg ( "nodeFactory" ) Function <SEG , Node > nodeFactory ) {
536+ this (initialParagraphStyle , applyParagraphStyle , initialTextStyle , document , segmentOps , true , nodeFactory );
531537
532538 }
533539
534540 public GenericStyledArea (
535- PS initialParagraphStyle ,
536- BiConsumer <TextFlow , PS > applyParagraphStyle ,
537- S initialTextStyle ,
538- EditableStyledDocument <PS , SEG , S > document ,
539- TextOps <SEG , S > textOps ,
540- boolean preserveStyle ,
541- Function <SEG , Node > nodeFactory ) {
541+ @ NamedArg ( "initialParagraphStyle" ) PS initialParagraphStyle ,
542+ @ NamedArg ( "applyParagraphStyle" ) BiConsumer <TextFlow , PS > applyParagraphStyle ,
543+ @ NamedArg ( "initialTextStyle" ) S initialTextStyle ,
544+ @ NamedArg ( "document" ) EditableStyledDocument <PS , SEG , S > document ,
545+ @ NamedArg ( "segmentOps" ) TextOps <SEG , S > segmentOps ,
546+ @ NamedArg ( "preserveStyle" ) boolean preserveStyle ,
547+ @ NamedArg ( "nodeFactory" ) Function <SEG , Node > nodeFactory ) {
542548 this .initialTextStyle = initialTextStyle ;
543549 this .initialParagraphStyle = initialParagraphStyle ;
544550 this .preserveStyle = preserveStyle ;
545551 this .content = document ;
546552 this .applyParagraphStyle = applyParagraphStyle ;
547- this .segmentOps = textOps ;
553+ this .segmentOps = segmentOps ;
548554
549555 undoManager = preserveStyle
550556 ? createRichUndoManager (UndoManagerFactory .unlimitedHistoryFactory ())
0 commit comments