public interface PvViewerIf extends PsViewerIf
Add one, or more, projects PjProject
via method calls
addProject((String, String, String []))
,
addProject(String, String, String, String [])
, or
addProject(PjProject)
.
Once a project has been
registered this way, it may be selected by selectProject(String)
to become the active project, i.e. its geometry is rendered in the
display getDisplay()
, and its panels may be made
visible via the method showPanel(int)
.
The 3d-display is be obtained from PvViewerIf by getDisplay()
and includable in a container, e.g. inside the applet or standalone frame.
The control window may be slightly configured by showPanel(int)
.
PvViewer
,
PsViewerIf
ABOUT, ABOUT_APPLET, ADD_GEOMETRY, ADD_PROJECT, ANIMATION, AXIS, AXIS_X, AXIS_Y, AXIS_Z, BOUNDARY, CAMERA, CONFIG, CONSOLE, CONTROL, DISPLAY, EXPORT_BUG, EXPORT_BYU, EXPORT_DXF, EXPORT_EPS, EXPORT_FE, EXPORT_GIF, EXPORT_GIF_ANIM, EXPORT_HTML, EXPORT_JPG, EXPORT_JPG_ANIM, EXPORT_JVD, EXPORT_JVX, EXPORT_JVX_SMALL, EXPORT_JVZ, EXPORT_MA, EXPORT_MGS, EXPORT_MPL, EXPORT_MULTIPLE, EXPORT_OBJ, EXPORT_OFF, EXPORT_PDF, EXPORT_PLY, EXPORT_PNG, EXPORT_POV, EXPORT_PPM, EXPORT_PPM_ANIM, EXPORT_PS, EXPORT_STL, EXPORT_U3D, EXPORT_VAL, EXPORT_VALIDATE, EXPORT_VRML, EXPORT_WRL, EXPORT_XML, HELP, IMPORT_DISK, IMPORT_JVD, IMPORT_VGP, INFO, LABEL, LICENSE, LIGHT, MATERIAL, MENU_DISPLAY_ADD_ELEMENT, MENU_DISPLAY_ADD_VERTEX, MENU_DISPLAY_DELETE_GEOMETRY, MENU_DISPLAY_DISPLAY_PICK, MENU_DISPLAY_DRAWING, MENU_DISPLAY_INITIAL_PICK, MENU_DISPLAY_MARK_ELEMENT, MENU_DISPLAY_MARK_VERTEX, MENU_DISPLAY_ORBIT, MENU_DISPLAY_PICK_VERTEX, MENU_DISPLAY_SCALE, MENU_DISPLAY_SCALE_RECT, MENU_DISPLAY_TRANSLATE, MENU_DISPLAY_TRANSLATE_Z, MENU_DISPLAY_UNMARK_ELEMENT, MENU_DISPLAY_UNMARK_VERTEX, MENU_DISPLAY_VERTICAL, MENU_FILE, MENU_FILE_CLOSE, MENU_FILE_EXIT, MENU_FILE_EXPORT, MENU_FILE_EXPORT_BYU, MENU_FILE_EXPORT_FE, MENU_FILE_EXPORT_GIF, MENU_FILE_EXPORT_JPG, MENU_FILE_EXPORT_JVD, MENU_FILE_EXPORT_JVX, MENU_FILE_EXPORT_JVX_SMALL, MENU_FILE_EXPORT_MA, MENU_FILE_EXPORT_MGS, MENU_FILE_EXPORT_MPL, MENU_FILE_EXPORT_OBJ, MENU_FILE_EXPORT_OFF, MENU_FILE_EXPORT_PDF, MENU_FILE_EXPORT_PLY, MENU_FILE_EXPORT_POV, MENU_FILE_EXPORT_PPM, MENU_FILE_EXPORT_STL, MENU_FILE_EXPORT_U3D, MENU_FILE_EXPORT_VRML, MENU_FILE_EXPORT_WRL, MENU_FILE_IMPORT, MENU_FILE_IMPORT_DISK, MENU_FILE_IMPORT_JVD, MENU_FILE_IMPORT_SER, MENU_FILE_IMPORT_VGP, MENU_FILE_NEW, MENU_FILE_NEW_DISPLAY, MENU_FILE_NEW_GEOMETRY, MENU_FILE_NEW_PROJECT, MENU_FILE_PRINT, MENU_FILE_PRINT_EPS, MENU_FILE_PRINT_PS, MENU_FILE_SUBMIT, MENU_HELP, MENU_HELP_ABOUT, MENU_HELP_APPLET, MENU_HELP_FONTS, MENU_HELP_LICENSE, MENU_HELP_RESOURCE, MENU_HELP_SYSTEM, MENU_HELP_VIEWER, MENU_INSPECTOR, MENU_INSPECTOR_AXIS, MENU_INSPECTOR_AXIS_X, MENU_INSPECTOR_AXIS_Y, MENU_INSPECTOR_AXIS_Z, MENU_INSPECTOR_CAMERA, MENU_INSPECTOR_DISPLAY, MENU_INSPECTOR_GEOMETRY, MENU_INSPECTOR_GEOMETRY_BOUNDARY, MENU_INSPECTOR_GEOMETRY_CONFIG, MENU_INSPECTOR_GEOMETRY_INFO, MENU_INSPECTOR_GEOMETRY_LABEL, MENU_INSPECTOR_GEOMETRY_MATERIAL, MENU_INSPECTOR_GEOMETRY_TEXTURE, MENU_INSPECTOR_GEOMETRY_VECTOR, MENU_INSPECTOR_LIGHT, MENU_INSPECTOR_OBJECT, MENU_INSPECTOR_OBJECT_CONFIG, MENU_INSPECTOR_OBJECT_INFO, MENU_INSPECTOR_OBJECT_MATERIAL, MENU_INSPECTOR_OBJECT_TEXTURE, MENU_INSPECTOR_PROJECT, MENU_METHOD, MENU_SEPARATOR, MENU_WINDOW, MENU_WINDOW_ANIMATION, MENU_WINDOW_CONSOLE, MENU_WINDOW_NETWORK, NEW_GEOMETRY, NEW_PROJECT, OBJECT, PRINT, PROJECT, RESOURCE, RSRC, TEXTURE, VECTOR
Modifier and Type | Method and Description |
---|---|
boolean |
addDisplay(java.lang.String name,
PvDisplayIf disp)
Register a new display.
|
boolean |
addProject(java.lang.String name,
java.lang.String className,
java.lang.String[] parmList)
Registers the name and class of a project in the viewer in default category.
|
void |
destroy()
Called from an applet.destroy() method to perform clean-up
when applet gets destroyed.
|
java.applet.Applet |
getApplet()
Get current applet.
|
PsDialog |
getDialog(int dialog)
Get dialog window.
|
PvDisplayIf |
getDisplay()
Make default display available outside, e.g. for inclusion in applet window.
|
PvDisplayIf[] |
getDisplays()
Get array of registered displays.
|
java.awt.Frame |
getFrame()
Get current frame if running as application.
|
java.awt.Panel |
getPanel(int panel)
Make panels available outside our environment, i.e. outside control panel
and outside our direct influence.
|
java.lang.String |
getParameter(java.lang.String parmLabel)
Get value of applet parameter.
|
java.lang.String |
getRecentGeometryFile()
Deprecated.
since JavaView 3.09.003, use PsJavaView.getFullFileName(int)
|
boolean |
hasDisplay(PvDisplayIf disp)
Check for a registered display by display instance.
|
boolean |
hasProject(java.lang.String name)
Check existence of a project instance with given name.
|
boolean |
hideDialog(int dialog)
Hide visible dialog.
|
java.lang.String |
newDisplay()
Create a new AWT display inside a new frame.
|
PvDisplayIf |
newDisplay(java.lang.String name)
Deprecated.
Use method newDisplay(String, boolean)
|
PvDisplayIf |
newDisplay(java.lang.String name,
boolean bFrame)
Create a new empty AWT display which is optionally placed inside a new frame.
|
PvDisplayIf |
newDisplay(java.lang.String name,
boolean bFrame,
boolean bSelect)
Create a new empty AWT display which is optionally placed inside a new frame.
|
boolean |
removeDisplay(PvDisplayIf disp)
Remove a registered display from list of registered displays.
|
boolean |
removeProject(java.lang.String aName)
Deprecated.
since JavaView 2.92.000, use PvViewer#removeProject(PjProject)
|
boolean |
selectDisplay(PvDisplayIf disp)
Select a registered display to become the active display.
|
boolean |
selectProject(java.lang.String aName)
Selects a project to become the active project.
|
boolean |
setEnabledPanel(int panel,
boolean cond)
Enable or disable menu entry of panel.
|
void |
setGeometry(PgGeometryIf geom)
Set current geometry whose inspector panels are display inside the control panel.
|
void |
setRecentGeometryFile(java.lang.String model)
Deprecated.
since JavaView 3.09.003, use PsJavaView.setFullFileName(int, String)
|
boolean |
showDialog(int dialog)
Show dialogs as separate frames.
|
boolean |
showPanel(int panel)
Make panels visible.
|
void |
start()
Start viewer, call start method of current project,
and show control panel if requested.
|
void |
stop()
Stop viewer, call stop() method of current project,
and close control panel if shown.
|
addProject, export, export
java.applet.Applet getApplet()
java.awt.Frame getFrame()
java.lang.String getParameter(java.lang.String parmLabel)
Applet.getParameterInfo()
,
Applet.getParameter(String)
java.lang.String getRecentGeometryFile()
void setRecentGeometryFile(java.lang.String model)
boolean addProject(java.lang.String name, java.lang.String className, java.lang.String[] parmList)
name
- Unique name of project, used for identification and selectionclassName
- Class name of project, used for creationparmList
- List of parameters, may be null
.PsViewerIf.addProject(String, String, String, String [])
,
hasProject(String)
,
selectProject(String)
boolean hasProject(java.lang.String name)
boolean removeProject(java.lang.String aName)
Project must be explicitly disposed using PjProject#dispose
after calling the present method. Explicit disposal allows the individual
project to clean-up its allocated resources.
hasProject(String)
,
selectProject(String)
boolean selectProject(java.lang.String aName)
hasProject(String)
,
removeProject(String)
PvDisplayIf getDisplay()
getDisplays()
PvDisplayIf[] getDisplays()
getDisplays()
java.lang.String newDisplay()
newDisplay(String, boolean)
,
newDisplay(String name, boolean bFrame, boolean bSelect)
PvDisplayIf newDisplay(java.lang.String name)
name
- Name of new display. If name is null, then default name is chosen.newDisplay(String, boolean)
PvDisplayIf newDisplay(java.lang.String name, boolean bFrame, boolean bSelect)
If a frame is allocated then the frame is not displayed and must be made visible in the application. The idea behind "not showing the frame" is as follows: if the frame is shown immediately then PvViewer must use a default window size and position. If the user would like to adjust this size, then he can do so only after the frame is already visible. Therefore, I do not show the frame in order to avoid instantaneous resizing.
The display is added to the center of the frame.
The frame may be obtained from the display via
PvDisplayIf#getFrame()
.
name
- Name of new display. If name is null, then default name is chosen.bFrame
- If true
then allocate a frame and add display to center.bSelect
- If true
then select this display as current display.newDisplay()
,
newDisplay(String, boolean)
,
addDisplay(String, PvDisplayIf)
,
PvDisplayIf.getFrame()
PvDisplayIf newDisplay(java.lang.String name, boolean bFrame)
If a frame is allocated then the frame is not displayed and must be made
visible in the application. The display is added to the center of the frame.
The frame may be obtained from the display via
PvDisplayIf#getFrame()
.
name
- Name of new display. If name is null, then default name is chosen.bFrame
- If true
then allocate a frame and add display to center.newDisplay()
,
newDisplay(String name, boolean bFrame, boolean bSelect)
,
addDisplay(String, PvDisplayIf)
,
PvDisplayIf.getFrame()
boolean hasDisplay(PvDisplayIf disp)
disp
- display to be checkedfalse
if display is not registered.addDisplay(String, PvDisplayIf)
boolean addDisplay(java.lang.String name, PvDisplayIf disp)
name
- name of displaydisp
- display to be addedfalse
if same name already exists.hasDisplay(PvDisplayIf)
,
selectDisplay(PvDisplayIf)
boolean removeDisplay(PvDisplayIf disp)
disp
- display to be removedfalse
if display is not registered.addDisplay(String, PvDisplayIf)
,
hasDisplay(PvDisplayIf)
boolean selectDisplay(PvDisplayIf disp)
disp
- display to selectedfalse
if display is not registered.addDisplay(String, PvDisplayIf)
,
hasDisplay(PvDisplayIf)
boolean showDialog(int dialog)
PsViewerIf
.dialog
- Integer identifier of dialog to be showngetDialog(int)
,
hideDialog(int)
PsDialog getDialog(int dialog)
jv.object.PsViewerIf#ANIMATION
,
jv.object.PsViewerIf#CONSOLE
.
See static variables in PsViewerIf
.dialog
- Integer identifier of dialog to be receivedhideDialog(int)
,
showDialog(int)
boolean hideDialog(int dialog)
jv.object.PsViewerIf#ABOUT
,...
Hides visible dialogs.
Possible arguments for dialogs are currently
jv.object.PsViewerIf#ANIMATION
,
jv.object.PsViewerIf#CONSOLE
,
jv.object.PsViewerIf#CONTROL
,
jv.object.PsViewerIf#HELP
.
See static variables in PsViewerIf
.dialog
- Integer identifier of dialog to be hiddengetDialog(int)
,
showDialog(int)
boolean showPanel(int panel)
panel
- Id of panel to be showntrue
if success, false if panel not found or used outside via method getPanel().getPanel(int)
boolean setEnabledPanel(int panel, boolean cond)
panel
- Id of panel to enablecond
- If true, enables this panel's menu entry; if false, disables it.true
if panel exists, otherwise false
.showPanel(int)
java.awt.Panel getPanel(int panel)
If a panel is requested via this method, then it will no longer be
selectable via its menu entry in the control window neither by a call
to method showPanel
. Menu entries will be disabled but still visible.
panel
- Id of requested panelshowPanel(int)
void setGeometry(PgGeometryIf geom)
void destroy()
void start()
PjProject.start()
void stop()
PjProject.stop()
"