Top Inners Fields Constructors Methods
org.fxmisc.richtext.model

pack-priv Class GenericEditableStyledDocumentBase<PS, SEG, S>

extends Object
implements EditableStyledDocument<PS, SEG, S>
Class Inheritance
All Implemented Interfaces
org.fxmisc.richtext.model.EditableStyledDocument, org.fxmisc.richtext.model.StyledDocument, org.fxmisc.richtext.model.TwoDimensional
Known Direct Subclasses
org.fxmisc.richtext.model.SimpleEditableStyledDocument, org.fxmisc.richtext.model.GenericEditableStyledDocument
Static Imports
org.fxmisc.richtext.model.TwoDimensional.Bias.*

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final SuspendableNo
private ReadOnlyStyledDocument<PS, SEG, S>
private final Val<Integer>
private final EventSource<List<RichTextChange<PS, SEG, S>>>
private final Val<String>
private final SuspendableVal<Integer>
private final SuspendableList<Paragraph<PS, SEG, S>>
paragraphs

References Deprecated SuspendableList is deprecated or references (maybe indirectly) at least one deprecated element.
private final EventSource<List<MaterializedListModification<Paragraph<PS, SEG, S>>>>
private final SuspendableEventStream<List<RichTextChange<PS, SEG, S>>>
private final SuspendableVal<String>

Constructor Summary

AccessConstructor and Description
pack-priv
GenericEditableStyledDocumentBase(ReadOnlyStyledDocument<PS, SEG, S> initialContent)

Creates an EditableStyledDocument with the given document as its initial content

pack-priv
GenericEditableStyledDocumentBase(Paragraph<PS, SEG, S> initialParagraph)

Creates an EditableStyledDocument with the given paragraph as its initial content

pack-priv
GenericEditableStyledDocumentBase(PS initialParagraphStyle, S initialStyle, SegmentOps<SEG, S> segmentOps)

Creates an empty EditableStyledDocument

Method Summary

Modifier and TypeMethod and Description
public final SuspendableNo
public StyledDocument<PS, SEG, S>
public int
public LiveList<Paragraph<PS, SEG, S>>
public String
public final boolean
public int
public Val<Integer>
public EventStream<List<RichTextChange<PS, SEG, S>>>
multiRichChanges()

Implements org.fxmisc.richtext.model.EditableStyledDocument.multiRichChanges.

Returns an EventStream that emits a List of RichTextChanges every time a change is made to this document, even when such a change does not modify the underlying document in any way.

public TwoDimensional.Position
offsetToPosition(int offset, TwoDimensional.Bias bias)

Implements org.fxmisc.richtext.model.TwoDimensional.offsetToPosition.

Creates a two dimensional position in some entity (e.g. area, list of lists, list of some object with length) where the offset value is an absolute position in that entity.

public TwoDimensional.Position
position(int major, int minor)

Implements org.fxmisc.richtext.model.TwoDimensional.position.

Creates a two dimensional position in some entity (e.g. area, list of lists, list of some object with length) where the major value is the index within the outer list) and the minor value is either the index within the inner list or some amount of length in a list of objects that have length.

public void
replace(int start, int end, StyledDocument<PS, SEG, S> replacement)

Implements org.fxmisc.richtext.model.EditableStyledDocument.replace.

Replaces the portion of this document "from..to" with the given replacement.

public void
replaceMulti(List<Replacement<PS, SEG, S>> replacements)

Implements org.fxmisc.richtext.model.EditableStyledDocument.replaceMulti.

Replaces multiple portions of this document in one update.

public void
setParagraphStyle(int paragraphIndex, PS style)

Implements org.fxmisc.richtext.model.EditableStyledDocument.setParagraphStyle.

Sets the given paragraph to the given paragraph style

public void
setStyle(int from, int to, S style)

Implements org.fxmisc.richtext.model.EditableStyledDocument.setStyle.

Sets the style of all segments in the given "from..to" range to the given style.

public void
setStyle(int paragraphIndex, S style)

Implements org.fxmisc.richtext.model.EditableStyledDocument.setStyle.

Sets all segments in the given paragraph to the given style

public void
setStyle(int paragraphIndex, int fromCol, int toCol, S style)

Implements org.fxmisc.richtext.model.EditableStyledDocument.setStyle.

Sets the given range "fromCol..toCol" in the given paragraph to the given style

public void
setStyleSpans(int from, StyleSpans<? extends S> styleSpans)

Implements org.fxmisc.richtext.model.EditableStyledDocument.setStyleSpans.

Replaces the style spans for the given range "from..(from + styleSpans.length())" with the given style spans

public void
setStyleSpans(int paragraphIndex, int from, StyleSpans<? extends S> styleSpans)

Implements org.fxmisc.richtext.model.EditableStyledDocument.setStyleSpans.

Replaces the style spans for the given range "from..(from + styleSpans.length())" in the given paragraph with the given style spans

public ReadOnlyStyledDocument<PS, SEG, S>
snapshot()

Implements org.fxmisc.richtext.model.EditableStyledDocument.snapshot.

Read-only snapshot of the current state of this document.

public StyledDocument<PS, SEG, S>
public Val<String>
private void
updateMulti(ReadOnlyStyledDocument<PS, SEG, S> newValue, List<RichTextChange<PS, SEG, S>> richChanges, List<MaterializedListModification<Paragraph<PS, SEG, S>>> parChanges)

private void
updateSingle(ReadOnlyStyledDocument<PS, SEG, S> newValue, RichTextChange<PS, SEG, S> change, MaterializedListModification<Paragraph<PS, SEG, S>> parChange)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

beingUpdatedback to summary
private final SuspendableNo beingUpdated
docback to summary
private ReadOnlyStyledDocument<PS, SEG, S> doc
internalLengthback to summary
private final Val<Integer> internalLength
internalRichChangeListback to summary
private final EventSource<List<RichTextChange<PS, SEG, S>>> internalRichChangeList
internalTextback to summary
private final Val<String> internalText
lengthback to summary
private final SuspendableVal<Integer> length
paragraphsback to summary
private final SuspendableList<Paragraph<PS, SEG, S>> paragraphs

References Deprecated

SuspendableList is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

parChangesListback to summary
private final EventSource<List<MaterializedListModification<Paragraph<PS, SEG, S>>>> parChangesList
richChangeListback to summary
private final SuspendableEventStream<List<RichTextChange<PS, SEG, S>>> richChangeList
textback to summary
private final SuspendableVal<String> text

Constructor Detail

GenericEditableStyledDocumentBaseback to summary
pack-priv GenericEditableStyledDocumentBase(ReadOnlyStyledDocument<PS, SEG, S> initialContent)

Creates an EditableStyledDocument with the given document as its initial content

GenericEditableStyledDocumentBaseback to summary
pack-priv GenericEditableStyledDocumentBase(Paragraph<PS, SEG, S> initialParagraph)

Creates an EditableStyledDocument with the given paragraph as its initial content

GenericEditableStyledDocumentBaseback to summary
pack-priv GenericEditableStyledDocumentBase(PS initialParagraphStyle, S initialStyle, SegmentOps<SEG, S> segmentOps)

Creates an empty EditableStyledDocument

Method Detail

beingUpdatedPropertyback to summary
public final SuspendableNo beingUpdatedProperty()

Implements org.fxmisc.richtext.model.EditableStyledDocument.beingUpdatedProperty.

Annotations
@Override
concatback to summary
public StyledDocument<PS, SEG, S> concat(StyledDocument<PS, SEG, S> that)

Implements org.fxmisc.richtext.model.StyledDocument.concat.

Annotations
@Override
getLengthback to summary
public int getLength()

Implements org.fxmisc.richtext.model.EditableStyledDocument.getLength.

Annotations
@Override
getParagraphsback to summary
public LiveList<Paragraph<PS, SEG, S>> getParagraphs()

Implements org.fxmisc.richtext.model.EditableStyledDocument.getParagraphs.

Annotations
@Override
getTextback to summary
public String getText()

Implements org.fxmisc.richtext.model.StyledDocument.getText.

Annotations
@Override
isBeingUpdatedback to summary
public final boolean isBeingUpdated()

Implements org.fxmisc.richtext.model.EditableStyledDocument.isBeingUpdated.

Annotations
@Override
lengthback to summary
public int length()

Implements org.fxmisc.richtext.model.StyledDocument.length.

Annotations
@Override
lengthPropertyback to summary
public Val<Integer> lengthProperty()

Implements org.fxmisc.richtext.model.EditableStyledDocument.lengthProperty.

Annotations
@Override
multiRichChangesback to summary
public EventStream<List<RichTextChange<PS, SEG, S>>> multiRichChanges()

Implements org.fxmisc.richtext.model.EditableStyledDocument.multiRichChanges.

Doc from org.fxmisc.richtext.model.EditableStyledDocument.multiRichChanges.

Returns an EventStream that emits a List of RichTextChanges every time a change is made to this document, even when such a change does not modify the underlying document in any way. The emitted list will only have one item in it unless one used replaceMulti(List).

Annotations
@Override
offsetToPositionback to summary
public TwoDimensional.Position offsetToPosition(int offset, TwoDimensional.Bias bias)

Implements org.fxmisc.richtext.model.TwoDimensional.offsetToPosition.

Doc from org.fxmisc.richtext.model.TwoDimensional.offsetToPosition.

Creates a two dimensional position in some entity (e.g. area, list of lists, list of some object with length) where the offset value is an absolute position in that entity.

Annotations
@Override
positionback to summary
public TwoDimensional.Position position(int major, int minor)

Implements org.fxmisc.richtext.model.TwoDimensional.position.

Doc from org.fxmisc.richtext.model.TwoDimensional.position.

Creates a two dimensional position in some entity (e.g. area, list of lists, list of some object with length) where the major value is the index within the outer list) and the minor value is either the index within the inner list or some amount of length in a list of objects that have length.

Annotations
@Override
replaceback to summary
public void replace(int start, int end, StyledDocument<PS, SEG, S> replacement)

Implements org.fxmisc.richtext.model.EditableStyledDocument.replace.

Doc from org.fxmisc.richtext.model.EditableStyledDocument.replace.

Replaces the portion of this document "from..to" with the given replacement.

Annotations
@Override
replaceMultiback to summary
public void replaceMulti(List<Replacement<PS, SEG, S>> replacements)

Implements org.fxmisc.richtext.model.EditableStyledDocument.replaceMulti.

Doc from org.fxmisc.richtext.model.EditableStyledDocument.replaceMulti.

Replaces multiple portions of this document in one update.

Annotations
@Override
setParagraphStyleback to summary
public void setParagraphStyle(int paragraphIndex, PS style)

Implements org.fxmisc.richtext.model.EditableStyledDocument.setParagraphStyle.

Doc from org.fxmisc.richtext.model.EditableStyledDocument.setParagraphStyle.

Sets the given paragraph to the given paragraph style

Annotations
@Override
setStyleback to summary
public void setStyle(int from, int to, S style)

Implements org.fxmisc.richtext.model.EditableStyledDocument.setStyle.

Doc from org.fxmisc.richtext.model.EditableStyledDocument.setStyle.

Sets the style of all segments in the given "from..to" range to the given style.

Annotations
@Override
setStyleback to summary
public void setStyle(int paragraphIndex, S style)

Implements org.fxmisc.richtext.model.EditableStyledDocument.setStyle.

Doc from org.fxmisc.richtext.model.EditableStyledDocument.setStyle.

Sets all segments in the given paragraph to the given style

Annotations
@Override
setStyleback to summary
public void setStyle(int paragraphIndex, int fromCol, int toCol, S style)

Implements org.fxmisc.richtext.model.EditableStyledDocument.setStyle.

Doc from org.fxmisc.richtext.model.EditableStyledDocument.setStyle.

Sets the given range "fromCol..toCol" in the given paragraph to the given style

Annotations
@Override
setStyleSpansback to summary
public void setStyleSpans(int from, StyleSpans<? extends S> styleSpans)

Implements org.fxmisc.richtext.model.EditableStyledDocument.setStyleSpans.

Doc from org.fxmisc.richtext.model.EditableStyledDocument.setStyleSpans.

Replaces the style spans for the given range "from..(from + styleSpans.length())" with the given style spans

Annotations
@Override
setStyleSpansback to summary
public void setStyleSpans(int paragraphIndex, int from, StyleSpans<? extends S> styleSpans)

Implements org.fxmisc.richtext.model.EditableStyledDocument.setStyleSpans.

Doc from org.fxmisc.richtext.model.EditableStyledDocument.setStyleSpans.

Replaces the style spans for the given range "from..(from + styleSpans.length())" in the given paragraph with the given style spans

Annotations
@Override
snapshotback to summary
public ReadOnlyStyledDocument<PS, SEG, S> snapshot()

Implements org.fxmisc.richtext.model.EditableStyledDocument.snapshot.

Doc from org.fxmisc.richtext.model.EditableStyledDocument.snapshot.

Read-only snapshot of the current state of this document.

Annotations
@Override
subSequenceback to summary
public StyledDocument<PS, SEG, S> subSequence(int start, int end)

Implements org.fxmisc.richtext.model.StyledDocument.subSequence.

Annotations
@Override
textPropertyback to summary
public Val<String> textProperty()

Implements org.fxmisc.richtext.model.EditableStyledDocument.textProperty.

Annotations
@Override
updateMultiback to summary
private void updateMulti(ReadOnlyStyledDocument<PS, SEG, S> newValue, List<RichTextChange<PS, SEG, S>> richChanges, List<MaterializedListModification<Paragraph<PS, SEG, S>>> parChanges)
updateSingleback to summary
private void updateSingle(ReadOnlyStyledDocument<PS, SEG, S> newValue, RichTextChange<PS, SEG, S> change, MaterializedListModification<Paragraph<PS, SEG, S>> parChange)
org.fxmisc.richtext.model back to summary

private Class GenericEditableStyledDocumentBase.ParagraphList

extends LiveListBase<Paragraph<PS, SEG, S>>
implements UnmodifiableByDefaultLiveList<Paragraph<PS, SEG, S>>
Class Inheritance
All Implemented Interfaces
org.reactfx.collection.UnmodifiableByDefaultLiveList, org.reactfx.collection.UnmodifiableByDefaultList, org.reactfx.collection.AccessorListMethods, java.util.List, java.util.SequencedCollection, java.util.Collection, java.lang.Iterable, javafx.collections.ObservableList, javafx.beans.Observable

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Paragraph<PS, SEG, S>
get(int index)

Implements java.util.List.get.

Returns the element at the specified position in this list.

protected Subscription
observeInputs()

Implements abstract org.reactfx.ObservableBase.observeInputs.

Starts observing this observable's input(s), if any.

public int
size()

Implements java.util.List.size.

Returns the number of elements in this list.

Constructor Detail

ParagraphListback to summary
private ParagraphList()

Method Detail

getback to summary
public Paragraph<PS, SEG, S> get(int index)

Implements java.util.List.get.

Doc from java.util.List.get.

Returns the element at the specified position in this list.

Annotations
@Override
observeInputsback to summary
protected Subscription observeInputs()

Implements abstract org.reactfx.ObservableBase.observeInputs.

Doc from org.reactfx.ObservableBase.observeInputs.

Starts observing this observable's input(s), if any. This method is called when the number of observers goes from 0 to 1. This method is called before newObserver(Object) is called for the first observer.

Annotations
@Override
sizeback to summary
public int size()

Implements java.util.List.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Annotations
@Override