Package com.teamten.typeset
Class ElementList.Breakpoint
java.lang.Object
com.teamten.typeset.ElementList.Breakpoint
- Enclosing class:
ElementList
Keeps track of possible breakpoints in our paragraph or page, their penalty, and their effects on the
whole paragraph or page.
-
Method Summary
Modifier and TypeMethodDescriptiongetChunk()The chunk of the line or page ending at this breakpoint.intGeneric counter, used for line number or physical page number.intgetIndex()The index into the mElements array where this break would happen.longThe penalty for breaking here.The previous breakpoint in the paragraph or page assuming we're selected as a breakpoint.intThe index into mElements where the line would start after this break.longThe demerits of the rest of the paragraph or page starting at this break.voidSet the chunk of the line or page ending at this breakpoint.voidsetCounter(int counter) Set the counter (line or page number) for this chunk.voidsetPreviousBreakpoint(ElementList.Breakpoint previousBreakpoint) Set the previous breakpoint in the paragraph or page assuming we're selected as a breakpoint.voidsetStartIndex(int startIndex) Set the index into mElements where the line would start after this break.voidsetTotalDemerits(long totalDemerits) Set the demerits of the rest of the paragraph or page starting at this break.
-
Method Details
-
getIndex
public int getIndex()The index into the mElements array where this break would happen. -
getPenalty
public long getPenalty()The penalty for breaking here. -
getCounter
public int getCounter()Generic counter, used for line number or physical page number. The counter of a section is stored in the breakpoint at its end (end of line or end of page). If a page makes references to several images, then the counter points to the page of the last image. For example, page 6 has two images, then counter is 8. -
getStartIndex
public int getStartIndex()The index into mElements where the line would start after this break. -
setStartIndex
public void setStartIndex(int startIndex) Set the index into mElements where the line would start after this break. -
getTotalDemerits
public long getTotalDemerits()The demerits of the rest of the paragraph or page starting at this break. -
setTotalDemerits
public void setTotalDemerits(long totalDemerits) Set the demerits of the rest of the paragraph or page starting at this break. -
getPreviousBreakpoint
The previous breakpoint in the paragraph or page assuming we're selected as a breakpoint. -
setPreviousBreakpoint
Set the previous breakpoint in the paragraph or page assuming we're selected as a breakpoint. -
setCounter
public void setCounter(int counter) Set the counter (line or page number) for this chunk. If the chunk covers multiple pages, the counters should point to the last one. -
getChunk
The chunk of the line or page ending at this breakpoint. -
setChunk
Set the chunk of the line or page ending at this breakpoint.
-