Top Description Inners Fields Constructors Methods
jdk.javadoc.internal.doclets.formats.html.taglets.snippet

public Class StyledText

extends Object
Class Inheritance
Known Direct Subclasses
jdk.javadoc.internal.doclets.formats.html.taglets.snippet.StyledText.SubText
Imports
java.lang.ref.WeakReference, java.util.ArrayList, .Collections, .HashMap, .HashSet, .List, .Map, .Objects, .Set

A mutable sequence of individually styleable characters.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
private static class
pack-priv class

Field Summary

Modifier and TypeField and Description
private Map<String, StyledText>
private StringBuilder
private StyledText.Styles
private List<WeakReference<StyledText.SubText>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addStyle(Set<? extends Style> additionalStyles)

private void
addStyle(int start, int end, Set<? extends Style> additionalStyles)

public StyledText
append(Set<? extends Style> styles, CharSequence sequence)

public StyledText
append(StyledText fragment)

public CharSequence
public void
private void
bookmark(String name, int start, int end)

public void
private void
consumeBy(StyledText.Consumer consumer, int start, int end)

public StyledText
protected void
init()

public int
public void
replace(Set<? extends Style> styles, CharSequence plaintext)

private void
replace(int start, int end, Set<? extends Style> styles, CharSequence plaintext)

public StyledText
subText(int start, int end)

private void
update(int start, int end, int newLength, StyledText.SubText text)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bookmarksback to summary
private Map<String, StyledText> bookmarks
charsback to summary
private StringBuilder chars
stylesback to summary
private StyledText.Styles styles
subtextsback to summary
private List<WeakReference<StyledText.SubText>> subtexts

Constructor Detail

StyledTextback to summary
public StyledText()

Method Detail

addStyleback to summary
public void addStyle(Set<? extends Style> additionalStyles)
addStyleback to summary
private void addStyle(int start, int end, Set<? extends Style> additionalStyles)
appendback to summary
public StyledText append(Set<? extends Style> styles, CharSequence sequence)
appendback to summary
public StyledText append(StyledText fragment)
asCharSequenceback to summary
public CharSequence asCharSequence()
bookmarkback to summary
public void bookmark(String name)
bookmarkback to summary
private void bookmark(String name, int start, int end)
consumeByback to summary
public void consumeBy(StyledText.Consumer consumer)
consumeByback to summary
private void consumeBy(StyledText.Consumer consumer, int start, int end)
getBookmarkedTextback to summary
public StyledText getBookmarkedText(String bookmark)
initback to summary
protected void init()
lengthback to summary
public int length()
replaceback to summary
public void replace(Set<? extends Style> styles, CharSequence plaintext)
replaceback to summary
private void replace(int start, int end, Set<? extends Style> styles, CharSequence plaintext)
subTextback to summary
public StyledText subText(int start, int end)
updateback to summary
private void update(int start, int end, int newLength, StyledText.SubText text)
jdk.javadoc.internal.doclets.formats.html.taglets.snippet back to summary

public Interface StyledText.Consumer

Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public void
consume(Set<? extends Style> style, CharSequence sequence)

Method Detail

consumeback to summary
public void consume(Set<? extends Style> style, CharSequence sequence)
jdk.javadoc.internal.doclets.formats.html.taglets.snippet back to summary

private final Class StyledText.Styles

extends Object
Class Inheritance
  • java.lang.Object
  • jdk.javadoc.internal.doclets.formats.html.taglets.snippet.StyledText.Styles

Field Summary

Modifier and TypeField and Description
private final ArrayList<Set<Style>>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private void
add(int fromIndex, int toIndex, Set<? extends Style> additional)

private void
consumeBy(StyledText.Consumer consumer, CharSequence seq, int start, int end)

private void
delete(int fromIndex, int toIndex)

private void
insert(int fromIndex, int length, Set<? extends Style> s)

private Set<Style>
sum(Set<? extends Style> a, Set<Style> b)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

listback to summary
private final ArrayList<Set<Style>> list

Constructor Detail

Stylesback to summary
private Styles()

Method Detail

addback to summary
private void add(int fromIndex, int toIndex, Set<? extends Style> additional)
consumeByback to summary
private void consumeBy(StyledText.Consumer consumer, CharSequence seq, int start, int end)
deleteback to summary
private void delete(int fromIndex, int toIndex)
insertback to summary
private void insert(int fromIndex, int length, Set<? extends Style> s)
sumback to summary
private Set<Style> sum(Set<? extends Style> a, Set<Style> b)
jdk.javadoc.internal.doclets.formats.html.taglets.snippet back to summary

pack-priv final Class StyledText.SubText

extends StyledText
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv int

Constructor Summary

AccessConstructor and Description
private
SubText(int start, int end)

Method Summary

Modifier and TypeMethod and Description
public void
public CharSequence
public void
public void
public StyledText
protected void
public int
public void
public StyledText
Inherited from jdk.javadoc.internal.doclets.formats.html.taglets.snippet.StyledText:
appendappend

Field Detail

endback to summary
pack-priv int end
startback to summary
pack-priv int start

Constructor Detail

SubTextback to summary
private SubText(int start, int end)

Method Detail

addStyleback to summary
public void addStyle(Set<? extends Style> additionalStyles)

Overrides jdk.javadoc.internal.doclets.formats.html.taglets.snippet.StyledText.addStyle.

Annotations
@Override
asCharSequenceback to summary
public CharSequence asCharSequence()

Overrides jdk.javadoc.internal.doclets.formats.html.taglets.snippet.StyledText.asCharSequence.

Annotations
@Override
bookmarkback to summary
public void bookmark(String name)

Overrides jdk.javadoc.internal.doclets.formats.html.taglets.snippet.StyledText.bookmark.

Annotations
@Override
consumeByback to summary
public void consumeBy(StyledText.Consumer consumer)

Overrides jdk.javadoc.internal.doclets.formats.html.taglets.snippet.StyledText.consumeBy.

Annotations
@Override
getBookmarkedTextback to summary
public StyledText getBookmarkedText(String bookmark)

Overrides jdk.javadoc.internal.doclets.formats.html.taglets.snippet.StyledText.getBookmarkedText.

Annotations
@Override
initback to summary
protected void init()

Overrides jdk.javadoc.internal.doclets.formats.html.taglets.snippet.StyledText.init.

Annotations
@Override
lengthback to summary
public int length()

Overrides jdk.javadoc.internal.doclets.formats.html.taglets.snippet.StyledText.length.

Annotations
@Override
replaceback to summary
public void replace(Set<? extends Style> styles, CharSequence plaintext)

Overrides jdk.javadoc.internal.doclets.formats.html.taglets.snippet.StyledText.replace.

Annotations
@Override
subTextback to summary
public StyledText subText(int start, int end)

Overrides jdk.javadoc.internal.doclets.formats.html.taglets.snippet.StyledText.subText.

Annotations
@Override