|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jv.loader.PgLoader
Dispatcher for loading/saving geometries and images from/to file. Depending on the file name extension the appropriate filter is invoked.
| Constructor Summary | |
PgLoader()
|
|
| Method Summary | |
static PvDisplayOption |
getDisplayOption()
Get display options which some parsers fill out. |
static boolean |
isAnimation()
Determine if currently loaded data is an animation. |
static boolean |
isEnabledSmallSize()
Determine if saving of data should try to reduce size of output file. |
static PvDisplayOption[] |
load(java.io.BufferedReader in,
java.lang.String ext)
Deprecated. use #loadDisplay(BufferedReader in, String ext) |
static PgGeometry[] |
load(PgGeometry[] geom,
java.io.BufferedReader in,
java.lang.String ext)
Read a geometry from a buffered reader with the content of a geometry file. |
static PgGeometry[] |
load(PgGeometry[] geom,
java.lang.String fileName)
Read a geometry from named file whose extension determines the file format. |
static PgGeometry[] |
load(PgGeometry[] geom,
java.lang.String data,
java.lang.String ext)
Read a geometry from a string representing content of a geometry file. |
static PgGeometry[] |
load(java.lang.String fileName)
Read a geometry from named file whose extension determines the file format. |
static PvDisplayOption[] |
loadDisplay(java.io.BufferedReader in,
java.lang.String ext)
Read display options from a buffered reader. |
static double |
parseDouble(java.io.StreamTokenizer st)
Parse double value in exponential notation. |
static double |
parseDouble(java.lang.String string)
Parse double value in exponential notation using Double(String).doubleValue(). |
static PgGeometry[] |
read(PgJvxSrc[][] geomAnim,
boolean bIsAnimation,
boolean bShowAnimationPanel)
Create a set of keyframe objects from a double array of geometries. |
static PgGeometry[] |
read(PgJvxSrc[] geomAnim,
boolean bIsAnimation,
boolean bShowAnimationPanel)
Create a set of keyframe objects containing a single keyframe from an array of geometries. |
static boolean |
readAll(java.awt.List list,
java.lang.String fileName)
Read list of files from a given XML listing file. |
static boolean |
readDirs(java.awt.List list,
java.lang.String fileName)
Read list of directories from a given XML listing file. |
static java.lang.String[] |
readDirs(java.lang.String fileName)
Read list of directories from a given XML listing file into array. |
static boolean |
save(java.awt.Image image,
java.lang.String fileName)
Write an image to a named file whose extension determines the file format. |
static boolean |
save(PgGeometryIf[] geom,
java.lang.String fileName)
Write a set of geometries to a named file whose extension determines the format. |
static boolean |
save(PvDisplayOption[] option,
java.lang.String fileName)
Deprecated. use PgLoader.saveDisplay(PvDisplayOption [] option, String fileName). |
static boolean |
save(java.lang.String data,
java.lang.String fileName)
Write a string to a named file if running as application. |
static boolean |
saveDisplay(PvDisplayOption[] option,
java.lang.String fileName)
Write display settings to a JVD file. |
static java.lang.String |
saveToString(PgGeometryIf[] geom,
java.lang.String ext)
Write a geometry to a string in a given format determined by its file extension. |
static void |
setAnimation(boolean flag)
Set flag whether currently loaded data is an animation. |
static void |
setDisplayOption(PvDisplayOption option)
Set the display options obtained from some parsers. |
static void |
setEnabledSmallSize(boolean flag)
Determine if saving of data should try to reduce size of output file. |
static void |
showAnimationPanel(boolean flag)
Set flag whether an anination control panel pops up when animations are read. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PgLoader()
| Method Detail |
public static PvDisplayOption getDisplayOption()
public static void setDisplayOption(PvDisplayOption option)
public static void showAnimationPanel(boolean flag)
public static boolean isAnimation()
public static void setAnimation(boolean flag)
public static boolean isEnabledSmallSize()
public static void setEnabledSmallSize(boolean flag)
public static PgGeometry[] load(PgGeometry[] geom,
java.lang.String data,
java.lang.String ext)
geom - Geometry which will be filled with data, maybe null.data - String with geometry dataext - Extension identifying the file format, usually 3 characters.public static PgGeometry[] load(java.lang.String fileName)
fileName - full qualified name of geometry file, e.g. http://... or file:/...
public static PgGeometry[] load(PgGeometry[] geom,
java.lang.String fileName)
geom - Geometry which will be filled with data, maybe null.fileName - full qualified name of geometry file, e.g. http://... or file:/...
public static PgGeometry[] load(PgGeometry[] geom,
java.io.BufferedReader in,
java.lang.String ext)
If the geometry data is available at an input stream 'data',
for example standard input System.in, then
use the following command to generate a BufferedReader
new BufferedReader(new InputStreamReader(data))
as argument of this method. If data is read from a file, then
use jv.object.PsUtil#open(String)
to create a buffered reader or use another load of this class.
geom - Geometry which will be filled with data, maybe null.br - Buffered reader with geometry dataext - Extension identifying the file format, usually 3 characters.
public static PvDisplayOption[] load(java.io.BufferedReader in,
java.lang.String ext)
public static PvDisplayOption[] loadDisplay(java.io.BufferedReader in,
java.lang.String ext)
If the display data is available at an input stream 'data',
for example standard input System.in, then
use the following command to generate a BufferedReader
new BufferedReader(new InputStreamReader(data))
as argument of this method. If data is read from a file, then
use jv.object.PsUtil#open(String)
to create a buffered reader or use another load of this class.
in - Buffered reader with display option dataext - Extension identifying the file format, usually 3 characters.
public static java.lang.String saveToString(PgGeometryIf[] geom,
java.lang.String ext)
Note, this method does not save texture images, use
#save(PgGeometryIf [],String) instead.
geom - array of geometries to be saved to stringext - filename extension to determine the file formatsave(PgGeometryIf [],String)
public static boolean save(PgGeometryIf[] geom,
java.lang.String fileName)
Note, only visible geometries are saved.
Note, if geometry has texture then the texture image to saved in the same directory. The name of the texture file is either name='path of geometry file'/'name of texture'(.gif), if texture has a name, or name='path of geometry file'/'geom[i].getName()'_'texture.gif'.
geom - array of geometries to be saved to filefileName - full file name including pathtrue on successPgGeometryIf.isVisible(),
PgGeometryIf.getTextureImage(),
saveToString(PgGeometryIf [],String)
public static boolean save(java.lang.String data,
java.lang.String fileName)
PgExport_Dialog
from which it may be saved using cut-and-paste.data - string to be saved to filefileName - full file name including pathtrue on success
public static boolean save(PvDisplayOption[] option,
java.lang.String fileName)
public static boolean saveDisplay(PvDisplayOption[] option,
java.lang.String fileName)
option - Display options to be saved to filefileName - full file name including pathtrue on success
public static boolean save(java.awt.Image image,
java.lang.String fileName)
data - Image to be saved to filefileName - Full file name including pathtrue on success
public static double parseDouble(java.io.StreamTokenizer st)
throws java.io.IOException
public static double parseDouble(java.lang.String string)
public static boolean readAll(java.awt.List list,
java.lang.String fileName)
throws java.io.IOException
public static boolean readDirs(java.awt.List list,
java.lang.String fileName)
throws java.io.IOException
public static java.lang.String[] readDirs(java.lang.String fileName)
throws java.io.IOException
public static PgGeometry[] read(PgJvxSrc[] geomAnim,
boolean bIsAnimation,
boolean bShowAnimationPanel)
public static PgGeometry[] read(PgJvxSrc[][] geomAnim,
boolean bIsAnimation,
boolean bShowAnimationPanel)
|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||