public class PjImportModel extends PjProject
A tutorial applet on different ways to import models in JavaView is
found in vgp.tutor.model.PjModel
.
Modifier and Type | Field and Description |
---|---|
static int |
CONFIRM_CANCEL
Confirmation id determines return status of an import model dialog.
|
static int |
CONFIRM_CLICKED
Confirmation id determines return status of an import model dialog.
|
static int |
CONFIRM_OK
Confirmation id determines return status of an import model dialog.
|
static java.lang.String |
DIR_LIST
Name of file containing list of model files in each directory.
|
static int |
FULL_INFO_PANEL
Identifies the full import inspector panel with selection from categories.
|
static boolean |
JVD_INFO
Enable display of JVD author and abstract information in list panel.
|
static int |
MEDIUM_INFO_PANEL
Identifies the medium sized import inspector panel with selection
from a list of geometry files.
|
static int |
SMALL_INFO_PANEL
Identifies a tiny import inspector panel with textfield for typing a URL
and with a button for opening a file browser.
|
HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS
Constructor and Description |
---|
PjImportModel()
Constructor with default full info panel.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(java.awt.event.ActionListener listener)
Action events are sent when a user clicks on Ok or Cancel button, doubleclicks on
a model in the model dialog or presses
|
java.lang.String |
getAuthor()
Get author information of geometry to be displayed on info panel.
|
java.lang.String |
getBaseDir()
Get full path to base directory of model collection.
|
java.lang.String |
getCategory()
Get currently selected category.
|
int |
getConfirm()
Allow world to check whether user has chosen OK or Cancel,
when existing the import dialog.
|
PvDisplayOption[] |
getDisplayOption()
Get display options which some parsers fill out.
|
java.lang.String |
getFileName()
Get filename including full path of a geometry file.
|
java.lang.String |
getInfo()
Get information of geometry to be displayed on info panel.
|
PsPanel |
getInfoPanel()
Overwrite method of PsObject to allow choice of different info panels.
|
java.lang.String[] |
getModelNames()
Get names of model files to be displayed in list menu.
|
java.lang.String |
getNotice()
Get notice displayed on info panel.
|
int |
getNumRows()
Get number of rows of model list on info panel.
|
java.lang.String |
getSelectedFileName()
Get selected file name.
|
java.lang.String |
getTitle()
Get title displayed on info panel.
|
void |
init()
Initialize and reset project, stops the running animation if any.
|
boolean |
isAnimated()
Flag whether currently loaded data is interpreted an animation.
|
boolean |
isEnabledLoadCamera()
Check if automatic loading of camera settings is enabled.
|
boolean |
isEnabledRemoveGeometry()
Check if removal of geometries during reload is enabled.
|
boolean |
isModal()
Indicates whether the import dialog is modal.
|
boolean |
isVisibleReplaceChoice()
Determine if two choices in info panel are shown which allow adding or replacing existing geometry.
|
boolean |
load(java.lang.String fullFileName)
Load geometry model from file or URL and add it as selected geometry
to this project.
|
void |
removeActionListener(java.awt.event.ActionListener listener)
Remove a previously added action listener.
|
void |
setAnimated(boolean flag)
Set flag whether currently loaded data should be interpreted an animation.
|
void |
setAuthor(java.lang.String author)
Set author information of geometry to be displayed on info panel.
|
void |
setBase(java.lang.String baseDir)
Set full path to base directory of model collection.
|
void |
setCategory(java.lang.String category)
Set currently selected category.
|
void |
setEnabledLoadCamera(boolean bLoadCamera)
Enable automatic loading of camera settings.
|
void |
setEnabledRemoveGeometry(boolean bRemoveGeometry)
Enable removal of previous geometries in display.
|
void |
setFileName(java.lang.String fullFileName)
Set filename including full path of a geometry file.
|
void |
setInfo(java.lang.String info)
Set information of geometry to be displayed on info panel.
|
void |
setModal(boolean modal)
Specifies whether the import dialog is modal.
|
void |
setModelNames(java.lang.String[] name)
Set names of model files to be displayed in list menu.
|
void |
setNotice(java.lang.String notice)
Set notice displayed on info panel.
|
void |
setNumRows(int numRows)
Set number of rows of model list on info panel.
|
void |
setParentProject(PjProject project)
Register parent project to which the model will be loaded.
|
void |
setSelectedFileName(java.lang.String fileName)
Set selected file name.
|
void |
setTitle(java.lang.String title)
Set title displayed on info panel.
|
void |
setTypeOfInfoPanel(int infoType)
Set type of info panel.
|
void |
setVisibleReplaceChoice(boolean bReplaceChoice)
Show two choices in info panel which allow adding or replacing existing geometry.
|
void |
start()
Load geometry file if file name has been specified.
|
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, setBackColor, setBorderType, setDisplay, setEnabledAutoFit, setGeometry, setParameter, setTime, setViewer, stop, unmarkVertices
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, update, updatePanels
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName
getName
public static final boolean JVD_INFO
public static final int FULL_INFO_PANEL
public static final int SMALL_INFO_PANEL
public static final int MEDIUM_INFO_PANEL
public static final int CONFIRM_OK
getConfirm()
,
Constant Field Valuespublic static final int CONFIRM_CANCEL
getConfirm()
,
Constant Field Valuespublic static final int CONFIRM_CLICKED
getConfirm()
,
Constant Field Valuespublic static java.lang.String DIR_LIST
public void init()
PjProject
public void start()
start
in class PjProject
PvViewerIf.start()
,
PjProject.isEnabledAutoFit()
public int getNumRows()
public void setNumRows(int numRows)
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
public java.lang.String getNotice()
public void setNotice(java.lang.String notice)
public java.lang.String getInfo()
public void setInfo(java.lang.String info)
public java.lang.String getAuthor()
public void setAuthor(java.lang.String author)
public boolean isVisibleReplaceChoice()
public void setVisibleReplaceChoice(boolean bReplaceChoice)
public boolean isEnabledRemoveGeometry()
public void setEnabledRemoveGeometry(boolean bRemoveGeometry)
public boolean isEnabledLoadCamera()
public void setEnabledLoadCamera(boolean bLoadCamera)
public java.lang.String getSelectedFileName()
public void setSelectedFileName(java.lang.String fileName)
public java.lang.String[] getModelNames()
public void setModelNames(java.lang.String[] name)
public boolean isAnimated()
public void setAnimated(boolean flag)
public boolean isModal()
public void setModal(boolean modal)
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 PsObject
PsObject.addInspector(String, PsPanel)
,
PsObject.getInspector(String)
,
PsObject.hasInspector(String)
,
PsObject.newInspector(String)
,
PsObject.newInspector(String, String)
,
PsObject.removeInspector(String)
public int getConfirm()
PjImportModel#CONFIRM_OK
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 canceled an interactive loading process.
fullFileName
- fully specified file name including code base, or URL.true
if model has been successfully loaded.public PvDisplayOption[] getDisplayOption()
public void addActionListener(java.awt.event.ActionListener listener)
getConfirm()
.public void removeActionListener(java.awt.event.ActionListener listener)
"