com.panayotis.gnuplot.terminal
Class ExpandableTerminal

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
All Implemented Interfaces:
GNUPlotTerminal, java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.String>
Direct Known Subclasses:
CustomTerminal, FileTerminal

public abstract class ExpandableTerminal
extends PropertiesHolder
implements GNUPlotTerminal

This is the base class of all special terminals found in JavaPlot. It provides support for terminal types and consumes unwanted gnuplot output.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.panayotis.gnuplot.PropertiesHolder
NL
 
Constructor Summary
ExpandableTerminal(java.lang.String type)
          Create a new Terminal with a given type
 
Method Summary
 java.lang.String getType()
          Get the type of this terminal
 java.lang.String processOutput(java.io.InputStream stdout)
          This method only consumes gnuplot stdout input stream.
 
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 com.panayotis.gnuplot.terminal.GNUPlotTerminal
getOutputFile
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

ExpandableTerminal

public ExpandableTerminal(java.lang.String type)
Create a new Terminal with a given type

Parameters:
type - The terminal to use
Method Detail

getType

public java.lang.String getType()
Get the type of this terminal

Specified by:
getType in interface GNUPlotTerminal
Returns:
String representation of this terminal type

processOutput

public java.lang.String processOutput(java.io.InputStream stdout)
This method only consumes gnuplot stdout input stream. It is performed to prevent a possible thread lockup.

Specified by:
processOutput in interface GNUPlotTerminal
Parameters:
stdout - The output of GNUPlot. It will be consumed.
Returns:
The definition of the error, if something went wrong. If everything is OK, it is necessary to return null.