|
JavaView® v2.00.008 | ||||||||
| 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.
| Field Summary | |
protected static boolean |
m_bIsAnimation
Determine if currently loaded data is an animation. |
protected static boolean |
m_bShowAnimationPanel
Flag whether an anination control panel pops up when animations are read. |
protected static PvDisplayOption |
m_displayOption
Some parser fill out display options. |
| 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 PgGeometry[] |
load(PgGeometry[] geom,
java.io.BufferedReader in,
java.lang.String ext)
Read a geometry from a string representing 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 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 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 a string 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(java.lang.String data,
java.lang.String fileName)
Write a string to a named file if running as application. |
static java.lang.String |
saveToString(PgGeometryIf[] geom,
java.lang.String format)
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. |
protected static void |
setDisplayOption(PvDisplayOption option)
Set the display options obtained from some parsers. |
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static boolean m_bShowAnimationPanel
protected static PvDisplayOption m_displayOption
protected static boolean m_bIsAnimation
| Constructor Detail |
public PgLoader()
| Method Detail |
public static PvDisplayOption getDisplayOption()
protected static void setDisplayOption(PvDisplayOption option)
public static void showAnimationPanel(boolean flag)
public static boolean isAnimation()
public static void setAnimation(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(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 java.lang.String saveToString(PgGeometryIf[] geom,
java.lang.String format)
Note, this method does not save texture images, use
#save(PgGeometryIf [],String) instead.
geom - array of geometries to be saved to stringformat - 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(java.awt.Image image,
java.lang.String fileName)
data - string 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
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||