org.faceless.graph2.tag
Class FlashEmbedder

java.lang.Object
  extended by org.faceless.graph2.tag.Embedder
      extended by org.faceless.graph2.tag.FlashEmbedder

public class FlashEmbedder
extends Embedder

A Embedder that creates a Flash (SWF) format graph, using the FlashOutput class.

Since:
2.4

Field Summary
 
Fields inherited from class org.faceless.graph2.tag.Embedder
ACTIONS
 
Constructor Summary
FlashEmbedder()
           
 
Method Summary
 void convert()
          Convert the object returned by Embedder.getGraph() to an appropriate binary form, write it to Embedder.getImageOutputStream() and write the HTML required to embed it to Embedder.getPageWriter(), referencing the image at Embedder.getImagePath().
 String getMIMEType()
          Get the MIME type for the image that will be written by this Embedder to Embedder.getImageOutputStream()
 
Methods inherited from class org.faceless.graph2.tag.Embedder
getAction, getActionKeys, getAttribute, getAttributes, getFont, getFonts, getForeignXML, getGraph, getHeight, getId, getImageOutputStream, getImagePath, getPageResources, getPageWriter, getPaint, getWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlashEmbedder

public FlashEmbedder()
Method Detail

getMIMEType

public String getMIMEType()
Description copied from class: Embedder
Get the MIME type for the image that will be written by this Embedder to Embedder.getImageOutputStream()

Specified by:
getMIMEType in class Embedder

convert

public void convert()
             throws IOException
Description copied from class: Embedder
Convert the object returned by Embedder.getGraph() to an appropriate binary form, write it to Embedder.getImageOutputStream() and write the HTML required to embed it to Embedder.getPageWriter(), referencing the image at Embedder.getImagePath(). At it's very minimum it could look something like this:
  ImageOutput output = new ImageOutput();
  getGraph().draw(output);
  output.writePNG(getImageOutputStream(), 0);
  getPageWriter().write("<img src='"+getImagePath()+"' />");
 
which is suitable for embedding an image with no mouse interaction.

Specified by:
convert in class Embedder
Throws:
IOException


Copyright © 2001-2011 Big Faceless Organization