Class BasicRenderParameters

java.lang.Object
com.levigo.jadice.web.client.tool.BasicRenderParameters
Direct Known Subclasses:
RenderParameters

public class BasicRenderParameters extends Object
A base class used to provide several parameters for rendering purposes.
  • Field Details

    • page

      protected final Page page
    • pageIndex

      protected final int pageIndex
    • renderedPageBounds

      protected final Rectangle renderedPageBounds
    • renderControls

      protected final RenderControls renderControls
    • graphics

      protected final com.levigo.jadice.web.client.util.internal.graphics.JadiceGraphics graphics
  • Constructor Details

    • BasicRenderParameters

      public BasicRenderParameters(Page page, int pageIndex, Rectangle bounds, com.levigo.jadice.web.client.util.internal.graphics.JadiceGraphics graphics, RenderControls renderControls)
      Constructor
      Parameters:
      page - the page that is being rendered
      pageIndex - a zero based page index of the rendered page
      bounds - the size of the page which is being rendered.
      graphics - a Graphics2D object into which the rendering can be done
      renderControls - rendering controls used to render the page
  • Method Details

    • getPage

      public Page getPage()
      The Page that is being rendered.
      Returns:
      the page
    • getPageIndex

      public int getPageIndex()
      The index of the page being rendered.
      Returns:
      the pageIndex
    • getRenderSize

      public Dimension getRenderSize()
      The size at which the page is being rendered.
      Returns:
      the renderSize
    • getRenderedPageBounds

      public Rectangle getRenderedPageBounds()
      Return the rendered page's bounds without the page offset. Please note that the accompanying graphics context is already translated to the bounds' origin. To get the bounds of the page with its offset call AbstractPageView.getLaidOutPageBounds(Page) for the page.If it is the current page AbstractPageView.getCurrentLaidOutPageBounds() can also be called.
      Returns:
      the bounds
    • getRenderControls

      public RenderControls getRenderControls()
      The RenderControls used to render the page.
      Returns:
      the RenderControls
    • getGraphics

      public com.levigo.jadice.web.client.util.internal.graphics.JadiceGraphics getGraphics()
      Get the Graphics2D into which the rendering is supposed to render (if it wants to). The graphics context will be transformed, so that its origin rests at the upper-left corner of the page.
      Returns:
      the graphics
    • getContext2D

      public com.google.gwt.canvas.dom.client.Context2d getContext2D()
      Gets the Context2d of the HTML5-Canvas element to render things.
      Returns:
      the context2d Object