net.sf.latexdraw.generators.svg
Class SVGDocumentGenerator.LoadWorker

java.lang.Object
  extended by javax.swing.SwingWorker<java.lang.Boolean,java.lang.Void>
      extended by net.sf.latexdraw.generators.svg.SVGDocumentGenerator.IOWorker
          extended by net.sf.latexdraw.generators.svg.SVGDocumentGenerator.LoadWorker
All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Future<java.lang.Boolean>, java.util.concurrent.RunnableFuture<java.lang.Boolean>
Enclosing class:
SVGDocumentGenerator

 class SVGDocumentGenerator.LoadWorker
extends SVGDocumentGenerator.IOWorker

The worker that loads SVG documents.


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
javax.swing.SwingWorker.StateValue
 
Field Summary
 
Fields inherited from class net.sf.latexdraw.generators.svg.SVGDocumentGenerator.IOWorker
path, statusBar, ui
 
Constructor Summary
protected SVGDocumentGenerator.LoadWorker(UI ui, java.lang.String path, java.lang.Object statusBar)
           
 
Method Summary
protected  java.lang.Boolean doInBackground()
           
private  void loadInstruments(org.w3c.dom.Element meta, Instrument[] instruments)
          Loads the instruments of the systems.
private  IShape toLatexdraw(SVGDocument doc, double incrProgressBar)
          Converts an SVG document into a set of shapes.
 
Methods inherited from class net.sf.latexdraw.generators.svg.SVGDocumentGenerator.IOWorker
done, getDocumentName
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVGDocumentGenerator.LoadWorker

protected SVGDocumentGenerator.LoadWorker(UI ui,
                                          java.lang.String path,
                                          java.lang.Object statusBar)
Method Detail

toLatexdraw

private IShape toLatexdraw(SVGDocument doc,
                           double incrProgressBar)
Converts an SVG document into a set of shapes.

Parameters:
doc - The SVG document.
incrProgressBar - The increment that will be used by the progress bar.
Returns:
The created shapes or null.
Since:
3.0

loadInstruments

private void loadInstruments(org.w3c.dom.Element meta,
                             Instrument[] instruments)
Loads the instruments of the systems.

Parameters:
meta - The meta-data that contains the data of the instruments.
instruments - The instruments to set.
Since:
3.0

doInBackground

protected java.lang.Boolean doInBackground()
                                    throws java.lang.Exception
Overrides:
doInBackground in class SVGDocumentGenerator.IOWorker
Throws:
java.lang.Exception