Top Description Methods
org.fxmisc.richtext.model

public Interface TextOps<SEG, S>

Additional top-level classes in compilation unit: LeftTextOps, RightTextOps.

extends SegmentOps<SEG, S>
Known Direct Implementers
org.fxmisc.richtext.model.LeftTextOps, org.fxmisc.richtext.model.RightTextOps, org.fxmisc.richtext.model.TextOpsBase
Type Parameters
<SEG>
the type of segment
<S>
the type of style
Imports
org.reactfx.util.Either, java.util.Optional, java.util.function.BiFunction

Extends SegmentOps by adding create(String), which can create a SEG segment from a given String

Method Summary

Modifier and TypeMethod and Description
public default <R> TextOps<Either<SEG, R>, S>
_or(SegmentOps<R, S> rOps, BiFunction<S, S, Optional<S>> mergeStyle)

Same as SegmentOps#either(SegmentOps, SegmentOps, BiFunction), except that TextOps#create(String) will use this object's create(String) method, not rOps' version.

public SEG
create(String text)

Creates a segment using the given text.

public static <L, R, S> TextOps<Either<L, R>, S>
eitherL(TextOps<L, S> lOps, SegmentOps<R, S> rOps, BiFunction<S, S, Optional<S>> mergeStyle)

Same as SegmentOps#either(SegmentOps, SegmentOps, BiFunction), except that TextOps#create(String) will use lOps' create(String) method, not rOps' version.

public static <L, R, S> TextOps<Either<L, R>, S>
eitherR(SegmentOps<L, S> lOps, TextOps<R, S> rOps, BiFunction<S, S, Optional<S>> mergeStyle)

Same as SegmentOps#either(SegmentOps, SegmentOps, BiFunction), except that TextOps#create(String) will use rOps' create(String) method, not lOps' version.

Inherited from org.fxmisc.richtext.model.SegmentOps:
charAtcreateEmptySegeithereithereitherStylesgetTextjoinSegjoinStylelengthororStyledstyledTextOpsstyledTextOpssubSequencesubSequence

Method Detail

_orback to summary
public default <R> TextOps<Either<SEG, R>, S> _or(SegmentOps<R, S> rOps, BiFunction<S, S, Optional<S>> mergeStyle)

Same as SegmentOps#either(SegmentOps, SegmentOps, BiFunction), except that TextOps#create(String) will use this object's create(String) method, not rOps' version.

createback to summary
public SEG create(String text)

Creates a segment using the given text. One could think of this as a mapping function from String to SEG

eitherLback to summary
public static <L, R, S> TextOps<Either<L, R>, S> eitherL(TextOps<L, S> lOps, SegmentOps<R, S> rOps, BiFunction<S, S, Optional<S>> mergeStyle)

Same as SegmentOps#either(SegmentOps, SegmentOps, BiFunction), except that TextOps#create(String) will use lOps' create(String) method, not rOps' version.

eitherRback to summary
public static <L, R, S> TextOps<Either<L, R>, S> eitherR(SegmentOps<L, S> lOps, TextOps<R, S> rOps, BiFunction<S, S, Optional<S>> mergeStyle)

Same as SegmentOps#either(SegmentOps, SegmentOps, BiFunction), except that TextOps#create(String) will use rOps' create(String) method, not lOps' version.