Package org.fxmisc.richtext.model
Class NodeSegmentOpsBase<SEG,S>
- java.lang.Object
-
- org.fxmisc.richtext.model.SegmentOpsBase<SEG,S>
-
- org.fxmisc.richtext.model.NodeSegmentOpsBase<SEG,S>
-
- Type Parameters:
SEG- type of segmentS- type of style
- All Implemented Interfaces:
SegmentOps<SEG,S>
public abstract class NodeSegmentOpsBase<SEG,S> extends SegmentOpsBase<SEG,S>
Properly implementsSegmentOpswhen implementing a non-text custom object, such as a shape or image, and reduces boilerplate. Developers may want to overridejoinSeg(Object, Object)andSegmentOpsBase.joinStyle(Object, Object).
-
-
Constructor Summary
Constructors Constructor Description NodeSegmentOpsBase(SEG empty)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<SEG>joinSeg(SEG currentSeg, SEG nextSeg)Joins two consecutive segments together into one orOptional.empty()if they cannot be joined.charrealCharAt(SEG seg, int index)StringrealGetText(SEG seg)SEGrealSubSequence(SEG seg, int start)SEGrealSubSequence(SEG seg, int start, int end)-
Methods inherited from class org.fxmisc.richtext.model.SegmentOpsBase
charAt, createEmptySeg, getText, joinStyle, subSequence, subSequence
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.fxmisc.richtext.model.SegmentOps
length, or, orStyled
-
-
-
-
Constructor Detail
-
NodeSegmentOpsBase
public NodeSegmentOpsBase(SEG empty)
-
-
Method Detail
-
realCharAt
public char realCharAt(SEG seg, int index)
- Specified by:
realCharAtin classSegmentOpsBase<SEG,S>
-
realGetText
public String realGetText(SEG seg)
- Specified by:
realGetTextin classSegmentOpsBase<SEG,S>
-
realSubSequence
public SEG realSubSequence(SEG seg, int start, int end)
- Specified by:
realSubSequencein classSegmentOpsBase<SEG,S>
-
realSubSequence
public SEG realSubSequence(SEG seg, int start)
- Overrides:
realSubSequencein classSegmentOpsBase<SEG,S>
-
joinSeg
public Optional<SEG> joinSeg(SEG currentSeg, SEG nextSeg)
Description copied from interface:SegmentOpsJoins two consecutive segments together into one orOptional.empty()if they cannot be joined.
-
-