Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 1.5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xmlgraphics.ps
Class FormGenerator

    java.lang.Object
      org.apache.xmlgraphics.ps.FormGenerator

Direct Known Subclasses:
  ImageFormGenerator

    public abstract class FormGenerator

extends Object

Abstract helper class for generating PostScript forms.

Constructor Summary
`FormGenerator(String formName, String title, Dimension2D dimensions)` Main constructor.

Method Summary
`PSResource` | `generate(PSGenerator gen)` Generates the PostScript form.
`protected void` | `generateAdditionalDataStream(PSGenerator gen)` Generates some PostScript code right after the form definition (used primarily for bitmap data).
`protected abstract void` | `generatePaintProc(PSGenerator gen)` Generates the PostScript code for the PaintProc of the form.
`protected Rectangle2D` | `getBBox()` Returns the form's bounding box.
`Dimension2D` | `getDimensions()` returns the form's dimensions.
`String` | `getFormName()` Returns the form's name.
`protected AffineTransform` | `getMatrix()` Returns the matrix for use in the form.
`String` | `getTitle()` Returns the form's title.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FormGenerator

    public FormGenerator(String formName,
                         String title,
                         Dimension2D dimensions)

  Main constructor.

  Parameters:
    `formName` - the form's name
    `title` - the form's title or null
    `dimensions` - the form's dimensions

Method Detail

### getFormName

    public String getFormName()

  Returns the form's name.

  Returns:
    the form's name

### getTitle

    public String getTitle()

  Returns the form's title.

  Returns:
    the form's title or null if there's no title

### getDimensions

    public Dimension2D getDimensions()

  returns the form's dimensions.

  Returns:
    the form's dimensions

### generatePaintProc

    protected abstract void generatePaintProc(PSGenerator gen)
                                       throws IOException

  Generates the PostScript code for the PaintProc of the form.

  Parameters:
    `gen` - the PostScript generator
  Throws:
    `IOException` - if an I/O error occurs

### generateAdditionalDataStream

    protected void generateAdditionalDataStream(PSGenerator gen)
                                         throws IOException

  Generates some PostScript code right after the form definition (used primarily for bitmap data).

  Parameters:
    `gen` - the PostScript generator
  Throws:
    `IOException` - if an I/O error occurs

### getMatrix

    protected AffineTransform getMatrix()

  Returns the matrix for use in the form.

  Returns:
    the matrix

### getBBox

    protected Rectangle2D getBBox()

  Returns the form's bounding box.

  Returns:
    the form's bounding box

### generate

    public PSResource generate(PSGenerator gen)
                        throws IOException

  Generates the PostScript form.

  Parameters:
    `gen` - the PostScript generator
  Returns:
    a PSResource instance representing the form
  Throws:
    `IOException` - if an I/O error occurs

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 1.5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.