net.sf.latexdraw.generators.svg
Class SVGDocumentGenerator

java.lang.Object
  extended by net.sf.latexdraw.generators.svg.SVGDocumentGenerator
All Implemented Interfaces:
ISOpenSaver

public class SVGDocumentGenerator
extends java.lang.Object
implements ISOpenSaver

Defines a generator that creates SVG documents from drawings.

This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

LaTeXDraw is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

11/11/07

Version:
3.0
Author:
Arnaud BLOUIN

Nested Class Summary
(package private)  class SVGDocumentGenerator.IOWorker
          The abstract worker that factorises the code of loading and saving workers.
(package private)  class SVGDocumentGenerator.LoadWorker
          The worker that loads SVG documents.
(package private)  class SVGDocumentGenerator.ProgressListener
          The listener that listens the progress performed by the workers to update the progress bar.
(package private)  class SVGDocumentGenerator.SaveWorker
           
 
Field Summary
static SVGDocumentGenerator INSTANCE
          The singleton that allows the save/load latexdraw SVG documents.
 
Constructor Summary
private SVGDocumentGenerator()
           
 
Method Summary
 boolean open(java.lang.String path, UI ui, MProgressBar progressBar, java.lang.Object statusBar)
          Opens the given file and sets the abstract presentations and the instruments parameters of the given UI to the given file.
 boolean save(java.lang.String path, UI ui, MProgressBar progressBar, java.lang.Object statusBar)
          Saves the abstract presentations and the instruments parameters of the given UI to the given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final SVGDocumentGenerator INSTANCE
The singleton that allows the save/load latexdraw SVG documents.

Constructor Detail

SVGDocumentGenerator

private SVGDocumentGenerator()
Method Detail

save

public boolean save(java.lang.String path,
                    UI ui,
                    MProgressBar progressBar,
                    java.lang.Object statusBar)
Description copied from interface: ISOpenSaver
Saves the abstract presentations and the instruments parameters of the given UI to the given file.

Specified by:
save in interface ISOpenSaver
Parameters:
path - The destination path.
ui - The user interface that contains abstract presentations and instruments.
progressBar - The progress bar used to show the progress of the saving. Can be null.
statusBar - The widget that displays the status of the saving operation. Can be null.
Returns:
True: the operation is successful.

open

public boolean open(java.lang.String path,
                    UI ui,
                    MProgressBar progressBar,
                    java.lang.Object statusBar)
Description copied from interface: ISOpenSaver
Opens the given file and sets the abstract presentations and the instruments parameters of the given UI to the given file.

Specified by:
open in interface ISOpenSaver
Parameters:
path - The source path that contains information for presentations and instruments.
ui - The user interface that contains abstract presentations and instruments.
progressBar - The progress bar used to show the progress of the saving. Can be null.
statusBar - The widget that displays the status of the loading operation. Can be null.
Returns:
True: the operation is successful.