com.tensegrity.graph.view.image
Class ImageExportViewConfigurator

java.lang.Object
  extended bycom.tensegrity.graph.view.image.ImageExportViewConfigurator

public class ImageExportViewConfigurator
extends java.lang.Object

The class ImageExportViewConfigurator is used to configure a VisualGraphView before it is rendered to an image using an implementation of ImageExporter.

An instance of this class is created by passing a valid instance of ImageExportConfiguration to the constructor.

This class is usually used by an ImageExporter where the method prepareView(VisualGraphView) is called before and the method resetView(VisualGraphView) is called after the image has been rendered.

Author:
BurkhardWick

Constructor Summary
ImageExportViewConfigurator(ImageExportConfiguration config)
          Constructor
 
Method Summary
 ImageExportConfiguration getConfiguration()
          Returns the configuration registered to this instance.
 Size prepareView(VisualGraphView visualgraphview)
          Prepares the view to be rendered to an image using the registered configuration.
 void resetView(VisualGraphView visualgraphview)
          Resets the view to it's former state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageExportViewConfigurator

public ImageExportViewConfigurator(ImageExportConfiguration config)
Constructor

Parameters:
config - The configuration to use
Method Detail

prepareView

public Size prepareView(VisualGraphView visualgraphview)
Prepares the view to be rendered to an image using the registered configuration. The transformation is calculated here, too.

Parameters:
visualgraphview - The VisualGraphView to prepare
Returns:
The size of the image that should be rendered

resetView

public void resetView(VisualGraphView visualgraphview)
Resets the view to it's former state. Must be called if prepareView(VisualGraphView) has been called!

Parameters:
visualgraphview - The VisualGraphView that has been previously altered by prepareView(VisualGraphView)

getConfiguration

public ImageExportConfiguration getConfiguration()
Returns the configuration registered to this instance.

Returns:
the configuration registered to this instance.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.