com.panayotis.gnuplot.terminal
Class ImageTerminal

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.String>
          extended by com.panayotis.gnuplot.PropertiesHolder
              extended by com.panayotis.gnuplot.terminal.ExpandableTerminal
                  extended by com.panayotis.gnuplot.terminal.FileTerminal
                      extended by com.panayotis.gnuplot.terminal.ImageTerminal
All Implemented Interfaces:
GNUPlotTerminal, java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.String>

public class ImageTerminal
extends FileTerminal

This terminal is able to process gnuplot output as an image. The image produced can be used by any Java object which is able to handle BufferedImage

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.panayotis.gnuplot.PropertiesHolder
NL
 
Constructor Summary
ImageTerminal()
          Create a new image terminal, and use PNG as it's backend
 
Method Summary
 java.awt.image.BufferedImage getImage()
          Get a handler of the produced image by this terminal
 java.lang.String processOutput(java.io.InputStream stdout)
          Read the produced image from gnuplot standard output
 
Methods inherited from class com.panayotis.gnuplot.terminal.FileTerminal
getOutputFile
 
Methods inherited from class com.panayotis.gnuplot.terminal.ExpandableTerminal
getType
 
Methods inherited from class com.panayotis.gnuplot.PropertiesHolder
appendProperties, set, set, unset
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

ImageTerminal

public ImageTerminal()
Create a new image terminal, and use PNG as it's backend

Method Detail

processOutput

public java.lang.String processOutput(java.io.InputStream stdout)
Read the produced image from gnuplot standard output

Specified by:
processOutput in interface GNUPlotTerminal
Overrides:
processOutput in class ExpandableTerminal
Parameters:
stdout - The gnuplot output stream
Returns:
The error definition, if any

getImage

public java.awt.image.BufferedImage getImage()
Get a handler of the produced image by this terminal

Returns:
the plot image