|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Interface for a viewer which manages the 3d-display, control window, and list of projects. Central class in JavaView and usually created at the beginning of an applet or application.
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 PsViewerIf by getDisplay(String)
and includable in a container, e.g. inside the applet or standalone frame.
The control window may be slightly configured by showPanel(int).
HACK: Currently, this class references the interface PvDisplayIf.
This cross package reference should be removed to avoid dependence of
jv.object on jv.project.
PvViewer,
PsViewerIf| Method Summary | |
boolean |
addDisplay(java.lang.String name,
PvDisplayIf display)
Register a new display. |
boolean |
addProject(PjProject aProject)
Registers name and instance of a project in the viewer. |
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. |
boolean |
enablePanel(int aPanel,
boolean cond)
Enable or disable menu entry of panel. |
java.applet.Applet |
getApplet()
Get current applet. |
PsDialog |
getDialog(int aDialog)
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 aPanel)
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. |
PjProject |
getProject(java.lang.String name)
Get project with given name. |
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 aDialog)
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. |
boolean |
removeDisplay(PvDisplayIf disp)
Remove a registered display from list of registered displays. |
boolean |
removeProject(java.lang.String aName)
Removes a project from control panel and display but keeps it in the list of added project. |
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. |
void |
setGeometry(PgGeometryIf geom)
Set current geometry whose inspector panels are display inside the control panel. |
boolean |
showDialog(int aDialog)
Show dialogs as separate frames. |
boolean |
showPanel(int aPanel)
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. |
| Methods inherited from interface jv.object.PsViewerIf |
addProject, export, export |
| Methods inherited from interface java.awt.event.KeyListener |
keyPressed, keyReleased, keyTyped |
| Method Detail |
public java.applet.Applet getApplet()
public java.awt.Frame getFrame()
public java.lang.String getParameter(java.lang.String parmLabel)
Applet.getParameterInfo(),
Applet.getParameter(String)
public 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 []),
addProject(PjProject),
selectProject(String)public boolean addProject(PjProject aProject)
PsViewerIf.addProject(String, String, String, String []),
addProject(String, String, String []),
selectProject(String)public boolean hasProject(java.lang.String name)
addProject(PjProject),
getProject(String),
hasProject(String),
removeProject(String),
selectProject(String)public PjProject getProject(java.lang.String name)
addProject(PjProject),
hasProject(String),
removeProject(String),
selectProject(String)public boolean removeProject(java.lang.String aName)
addProject(PjProject),
getProject(String),
hasProject(String),
selectProject(String)public boolean selectProject(java.lang.String aName)
addProject(PjProject),
getProject(String),
hasProject(String),
removeProject(String)public PvDisplayIf getDisplay()
#getDisplay(String)public PvDisplayIf[] getDisplays()
public java.lang.String newDisplay()
newDisplay(String)public PvDisplayIf newDisplay(java.lang.String name)
Name - of new display. If name is null, then default name is chosen.newDisplay()
public 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(String),
PvDisplayIf.getFrame()public boolean hasDisplay(PvDisplayIf disp)
false if display is not registered.#getDisplay(PvDisplayIf)
public boolean addDisplay(java.lang.String name,
PvDisplayIf display)
false if same name already exists.#getDisplay(String),
selectDisplay(PvDisplayIf)public boolean removeDisplay(PvDisplayIf disp)
false if display is not registered.addDisplay(String, PvDisplayIf),
#getDisplay(PvDisplayIf)public boolean selectDisplay(PvDisplayIf disp)
false if display is not registered.addDisplay(String, PvDisplayIf),
#getDisplay(PvDisplayIf)public boolean showDialog(int aDialog)
PsViewerIf.int - Name of dialog to be showngetDialog(int),
hideDialog(int)public PsDialog getDialog(int aDialog)
jv.object.PsViewerIf#ANIMATION,
jv.object.PsViewerIf#CONSOLE.
See static variables in PsViewerIf.int - Name of dialoghideDialog(int),
showDialog(int)public boolean hideDialog(int aDialog)
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.String - Name of dialog to be hiddengetDialog(int),
showDialog(int)public boolean showPanel(int aPanel)
int - Id of panel to be showngetPanel(int)
public boolean enablePanel(int aPanel,
boolean cond)
int - Id of panel to enableboolean - If true, enables this panel's menu entry; if false, disables it.showPanel(int)public java.awt.Panel getPanel(int aPanel)
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.
int - Id of requested panelshowPanel(int)public void setGeometry(PgGeometryIf geom)
public void destroy()
public void start()
PjProject.start()public void stop()
PjProject.stop()
|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||