|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jv.object.PsObject
|
+--jv.project.PjProject
|
+--jv.loader.PjImportModel
Import geometry models from file or via http connections into JavaView.
A tutorial applet on different ways to import models in JavaView is
found in vgp.tutor.model.PjModel.
PjImportModel_InfoBox,
PjModel, Serialized Form| Field Summary | |
static int |
CONFIRM_CANCEL
|
static int |
CONFIRM_CLICKED
|
static int |
CONFIRM_OK
|
static java.lang.String |
DIR_LIST
Name of file containing list of model files in each directory. |
static int |
FULL_INFO_PANEL
|
protected java.lang.String |
m_baseDir
Current base directory for models. |
protected java.lang.String |
m_category
Current category for models. |
protected int |
m_confirm
State of user confirmation when exiting the model load dialog. |
protected java.lang.String |
m_defBaseDir
Default base directory for models. |
protected java.lang.String |
m_defCategory
Default category for models. |
protected java.lang.String |
m_defFileName
Default model file name of geometry. |
protected java.lang.String |
m_fileName
Current model file name of geometry. |
protected java.lang.String |
m_fullFileName
Full file name of geometry. |
protected PgGeometry[] |
m_geomList
List of geometries. |
protected int |
m_infoPanelType
Flag which info panel is used |
protected static int |
m_numModels
|
protected PjProject |
m_parentProject
Project who requested this loader. |
static int |
SMALL_INFO_PANEL
|
| Fields inherited from class jv.project.PjProject |
m_anim, m_bAutoFit, m_display, m_displayList, m_geometry, m_parm, m_rootGeometry |
| Fields inherited from class jv.object.PsObject |
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, m_infoPanel, m_name, m_panelList, m_parent, m_tag, m_updateList, NUM_TAGS |
| Constructor Summary | |
PjImportModel()
Constructor with default full info panel. |
|
| Method Summary | |
java.lang.String |
getBaseDir()
|
java.lang.String |
getCategory()
|
int |
getConfirm()
Allow world to check whether user has choosen OK or Cancel, when existing the import dialog. |
java.lang.String |
getFileName()
|
PsPanel |
getInfoPanel()
Overwrite method of PsObject to allow choice of different info panels. |
void |
init()
Initialize and reset project, stops the running animation if any. |
boolean |
load(java.lang.String fullFileName)
Load geometry model from file or URL and add it as selected geometry to this project. |
void |
setBase(java.lang.String baseDir)
|
void |
setCategory(java.lang.String category)
|
protected void |
setConfirm(int choice)
Set user confirmation state of import dialog, i.e. whether user has pressed OK or CANCEL or clicked in list. |
void |
setFileName(java.lang.String fullFileName)
|
void |
setParentProject(PjProject project)
Register parent project to which the model will be loaded. |
void |
setTypeOfInfoPanel(int infoType)
Set type of info panel. |
void |
start()
Load geometry file if file name has been specified. |
| Methods inherited from class jv.project.PjProject |
addDisplay, addGeometry, addGeometry, dispose, dragDisplay, dragInitial, dragVertex, fitDisplays, getAnimation, getDisplay, getDisplays, getGeometry, getGeometry, getNumGeometries, getParameter, getViewer, hasAnimation, hasDisplay, isEnabledAutoFit, markVertices, pickDisplay, pickInitial, pickVertex, removeDisplay, removeGeometries, removeGeometry, selectDisplay, selectGeometry, setAnimation, setDisplay, setEnabledAutoFit, setParameter, setTime, setViewer, stop, unmarkVertices |
| Methods inherited from class jv.object.PsObject |
addInspector, addUpdateListener, clearTag, clone, clone, clone, copy, getFather, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, update, updatePanels |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jv.anim.PsTimeListenerIf |
getName |
| Methods inherited from interface jv.project.PvPickListenerIf |
getName |
| Methods inherited from interface jv.object.PsUpdateIf |
getFather, getName, setParent, update |
| Field Detail |
protected PjProject m_parentProject
protected PgGeometry[] m_geomList
protected static final int m_numModels
public static int FULL_INFO_PANEL
public static int SMALL_INFO_PANEL
protected int m_infoPanelType
public static java.lang.String DIR_LIST
protected java.lang.String m_defBaseDir
protected java.lang.String m_baseDir
protected java.lang.String m_defCategory
protected java.lang.String m_category
protected java.lang.String m_defFileName
protected java.lang.String m_fileName
protected java.lang.String m_fullFileName
public static int CONFIRM_OK
public static int CONFIRM_CANCEL
public static int CONFIRM_CLICKED
protected int m_confirm
PvViewer.showDialog(int)| Constructor Detail |
public PjImportModel()
| Method Detail |
public void init()
PjProjectinit in class PjProjectpublic void start()
start in class PjProjectjv.project.PjProjectPvViewerIf.start(),
#isEnabledAutoFit(boolean)public java.lang.String getBaseDir()
public void setBase(java.lang.String baseDir)
public java.lang.String getCategory()
public void setCategory(java.lang.String category)
public java.lang.String getFileName()
public void setFileName(java.lang.String fullFileName)
public void setTypeOfInfoPanel(int infoType)
infoType - type of info panel, e.g. PjImportModel.FULL_INFO_PANELpublic PsPanel getInfoPanel()
getInfoPanel in class PsObjectpublic int getConfirm()
protected void setConfirm(int choice)
public void setParentProject(PjProject project)
If user cancels the loading process then the container model is removed from parent project. If user accepts the loaded model then it is selected in the parent project.
public boolean load(java.lang.String fullFileName)
Use getGeometry() to get a reference to the
loaded model. Use getConfirm() to check whether
user has accepted or cancelled an interactive loading process.
fullFileName - fully specified file name including code base, or URL.true if model has been successfully loaded.
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||