Gephi Toolkit Javadoc

org.gephi.preview
Class PDFRenderTargetBuilder.PDFRenderTargetImpl

java.lang.Object
  extended by org.gephi.preview.AbstractRenderTarget
      extended by org.gephi.preview.PDFRenderTargetBuilder.PDFRenderTargetImpl
All Implemented Interfaces:
PDFTarget, RenderTarget, LongTask
Enclosing class:
PDFRenderTargetBuilder

public static class PDFRenderTargetBuilder.PDFRenderTargetImpl
extends AbstractRenderTarget
implements PDFTarget


Field Summary
 
Fields inherited from class org.gephi.preview.AbstractRenderTarget
cancel, progressTicket
 
Fields inherited from interface org.gephi.preview.api.PDFTarget
LANDSCAPE, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT, MARGIN_TOP, PAGESIZE, PDF_CONTENT_BYTE
 
Fields inherited from interface org.gephi.preview.api.RenderTarget
PDF_TARGET, PROCESSING_TARGET, SVG_TARGET
 
Constructor Summary
PDFRenderTargetBuilder.PDFRenderTargetImpl(PdfContentByte cb, double width, double height, double topLeftX, double topLeftY, Rectangle size, float marginLeft, float marginRight, float marginTop, float marginBottom, boolean landscape)
           
 
Method Summary
 BaseFont getBaseFont(java.awt.Font font)
          Get a the equivalent in iText of the Java font.
 PdfContentByte getContentByte()
          Returns the PDFContentBype instance of the PDFTarget.
 float getMarginBottom()
          Returns the margin at the bottom of the page.
 float getMarginLeft()
          Returns the margin at the left of the page.
 float getMarginRight()
          Returns the margin at the right of the page.
 float getMarginTop()
          Returns the margin at the top of the page.
 Rectangle getPageSize()
          Returns the page's size.
 boolean isLandscape()
          Returns whether the orientation is in landscape or portrait.
 
Methods inherited from class org.gephi.preview.AbstractRenderTarget
cancel, getProgressTicket, isCancelled, setProgressTicket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFRenderTargetBuilder.PDFRenderTargetImpl

public PDFRenderTargetBuilder.PDFRenderTargetImpl(PdfContentByte cb,
                                                  double width,
                                                  double height,
                                                  double topLeftX,
                                                  double topLeftY,
                                                  Rectangle size,
                                                  float marginLeft,
                                                  float marginRight,
                                                  float marginTop,
                                                  float marginBottom,
                                                  boolean landscape)
Method Detail

getContentByte

public PdfContentByte getContentByte()
Description copied from interface: PDFTarget
Returns the PDFContentBype instance of the PDFTarget. PDFContentByte offers a set of drawing functions which can be used by Renderer objects.

Specified by:
getContentByte in interface PDFTarget
Returns:
a PDFContentBype object

getBaseFont

public BaseFont getBaseFont(java.awt.Font font)
Description copied from interface: PDFTarget
Get a the equivalent in iText of the Java font. Base fonts are either Type 1 fonts (PDF default's font) or valid system fonts. The first time a base font which is not a Type 1 is requested the system will register the system fonts in order to find the right font. This might take some time up to a minute.

If font can't be found in iText's default fonts or registered fonts it returns the default Helvetica font.

Specified by:
getBaseFont in interface PDFTarget
Parameters:
font - the reference Java font
Returns:
the iText BaseFont, or Helvetica is not found

getMarginBottom

public float getMarginBottom()
Description copied from interface: PDFTarget
Returns the margin at the bottom of the page.

Specified by:
getMarginBottom in interface PDFTarget
Returns:
the bottom margin, in pixels

getMarginLeft

public float getMarginLeft()
Description copied from interface: PDFTarget
Returns the margin at the left of the page.

Specified by:
getMarginLeft in interface PDFTarget
Returns:
the left margin, in pixels

getMarginRight

public float getMarginRight()
Description copied from interface: PDFTarget
Returns the margin at the right of the page.

Specified by:
getMarginRight in interface PDFTarget
Returns:
the right margin, in pixels

getMarginTop

public float getMarginTop()
Description copied from interface: PDFTarget
Returns the margin at the top of the page.

Specified by:
getMarginTop in interface PDFTarget
Returns:
the top margin, in pixels

isLandscape

public boolean isLandscape()
Description copied from interface: PDFTarget
Returns whether the orientation is in landscape or portrait.

Specified by:
isLandscape in interface PDFTarget
Returns:
true if the orientation is landscape, false if portrait.

getPageSize

public Rectangle getPageSize()
Description copied from interface: PDFTarget
Returns the page's size.

Specified by:
getPageSize in interface PDFTarget
Returns:
the page size

Gephi Toolkit Javadoc