Gephi Toolkit Javadoc

org.gephi.preview.api
Interface PDFTarget

All Superinterfaces:
RenderTarget
All Known Implementing Classes:
PDFRenderTargetBuilder.PDFRenderTargetImpl

public interface PDFTarget
extends RenderTarget

Rendering target to PDF format.

This target is used by renderers objects to render a graph to PDF and uses the iText Java library.

The target give access to the PDFContentBype object from itext to draw items.

When this target is instanciated it uses property values defined in the PreviewProperties. Namely is uses MARGIN_LEFT, MARGIN_TOP, MARGIN_BOTTOM, MARGIN_RIGHT, LANDCAPE and PAGESIZE.

Author:
Yudi Xue, Mathieu Bastian

Field Summary
static java.lang.String LANDSCAPE
           
static java.lang.String MARGIN_BOTTOM
           
static java.lang.String MARGIN_LEFT
           
static java.lang.String MARGIN_RIGHT
           
static java.lang.String MARGIN_TOP
           
static java.lang.String PAGESIZE
           
static java.lang.String PDF_CONTENT_BYTE
           
 
Fields inherited from interface org.gephi.preview.api.RenderTarget
PDF_TARGET, PROCESSING_TARGET, SVG_TARGET
 
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.
 

Field Detail

PDF_CONTENT_BYTE

static final java.lang.String PDF_CONTENT_BYTE
See Also:
Constant Field Values

MARGIN_LEFT

static final java.lang.String MARGIN_LEFT
See Also:
Constant Field Values

MARGIN_TOP

static final java.lang.String MARGIN_TOP
See Also:
Constant Field Values

MARGIN_BOTTOM

static final java.lang.String MARGIN_BOTTOM
See Also:
Constant Field Values

MARGIN_RIGHT

static final java.lang.String MARGIN_RIGHT
See Also:
Constant Field Values

LANDSCAPE

static final java.lang.String LANDSCAPE
See Also:
Constant Field Values

PAGESIZE

static final java.lang.String PAGESIZE
See Also:
Constant Field Values
Method Detail

getContentByte

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

Returns:
a PDFContentBype object

getBaseFont

BaseFont getBaseFont(java.awt.Font font)
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.

Parameters:
font - the reference Java font
Returns:
the iText BaseFont, or Helvetica is not found

getMarginBottom

float getMarginBottom()
Returns the margin at the bottom of the page.

Returns:
the bottom margin, in pixels

getMarginLeft

float getMarginLeft()
Returns the margin at the left of the page.

Returns:
the left margin, in pixels

getMarginRight

float getMarginRight()
Returns the margin at the right of the page.

Returns:
the right margin, in pixels

getMarginTop

float getMarginTop()
Returns the margin at the top of the page.

Returns:
the top margin, in pixels

isLandscape

boolean isLandscape()
Returns whether the orientation is in landscape or portrait.

Returns:
true if the orientation is landscape, false if portrait.

getPageSize

Rectangle getPageSize()
Returns the page's size.

Returns:
the page size

Gephi Toolkit Javadoc