JavaView® v2.12

jv.loader
Interface PgLoaderIf

All Known Implementing Classes:
PgBdLoader, PgByuLoader, PgMapleLoader, PgJvxLoader, PgObjLoader, PgStlLoader, PgOffLoader, PgWrlLoader, PgAnsLoader, PgFeLoader, PgDxfLoader

public interface PgLoaderIf

Dispatcher for loading/saving geometries and images from/to file. Depending on the file name extension the appropriate filter is invoked.

Version:
26.02.01, 3.10 revised (kp) Loading of STL format added.
25.02.01, 3.00 revised (kp) Handling of animations added.
11.12.00, 2.30 revised (ur) References to 'PgMathData' replaced with 'PgJvxSrc[]'.
17.09.00, 2.20 revised (kp) Ansys loader added.
27.04.00, 2.10 revised (kp) Allow compressed archives for loading.
08.04.00, 2.00 revised (kp) Completely new saving methods.
25.12.98, 1.10 revised (kp) Non-static instances removed.
00.00.98, 1.00 created (kp)
Author:
Konrad Polthier

Method Summary
 PvDisplayOption getDisplayOption()
          Get display options which some parsers and geometry file formats supply.
 boolean isAnimation()
          Determine if currently loaded data is an animation.
 PgJvxSrc[] read(java.io.BufferedReader in)
          Read a geometry file and return an array of new geometries.
 void setAnimation(boolean flag)
          Set flag whether current geometry data is an animation.
 void setDisplayOption(PvDisplayOption option)
          Set the display options to be saved within the geometry file.
 boolean write(java.io.Writer writer, PgJvxSrc[] geom)
          Write an array of geometries into an output stream writer.
 

Method Detail

read

public PgJvxSrc[] read(java.io.BufferedReader in)
Read a geometry file and return an array of new geometries.

The returned array of geometry may contain keyframes of an animation. This is checked with the method isAnimation().

Parameters:
in - BufferedReader to read textual data from.
Returns:
Array of JVX geometries.
See Also:
#write(Writer)

write

public boolean write(java.io.Writer writer,
                     PgJvxSrc[] geom)
              throws java.io.IOException
Write an array of geometries into an output stream writer.
Parameters:
writer - Write all data to this stream
geom - Array with geometries to save
Returns:
true on success.
See Also:
#read(PgGeometry [], BufferedReader)

getDisplayOption

public PvDisplayOption getDisplayOption()
Get display options which some parsers and geometry file formats supply. Note, not all geometry file formats support saving of display option.

setDisplayOption

public void setDisplayOption(PvDisplayOption option)
Set the display options to be saved within the geometry file. This method must be called before writing the geometry. Note, not all geometry file formats support saving of display option.

isAnimation

public boolean isAnimation()
Determine if currently loaded data is an animation.

setAnimation

public void setAnimation(boolean flag)
Set flag whether current geometry data is an animation.

JavaView® v2.12

The software JavaView® is copyright protected. All Rights Reserved.