Package org.fxmisc.richtext.model
Class RichTextChange<PS,SEG,S>
- java.lang.Object
-
- org.fxmisc.richtext.model.TextChange<StyledDocument<PS,SEG,S>,RichTextChange<PS,SEG,S>>
-
- org.fxmisc.richtext.model.RichTextChange<PS,SEG,S>
-
public class RichTextChange<PS,SEG,S> extends TextChange<StyledDocument<PS,SEG,S>,RichTextChange<PS,SEG,S>>
An object that specifies where a change occurred in aGenericStyledArea
.
-
-
Field Summary
-
Fields inherited from class org.fxmisc.richtext.model.TextChange
inserted, position, removed
-
-
Constructor Summary
Constructors Constructor Description RichTextChange(int position, StyledDocument<PS,SEG,S> removed, StyledDocument<PS,SEG,S> inserted)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StyledDocument<PS,SEG,S>
concat(StyledDocument<PS,SEG,S> a, StyledDocument<PS,SEG,S> b)
protected RichTextChange<PS,SEG,S>
create(int position, StyledDocument<PS,SEG,S> removed, StyledDocument<PS,SEG,S> inserted)
boolean
equals(Object other)
protected int
insertedLength()
boolean
isPlainTextIdentity()
Equivalent torichChange.toPlainTextChange().isIdentity()
but without the additional object creation viatoPlainTextChange()
.protected int
removedLength()
static void
skipStyleComparison(boolean value)
protected StyledDocument<PS,SEG,S>
sub(StyledDocument<PS,SEG,S> doc, int from, int to)
PlainTextChange
toPlainTextChange()
-
Methods inherited from class org.fxmisc.richtext.model.TextChange
getInserted, getInsertionEnd, getNetLength, getPosition, getRemovalEnd, getRemoved, hashCode, invert, isIdentity, mergeWith, toString
-
-
-
-
Constructor Detail
-
RichTextChange
public RichTextChange(int position, StyledDocument<PS,SEG,S> removed, StyledDocument<PS,SEG,S> inserted)
-
-
Method Detail
-
removedLength
protected int removedLength()
- Specified by:
removedLength
in classTextChange<StyledDocument<PS,SEG,S>,RichTextChange<PS,SEG,S>>
-
insertedLength
protected int insertedLength()
- Specified by:
insertedLength
in classTextChange<StyledDocument<PS,SEG,S>,RichTextChange<PS,SEG,S>>
-
concat
protected final StyledDocument<PS,SEG,S> concat(StyledDocument<PS,SEG,S> a, StyledDocument<PS,SEG,S> b)
- Specified by:
concat
in classTextChange<StyledDocument<PS,SEG,S>,RichTextChange<PS,SEG,S>>
-
sub
protected final StyledDocument<PS,SEG,S> sub(StyledDocument<PS,SEG,S> doc, int from, int to)
- Specified by:
sub
in classTextChange<StyledDocument<PS,SEG,S>,RichTextChange<PS,SEG,S>>
-
create
protected final RichTextChange<PS,SEG,S> create(int position, StyledDocument<PS,SEG,S> removed, StyledDocument<PS,SEG,S> inserted)
- Specified by:
create
in classTextChange<StyledDocument<PS,SEG,S>,RichTextChange<PS,SEG,S>>
-
toPlainTextChange
public final PlainTextChange toPlainTextChange()
-
isPlainTextIdentity
public final boolean isPlainTextIdentity()
Equivalent torichChange.toPlainTextChange().isIdentity()
but without the additional object creation viatoPlainTextChange()
.
-
skipStyleComparison
public static void skipStyleComparison(boolean value)
-
equals
public boolean equals(Object other)
- Overrides:
equals
in classTextChange<StyledDocument<PS,SEG,S>,RichTextChange<PS,SEG,S>>
-
-