Top Description Inners Fields Constructors Methods
com.openhtmltopdf.layout

public Class UrlAwareLineBreakIterator

extends Object
implements FSTextBreaker
Class Inheritance
All Implemented Interfaces
com.openhtmltopdf.extend.FSTextBreaker
Imports
java.text.BreakIterator, com.openhtmltopdf.extend.FSTextBreaker

BreakIterator implementation that improves line breaking for URLs. Break points are supported before path fragments.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final String
private UrlAwareLineBreakIterator.Range
private final BreakIterator
private String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private boolean
private void
private int
private boolean
public int
public void
private String
private UrlAwareLineBreakIterator.Range
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BREAKING_CHARSback to summary
private static final String BREAKING_CHARS
currentRangeback to summary
private UrlAwareLineBreakIterator.Range currentRange
delegateback to summary
private final BreakIterator delegate
textback to summary
private String text

Constructor Detail

UrlAwareLineBreakIteratorback to summary
public UrlAwareLineBreakIterator(BreakIterator breaker)

Method Detail

advanceDelegateback to summary
private boolean advanceDelegate()
checkNotAheadOfDelegateback to summary
private void checkNotAheadOfDelegate()
findSlashInRangeback to summary
private int findSlashInRange(UrlAwareLineBreakIterator.Range searchRange)
isDelegateInSyncback to summary
private boolean isDelegateInSync()
nextback to summary
public int next()

Implements com.openhtmltopdf.extend.FSTextBreaker.next.

Annotations
@Override
setTextback to summary
public void setText(String newText)

Implements com.openhtmltopdf.extend.FSTextBreaker.setText.

Annotations
@Override
substringback to summary
private String substring(UrlAwareLineBreakIterator.Range range)
trimSearchRangeback to summary
private UrlAwareLineBreakIterator.Range trimSearchRange(UrlAwareLineBreakIterator.Range searchRange)
com.openhtmltopdf.layout back to summary

private Class UrlAwareLineBreakIterator.Range

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final int
private final int

Constructor Summary

AccessConstructor and Description
public
Range(int start, int stop)

public
Range(int referencePoint, int startOffset, int stopOffset)

Method Summary

Modifier and TypeMethod and Description
public UrlAwareLineBreakIterator.Range
public int
public int
public UrlAwareLineBreakIterator.Range
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public UrlAwareLineBreakIterator.Range
withStart(int start)

public UrlAwareLineBreakIterator.Range
withStop(int stop)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

startback to summary
private final int start
stopback to summary
private final int stop

Constructor Detail

Rangeback to summary
public Range(int start, int stop)
Rangeback to summary
public Range(int referencePoint, int startOffset, int stopOffset)

Method Detail

decrementStopback to summary
public UrlAwareLineBreakIterator.Range decrementStop()
getStartback to summary
public int getStart()
getStopback to summary
public int getStop()
incrementStartback to summary
public UrlAwareLineBreakIterator.Range incrementStart()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
withStartback to summary
public UrlAwareLineBreakIterator.Range withStart(int start)
withStopback to summary
public UrlAwareLineBreakIterator.Range withStop(int stop)