com.panayotis.gnuplot.terminal
Class ImageTerminal

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,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, Serializable, Cloneable, Map<String,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

Author:
teras
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
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
 BufferedImage getImage()
          Get a handler of the produced image by this terminal
 String processOutput(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 String processOutput(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 BufferedImage getImage()
Get a handler of the produced image by this terminal

Returns:
the plot image


Copyright © 2013. All Rights Reserved.