Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfclown.documents.contents.xObjects
Class FormXObject

    java.lang.Object
      org.pdfclown.objects.PdfObjectWrapper<PdfStream>
          org.pdfclown.documents.contents.xObjects.XObject
              org.pdfclown.documents.contents.xObjects.FormXObject

All Implemented Interfaces:
  Cloneable, IContentContext, IContentEntity, ILayerable, IPdfObjectWrapper

    @PDF(value=PDF10)
    public final class FormXObject

extends XObject
implements IContentContext

Form external object [PDF:1.6:4.9].

Version:
  0.1.2, 12/21/12
Author:
  Stefano Chizzolini (http://www.stefanochizzolini.it)

Constructor Summary
`FormXObject(Document context, Dimension2D size)` Creates a new form within the specified document context.
`FormXObject(Document context, Rectangle2D box)` Creates a new form within the specified document context.

Method Summary
`FormXObject` | `clone(Document context)` Gets a clone of the object, registered inside the given document context.
`Rectangle2D` | `getBox()` Gets the bounding box associated with this content context either explicitly (directly associated to the object) or (if not explicitly available) implicitly (inherited from a higher level object), expressed in default user-space units.
`Contents` | `getContents()` Gets the contents collection representing the content stream associated with this content context.
`AffineTransform` | `getMatrix()` Gets the mapping from external-object space to user space.
`Resources` | `getResources()` Gets the resources associated with this content context either explicitly (directly associated to the object) or (if not explicitly available) implicitly (inherited from a higher-level object).
`RotationEnum` | `getRotation()` Gets the rendering rotation of this content context.
`Dimension2D` | `getSize()` Gets the form size.
`void` | `render(Graphics2D context, Dimension2D size)` Renders this content context into the specified rendering context.
`void` | `setBox(Rectangle2D value)`
`void` | `setMatrix(AffineTransform value)`
`void` | `setResources(Resources value)`
`void` | `setSize(Dimension2D value)`
`ContentObject` | `toInlineObject(PrimitiveComposer composer)` Converts this entity to its equivalent inline (dependent) object representation [PDF:1.6:4.8.6].
`XObject` | `toXObject(Document context)` Converts this entity to its equivalent external (independent) object representation [PDF:1.6:4.7].
`static FormXObject` | `wrap(PdfDirectObject baseObject)`

Methods inherited from class org.pdfclown.documents.contents.xObjects.XObject
`getLayer, setLayer`

Methods inherited from class org.pdfclown.objects.PdfObjectWrapper
`checkCompatibility, delete, equals, exists, getBaseDataObject, getBaseObject, getBaseObject, getContainer, getDataContainer, getDocument, getFile, getMetadata, retrieveName, retrieveNamedBaseObject, setBaseObject, setMetadata`

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

Constructor Detail

### FormXObject

    public FormXObject(Document context,
                       Dimension2D size)

  Creates a new form within the specified document context.

  Parameters:
    `context` - Document where to place this form.
    `size` - Form size.

### FormXObject

    public FormXObject(Document context,
                       Rectangle2D box)

  Creates a new form within the specified document context.

  Parameters:
    `context` - Document where to place this form.
    `box` - Form box.

Method Detail

### wrap

    public static FormXObject wrap(PdfDirectObject baseObject)

### clone

    public FormXObject clone(Document context)

  Description copied from class: `PdfObjectWrapper`
  Gets a clone of the object, registered inside the given document context.

  Overrides:
    `clone` in class `PdfObjectWrapper<PdfStream>`
  Parameters:
    `context` - Which document the clone has to be registered in.

### getMatrix

    public AffineTransform getMatrix()

  Description copied from class: `XObject`
  Gets the mapping from external-object space to user space.

  Specified by:
    `getMatrix` in class `XObject`

### getSize

    public Dimension2D getSize()

  Gets the form size.

  Specified by:
    `getSize` in class `XObject`

### setBox

    public void setBox(Rectangle2D value)

  See Also:
    `getBox()`

### setMatrix

    public void setMatrix(AffineTransform value)

  Specified by:
    `setMatrix` in class `XObject`
  See Also:
    `XObject.getMatrix()`

### setResources

    public void setResources(Resources value)

  See Also:
    `getResources()`

### setSize

    public void setSize(Dimension2D value)

  Specified by:
    `setSize` in class `XObject`
  See Also:
    `getSize()`

### getBox

    public Rectangle2D getBox()

  Description copied from interface: `IContentContext`
  Gets the bounding box associated with this content context either explicitly (directly associated to the object) or (if not explicitly available) implicitly (inherited from a higher level object), expressed in default user-space units.

  Specified by:
    `getBox` in interface `IContentContext`

### getContents

    public Contents getContents()

  Description copied from interface: `IContentContext`
  Gets the contents collection representing the content stream associated with this content context.

  Specified by:
    `getContents` in interface `IContentContext`

### getResources

    public Resources getResources()

  Description copied from interface: `IContentContext`
  Gets the resources associated with this content context either explicitly (directly associated to the object) or (if not explicitly available) implicitly (inherited from a higher-level object).

  The implementing class MUST ensure that the returned object isn't `null`.

  Specified by:
    `getResources` in interface `IContentContext`

### getRotation

    public RotationEnum getRotation()

  Description copied from interface: `IContentContext`
  Gets the rendering rotation of this content context.

  Specified by:
    `getRotation` in interface `IContentContext`

### render

    public void render(Graphics2D context,
                       Dimension2D size)

  Description copied from interface: `IContentContext`
  Renders this content context into the specified rendering context.

  Specified by:
    `render` in interface `IContentContext`
  Parameters:
    `context` - Rendering context.
    `size` - Rendering canvas size.

### toInlineObject

    public ContentObject toInlineObject(PrimitiveComposer composer)

  Description copied from interface: `IContentEntity`
  Converts this entity to its equivalent inline (dependent) object representation [PDF:1.6:4.8.6].

  This method creates and shows an inline object within the target content context, returning it.

  Due to its direct-content nature (opposite to the indirect-content nature of external objects (see `IContentEntity.toXObject(Document)`)), the resulting object should be shown only one time in order not to wastefully duplicate its data.

  Specified by:
    `toInlineObject` in interface `IContentEntity`
  Parameters:
    `composer` - Target content composer.
  Returns:
    The inline object representing the entity.

### toXObject

    public XObject toXObject(Document context)

  Description copied from interface: `IContentEntity`
  Converts this entity to its equivalent external (independent) object representation [PDF:1.6:4.7].

  This method creates an external object within the target document, returning it. To show it in a content context (for example: a page), then it must be applied in an appropriate manner (see `PrimitiveComposer` object).

  Specified by:
    `toXObject` in interface `IContentEntity`
  Parameters:
    `context` - Target document.
  Returns:
    The external object representing the entity.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| PDF Clown 0.1.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Project home page
Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.