Package org.xhtmlrenderer.layout.breaker
Class UrlAwareLineBreakIterator
java.lang.Object
java.text.BreakIterator
org.xhtmlrenderer.layout.breaker.UrlAwareLineBreakIterator
- All Implemented Interfaces:
Cloneable
BreakIterator implementation that improves line breaking for URLs. Break points are supported
before path fragments.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate @Nullable UrlAwareLineBreakIterator.Rangeprivate final BreakIteratorprivate @Nullable StringFields inherited from class java.text.BreakIterator
DONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanprivate voidintcurrent()private intfindSlashInRange(UrlAwareLineBreakIterator.Range searchRange) intfirst()intfollowing(int offset) getText()booleanisBoundary(int offset) private booleanintlast()intnext()intnext(int n) intpreceding(int offset) intprevious()final voidvoidsetText(CharacterIterator newText) private Stringprivate UrlAwareLineBreakIterator.RangetrimSearchRange(UrlAwareLineBreakIterator.Range searchRange) Methods inherited from class java.text.BreakIterator
clone, getAvailableLocales, getCharacterInstance, getCharacterInstance, getLineInstance, getLineInstance, getSentenceInstance, getSentenceInstance, getWordInstance, getWordInstance
-
Field Details
-
BREAKING_CHARS
- See Also:
-
delegate
-
text
-
currentRange
-
-
Constructor Details
-
UrlAwareLineBreakIterator
-
-
Method Details
-
preceding
public int preceding(int offset) - Overrides:
precedingin classBreakIterator
-
last
public int last()- Specified by:
lastin classBreakIterator
-
previous
public int previous()- Specified by:
previousin classBreakIterator
-
next
public int next()- Specified by:
nextin classBreakIterator
-
trimSearchRange
private UrlAwareLineBreakIterator.Range trimSearchRange(UrlAwareLineBreakIterator.Range searchRange) -
findSlashInRange
-
substring
-
checkNotAheadOfDelegate
private void checkNotAheadOfDelegate() -
isDelegateInSync
private boolean isDelegateInSync() -
advanceDelegate
private boolean advanceDelegate() -
next
public int next(int n) - Specified by:
nextin classBreakIterator
-
isBoundary
public boolean isBoundary(int offset) - Overrides:
isBoundaryin classBreakIterator
-
following
public int following(int offset) - Specified by:
followingin classBreakIterator
-
first
public int first()- Specified by:
firstin classBreakIterator
-
setText
- Specified by:
setTextin classBreakIterator
-
current
public int current()- Specified by:
currentin classBreakIterator
-
getText
- Specified by:
getTextin classBreakIterator
-
setText
- Overrides:
setTextin classBreakIterator
-