Flying Saucer Project Release ${app.version}

org.xhtmlrenderer.render
Class RenderingContext

java.lang.Object
  extended by org.xhtmlrenderer.render.RenderingContext
All Implemented Interfaces:
CssContext

public class RenderingContext
extends java.lang.Object
implements CssContext

Supplies information about the context in which rendering will take place

Author:
jmarinacci November 16, 2004

Constructor Summary
RenderingContext(SharedContext sharedContext)
          

needs a new instance every run

 
Method Summary
 boolean debugDrawBoxes()
           
 boolean debugDrawFontMetrics()
           
 boolean debugDrawInlineBoxes()
           
 boolean debugDrawLineBoxes()
           
 java.lang.String getBaseURL()
           
 Box getBoxById(java.lang.String id)
           
 RootPanel getCanvas()
           
 StyleReference getCss()
           
 int getDotsPerPixel()
           
 float getDPI()
           
 java.awt.Rectangle getFixedRectangle()
           
 FSFont getFont(FontSpecification font)
           
 FontContext getFontContext()
           
 FontResolver getFontResolver()
           
 float getFontSize2D(FontSpecification font)
           
 FSFontMetrics getFSFontMetrics(FSFont font)
           
 int getInitialPageNo()
           
 float getMmPerDot()
           
 OutputDevice getOutputDevice()
           
 PageBox getPage()
           
 int getPageCount()
           
 int getPageNo()
           
 Layer getRootLayer()
           
 TextRenderer getTextRenderer()
           
 UserAgentCallback getUac()
           
 java.awt.Rectangle getViewportRectangle()
           
 float getXHeight(FontSpecification parentFont)
           
 boolean isInteractive()
           
 boolean isPaged()
          Returns true if the currently set media type is paged.
 boolean isPrint()
           
 void setBaseURL(java.lang.String url)
           
 void setContext(SharedContext sharedContext)
           
 void setFontContext(FontContext fontContext)
           
 void setInitialPageNo(int initialPageNo)
           
 void setOutputDevice(OutputDevice outputDevice)
           
 void setPage(int pageNo, PageBox page)
           
 void setPageCount(int pageCount)
           
 void setRootLayer(Layer rootLayer)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderingContext

public RenderingContext(SharedContext sharedContext)

needs a new instance every run

Method Detail

setContext

public void setContext(SharedContext sharedContext)

setBaseURL

public void setBaseURL(java.lang.String url)

getUac

public UserAgentCallback getUac()

getBaseURL

public java.lang.String getBaseURL()

getDPI

public float getDPI()

getMmPerDot

public float getMmPerDot()
Specified by:
getMmPerDot in interface CssContext

getDotsPerPixel

public int getDotsPerPixel()
Specified by:
getDotsPerPixel in interface CssContext

getFontSize2D

public float getFontSize2D(FontSpecification font)
Specified by:
getFontSize2D in interface CssContext

getXHeight

public float getXHeight(FontSpecification parentFont)
Specified by:
getXHeight in interface CssContext

getTextRenderer

public TextRenderer getTextRenderer()

isPaged

public boolean isPaged()
Returns true if the currently set media type is paged. Currently returns true only for print , projection , and embossed , handheld , and tv . See the media section of the CSS 2.1 spec for more information on media types.

Returns:
The paged value

getFontResolver

public FontResolver getFontResolver()

getFont

public FSFont getFont(FontSpecification font)
Specified by:
getFont in interface CssContext

getCanvas

public RootPanel getCanvas()

getFixedRectangle

public java.awt.Rectangle getFixedRectangle()

getViewportRectangle

public java.awt.Rectangle getViewportRectangle()

debugDrawBoxes

public boolean debugDrawBoxes()

debugDrawLineBoxes

public boolean debugDrawLineBoxes()

debugDrawInlineBoxes

public boolean debugDrawInlineBoxes()

debugDrawFontMetrics

public boolean debugDrawFontMetrics()

isInteractive

public boolean isInteractive()

isPrint

public boolean isPrint()

getOutputDevice

public OutputDevice getOutputDevice()

setOutputDevice

public void setOutputDevice(OutputDevice outputDevice)

getFontContext

public FontContext getFontContext()

setFontContext

public void setFontContext(FontContext fontContext)

setPage

public void setPage(int pageNo,
                    PageBox page)

getPageCount

public int getPageCount()

setPageCount

public void setPageCount(int pageCount)

getPage

public PageBox getPage()

getPageNo

public int getPageNo()

getCss

public StyleReference getCss()
Specified by:
getCss in interface CssContext

getFSFontMetrics

public FSFontMetrics getFSFontMetrics(FSFont font)
Specified by:
getFSFontMetrics in interface CssContext

getRootLayer

public Layer getRootLayer()

setRootLayer

public void setRootLayer(Layer rootLayer)

getInitialPageNo

public int getInitialPageNo()

setInitialPageNo

public void setInitialPageNo(int initialPageNo)

getBoxById

public Box getBoxById(java.lang.String id)

Flying Saucer Project Release ${app.version}

Flying Saucer Project Home