Class ElementList.Breakpoint

java.lang.Object
com.teamten.typeset.ElementList.Breakpoint
Enclosing class:
ElementList

protected static class ElementList.Breakpoint extends Object
Keeps track of possible breakpoints in our paragraph or page, their penalty, and their effects on the whole paragraph or page.
  • 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

      public ElementList.Breakpoint getPreviousBreakpoint()
      The previous breakpoint in the paragraph or page assuming we're selected as a breakpoint.
    • setPreviousBreakpoint

      public void setPreviousBreakpoint(ElementList.Breakpoint previousBreakpoint)
      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

      public Chunk getChunk()
      The chunk of the line or page ending at this breakpoint.
    • setChunk

      public void setChunk(Chunk chunk)
      Set the chunk of the line or page ending at this breakpoint.