|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.visualization.svg.SVGPlot
public class SVGPlot
Base class for SVG plots. Provides some basic functionality such as element creation, axis plotting, markers and number formatting for SVG.
| Field Summary | |
|---|---|
private CSSClassManager |
cssman
CSS class manager |
private Element |
defs
Definitions element of the document. |
private org.w3c.dom.svg.SVGDocument |
document
SVG document we plot to. |
private HashMap<String,WeakReference<Element>> |
objWithId
Manage objects with an id. |
private Element |
root
Root element of the document. |
private Element |
style
Primary style information |
| Constructor Summary | |
|---|---|
SVGPlot()
Create a new plotting document. |
|
| Method Summary | |
|---|---|
protected Collection<String> |
getAllIds()
Get all used DOM Ids in this plot. |
CSSClassManager |
getCSSClassManager()
Get the plots CSS class manager. |
Element |
getDefs()
Getter for definitions section |
org.w3c.dom.svg.SVGDocument |
getDocument()
Retrieve the SVG document. |
Element |
getIdElement(String id)
Get an element by its id. |
Element |
getRoot()
Getter for definitions section |
Element |
getStyle()
Deprecated. Contents will be overwritten by CSS class manager! |
void |
putIdElement(String id,
Element obj)
Add an object id. |
void |
saveAsEPS(File file)
Transcode file to EPS. |
void |
saveAsJPEG(File file,
int width,
int height)
Transcode file to JPEG. |
void |
saveAsJPEG(File file,
int width,
int height,
double quality)
Transcode file to JPEG. |
void |
saveAsPDF(File file)
Transcode file to PDF. |
void |
saveAsPNG(File file,
int width,
int height)
Transcode file to PNG. |
void |
saveAsPS(File file)
Transcode file to PS. |
void |
saveAsSVG(File file)
Save document into a SVG file. |
Element |
svgElement(String name)
Create a SVG element in the SVG namespace. |
protected void |
transcode(File file,
org.apache.batik.transcoder.Transcoder transcoder)
Transcode a document into a file using the given transcoder. |
void |
updateStyleElement()
Update style element - invoke this appropriately after any change to the CSS styles. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.w3c.dom.svg.SVGDocument document
private Element root
private Element defs
private Element style
private CSSClassManager cssman
private HashMap<String,WeakReference<Element>> objWithId
| Constructor Detail |
|---|
public SVGPlot()
| Method Detail |
|---|
public Element svgElement(String name)
name - node name
public org.w3c.dom.svg.SVGDocument getDocument()
public Element getRoot()
public Element getDefs()
@Deprecated public Element getStyle()
public CSSClassManager getCSSClassManager()
updateStyleElement() to make changes
take effect.
public void updateStyleElement()
public void saveAsSVG(File file)
throws IOException,
TransformerFactoryConfigurationError,
TransformerException
file - Output filename
IOException - On write errors
TransformerFactoryConfigurationError
TransformerException
protected void transcode(File file,
org.apache.batik.transcoder.Transcoder transcoder)
throws IOException,
org.apache.batik.transcoder.TranscoderException
file - Output filetranscoder - Transcoder to use
IOException - On write errors
org.apache.batik.transcoder.TranscoderException - On input/parsing errors
public void saveAsPDF(File file)
throws IOException,
org.apache.batik.transcoder.TranscoderException
file - Output filename
IOException - On write errors
org.apache.batik.transcoder.TranscoderException - On input/parsing errors.
public void saveAsPS(File file)
throws IOException,
org.apache.batik.transcoder.TranscoderException
file - Output filename
IOException - On write errors
org.apache.batik.transcoder.TranscoderException - On input/parsing errors.
public void saveAsEPS(File file)
throws IOException,
org.apache.batik.transcoder.TranscoderException
file - Output filename
IOException - On write errors
org.apache.batik.transcoder.TranscoderException - On input/parsing errors.
public void saveAsPNG(File file,
int width,
int height)
throws IOException,
org.apache.batik.transcoder.TranscoderException
file - Output filenamewidth - Widthheight - Height
IOException - On write errors
org.apache.batik.transcoder.TranscoderException - On input/parsing errors.
public void saveAsJPEG(File file,
int width,
int height,
double quality)
throws IOException,
org.apache.batik.transcoder.TranscoderException
file - Output filenamewidth - Widthheight - Heightquality - JPEG quality setting, between 0.0 and 1.0
IOException - On write errors
org.apache.batik.transcoder.TranscoderException - On input/parsing errors.
public void saveAsJPEG(File file,
int width,
int height)
throws IOException,
org.apache.batik.transcoder.TranscoderException
file - Output filenamewidth - Widthheight - Height
IOException - On write errors
org.apache.batik.transcoder.TranscoderException - On input/parsing errors.
public void putIdElement(String id,
Element obj)
id - IDobj - Elementpublic Element getIdElement(String id)
id - ID
protected Collection<String> getAllIds()
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||