com.davisor.graphics.chart
Class StringBufferChart

java.lang.Object
  extended bycom.davisor.graphics.chart.AbstractChart
      extended bycom.davisor.graphics.chart.StringBufferChart
All Implemented Interfaces:
Chart, java.io.Serializable

public class StringBufferChart
extends AbstractChart

StringBufferChart represents some textual chart output.

Since:
JDK1.2
See Also:
ChartAttributes, ChartData, ChartFactory, Serialized Form

Field Summary
protected  java.lang.StringBuffer M_content
          Encoded chart content.
 
Fields inherited from class com.davisor.graphics.chart.AbstractChart
M_annotatedShapes, M_contentType, M_height, M_resolution, M_width
 
Constructor Summary
StringBufferChart(java.lang.Number width, java.lang.Number height, java.lang.Number resolution, java.lang.String contentType, java.util.List annotatedShapes)
          Creates a new string buffer chart.
StringBufferChart(java.lang.Number width, java.lang.Number height, java.lang.Number resolution, java.lang.String contentType, java.util.List annotatedShapes, char[] content)
          Creates and initializes a new string buffer chart.
StringBufferChart(java.lang.Number width, java.lang.Number height, java.lang.Number resolution, java.lang.String contentType, java.util.List annotatedShapes, java.lang.String content)
          Creates and initializes a new string buffer chart.
StringBufferChart(java.lang.Number width, java.lang.Number height, java.lang.Number resolution, java.lang.String contentType, java.util.List annotatedShapes, java.lang.StringBuffer content)
          Creates and initializes a new string buffer chart.
 
Method Summary
 java.lang.StringBuffer getBuffer()
          Gets a reference to the internal string buffer.
 java.io.Reader getContent()
          Gets a new input stream containing the encoded chart image data.
 void putContent(java.io.OutputStream stream)
          Puts the chart content into given stream.
 
Methods inherited from class com.davisor.graphics.chart.AbstractChart
addAnnotatedShape, getAnnotatedShapes, getContentType, getHeight, getHeightInMillimeters, getResolution, getSizeInMillimeters, getWidth, getWidthInMillimeters, putChart, putChart, setContentType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

M_content

protected java.lang.StringBuffer M_content
Encoded chart content.

Constructor Detail

StringBufferChart

public StringBufferChart(java.lang.Number width,
                         java.lang.Number height,
                         java.lang.Number resolution,
                         java.lang.String contentType,
                         java.util.List annotatedShapes)
Creates a new string buffer chart.

Parameters:
width - chart width, in millimeters (may be null)
height - chart height, in millimeters (may be null)
resolution - resolution, in pixels-per-millimeters (may be null)
contentType - chart content encoding type (may be null)
annotatedShapes - list of annotated shapes (may be null)
See Also:
getContent()

StringBufferChart

public StringBufferChart(java.lang.Number width,
                         java.lang.Number height,
                         java.lang.Number resolution,
                         java.lang.String contentType,
                         java.util.List annotatedShapes,
                         char[] content)
Creates and initializes a new string buffer chart. In particular, the given content, if any, is copied into a new internal string buffer.

Parameters:
width - chart width, in millimeters (may be null)
height - chart height, in millimeters (may be null)
resolution - resolution, in pixels-per-millimeters (may be null)
contentType - chart content encoding type (may be null)
annotatedShapes - list of annotated shapes (may be null)
content - encoded chart content (may be null)
See Also:
getContent()

StringBufferChart

public StringBufferChart(java.lang.Number width,
                         java.lang.Number height,
                         java.lang.Number resolution,
                         java.lang.String contentType,
                         java.util.List annotatedShapes,
                         java.lang.String content)
Creates and initializes a new string buffer chart. In particular, the given content, if any, is copied into a new internal string buffer.

Parameters:
width - chart width, in millimeters (may be null)
height - chart height, in millimeters (may be null)
resolution - resolution, in pixels-per-millimeters (may be null)
contentType - chart content encoding type (may be null)
annotatedShapes - list of annotated shapes (may be null)
content - encoded chart content (may be null)
See Also:
getContent()

StringBufferChart

public StringBufferChart(java.lang.Number width,
                         java.lang.Number height,
                         java.lang.Number resolution,
                         java.lang.String contentType,
                         java.util.List annotatedShapes,
                         java.lang.StringBuffer content)
Creates and initializes a new string buffer chart. In particular, the given content, if any, becomes the internal string buffer. If content is null, a new string buffer is created instead.

Parameters:
width - chart width, in millimeters (may be null)
height - chart height, in millimeters (may be null)
resolution - resolution, in pixels-per-millimeters (may be null)
contentType - chart content encoding type (may be null)
annotatedShapes - list of annotated shapes (may be null)
content - encoded chart content (may be null)
See Also:
getContent()
Method Detail

putContent

public void putContent(java.io.OutputStream stream)
                throws java.io.IOException
Puts the chart content into given stream.

Parameters:
stream - stream to write chart content into
Throws:
java.io.IOException - if an I/O error occurs
See Also:
AbstractChart.getContentType()

getBuffer

public java.lang.StringBuffer getBuffer()
Gets a reference to the internal string buffer.


getContent

public java.io.Reader getContent()
Gets a new input stream containing the encoded chart image data.



Copyright © 2001-2004 Davisor Oy. All Rights Reserved.