Graph_IO
Class EpsDocument

java.lang.Object
  extended by Graph_IO.EpsDocument

public class EpsDocument
extends java.lang.Object


Field Summary
private  java.io.BufferedWriter _bufferedWriter
           
private  boolean _isClipSet
           
private  EpsGraphics2D _lastG
           
private  java.io.StringWriter _stringWriter
           
private  java.lang.String _title
           
private  float maxX
           
private  float maxY
           
private  float minX
           
private  float minY
           
 
Constructor Summary
EpsDocument(java.lang.String title)
          Constructs an empty EpsDevice.
EpsDocument(java.lang.String title, java.io.OutputStream outputStream, int minX, int minY, int maxX, int maxY)
          Constructs an empty EpsDevice that writes directly to a file.
 
Method Summary
 void append(EpsGraphics2D g, java.lang.String line)
          Appends a line to the EpsDocument.
 void close()
           
 void flush()
           
 java.lang.String getTitle()
          Returns the title of the EPS document.
 boolean isClipSet()
           
 void setClipSet(boolean isClipSet)
           
 void updateBounds(double x, double y)
          Updates the bounds of the current EPS document.
 void write(java.io.Writer writer)
          Outputs the contents of the EPS document to the specified Writer, complete with headers and bounding box.
private  void writeFooter(java.io.Writer writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

minX

private float minX

minY

private float minY

maxX

private float maxX

maxY

private float maxY

_isClipSet

private boolean _isClipSet

_title

private java.lang.String _title

_stringWriter

private java.io.StringWriter _stringWriter

_bufferedWriter

private java.io.BufferedWriter _bufferedWriter

_lastG

private EpsGraphics2D _lastG
Constructor Detail

EpsDocument

public EpsDocument(java.lang.String title)
Constructs an empty EpsDevice.

Since:
0.1

EpsDocument

public EpsDocument(java.lang.String title,
                   java.io.OutputStream outputStream,
                   int minX,
                   int minY,
                   int maxX,
                   int maxY)
            throws java.io.IOException
Constructs an empty EpsDevice that writes directly to a file. Bounds must be set before use.

Throws:
java.io.IOException
Since:
0.1
Method Detail

getTitle

public java.lang.String getTitle()
Returns the title of the EPS document.

Since:
0.1

updateBounds

public void updateBounds(double x,
                         double y)
Updates the bounds of the current EPS document.

Since:
0.1

append

public void append(EpsGraphics2D g,
                   java.lang.String line)
Appends a line to the EpsDocument. A new line character is added to the end of the line when it is added.

Since:
0.1

write

public void write(java.io.Writer writer)
           throws java.io.IOException
Outputs the contents of the EPS document to the specified Writer, complete with headers and bounding box.

Throws:
java.io.IOException
Since:
0.1

writeFooter

private void writeFooter(java.io.Writer writer)
                  throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

isClipSet

public boolean isClipSet()

setClipSet

public void setClipSet(boolean isClipSet)