Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## j3deditor.bin.hierarchy.util
Class ProjectLoader

    java.lang.Object
      javax.swing.SwingWorker<java.lang.Void,java.lang.Void>
          j3deditor.bin.hierarchy.util.HierarchyWorker
              j3deditor.bin.hierarchy.util.ProjectLoader

All Implemented Interfaces:
  java.lang.Runnable, java.util.concurrent.Future<java.lang.Void>, java.util.concurrent.RunnableFuture<java.lang.Void>

    public class ProjectLoader

extends HierarchyWorker

Tool for loading saved scenes. Uses `com.sun.j3d.utils.scenegraph.io.SceneGraphStreamReader` to load `BranchGroup`.

Author:
  Risto Seene
See Also:
  `SceneGraphStreamReader`

Nested Class Summary

Nested classes/interfaces inherited from class javax.swing.SwingWorker
`javax.swing.SwingWorker.StateValue`

Constructor Summary
`ProjectLoader(J3DeScene scene)` Creates an instance of `ProjectLoader` which is able to load `BranchGroup` to the given scene.

Method Summary
`protected java.lang.Void` | `doInBackground()` Performes the loading process in a background thread.
`protected void` | `done()` Notifies all listeners that object(s) have been added to the scene.
`void` | `loadProject(java.io.InputStream in)` Loads the content of the scene from the given stream.
`void` | `loadProject(java.lang.String filePath)` Loads the content of the scene from the given file.

Methods inherited from class j3deditor.bin.hierarchy.util.HierarchyWorker
`addHierarchyListener, notifyListeners, removeHierarchyListener`

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

### ProjectLoader

    public ProjectLoader(J3DeScene scene)

  Creates an instance of `ProjectLoader` which is able to load `BranchGroup` to the given scene.

  Parameters:
    `scene` - an instance of `J3DeScene` this loader can load to

Method Detail

### loadProject

    public void loadProject(java.lang.String filePath)

  Loads the content of the scene from the given file.

  Parameters:
    `filePath` - path of the file the scene will be loaded from

### loadProject

    public void loadProject(java.io.InputStream in)

  Loads the content of the scene from the given stream.

  Parameters:
    `in` - stream where the scene will be loaded from

### doInBackground

    protected java.lang.Void doInBackground()
                                     throws java.lang.Exception

  Performes the loading process in a background thread.

  Overrides:
    `doInBackground` in class `HierarchyWorker`
  Returns:
    nothing
  Throws:
    `java.lang.Exception` - if unable to load a scene
  See Also:
    `SwingWorker.doInBackground()`

### done

    protected void done()

  Notifies all listeners that object(s) have been added to the scene.

  Overrides:
    `done` in class `javax.swing.SwingWorker<java.lang.Void,java.lang.Void>`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD