info.aduna.linkmap.export
Class PngImageExporter

java.lang.Object
  extended by info.aduna.linkmap.export.PngImageExporter

public class PngImageExporter
extends Object

PngImageExporter is capable of exporting an image of a Graph drawn by a GraphRendering to a PNG file.


Constructor Summary
PngImageExporter(GraphRenderer renderer)
          Create a new PngImageExporter that will use the specified GraphRenderer for rendering the graph.
 
Method Summary
 void export(File file)
          Saves the image containing the graph in PNG format to the specified File.
 void export(OutputStream stream)
          Saves a PNG image to the specified OutputStream.
 Image getLogo()
          Gets the logo that is displayed on exported images.
 void setLogo(Image logo)
          Sets a logo that should be displayed on exported images.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PngImageExporter

public PngImageExporter(GraphRenderer renderer)
Create a new PngImageExporter that will use the specified GraphRenderer for rendering the graph.

Method Detail

setLogo

public void setLogo(Image logo)
Sets a logo that should be displayed on exported images. The logo must already be completely loaded.

Parameters:
logo - An pre-loaded Image of the logo that should be displayed on the exported image, or null.

getLogo

public Image getLogo()
Gets the logo that is displayed on exported images.

Returns:
An Image of the logo that is displayed, or null.

export

public void export(File file)
            throws IOException
Saves the image containing the graph in PNG format to the specified File.

Throws:
IOException

export

public void export(OutputStream stream)
            throws IOException
Saves a PNG image to the specified OutputStream.

Throws:
IOException


Copyright © 1997-2008 Aduna. All Rights Reserved.