public final class PvViewer extends PsObject implements PvViewerIf, java.awt.event.ActionListener, java.awt.event.WindowListener
Add one, or more, projects PjProject
via method calls addProject
. Once a project has been
registered this way, it may be selected by
selectProject(PjProject)
to become the active project, i.e. its geometry is rendered in the
display getDisplay()
and its panels
are accessible via the control window which can be shown via
showPanel(int)
.
The default 3d-display is be obtained from PvViewer by
getDisplay()
for inclusion in a container,
e.g. inside an applet or standalone frame.
The control window may be slightly configured by
showPanel(int)
. It is created whenever a panel
is requested, i.e. initially there are no inspector panels allocated.
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
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
Constructor and Description |
---|
PvViewer()
Constructor for JavaView's display and project manager if JavaView runs
inside another program.
|
PvViewer(java.applet.Applet applet,
java.awt.Frame frame)
Constructor for JavaView's display and project manager JavaView runs
in an applet or as standalone application.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Internal method to catch action events from internal dialogs.
|
boolean |
addDisplay(java.lang.String name,
PvDisplayIf disp)
Register a new display under a name.
|
boolean |
addGeometry(java.lang.String category,
java.lang.String name,
java.lang.String className)
Registers the name and class of a geometry class in the viewer in given category.
|
boolean |
addProject(PjProject prj)
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.
|
boolean |
addProject(java.lang.String category,
java.lang.String name,
java.lang.String className,
java.lang.String[] parmList)
Registers the name and class of a project in the viewer in given category.
|
void |
addProjects()
Parses and adds all projects mentioned in the applet's parmInfo or Html page.
|
void |
destroy()
Called from an applet.destroy() method to perform clean-up
when applet is destroyed.
|
boolean |
export(int aDialog,
java.lang.String fileName)
Export geometries of active display or display setting without opening a dialog.
|
boolean |
export(int aDialog,
java.lang.String fileName,
int width,
int height)
Export image file of currently active display with specified image size.
|
java.applet.Applet |
getApplet()
Get current applet.
|
PjProject |
getCurrentProject()
Get currently selected project.
|
PsDialog |
getDialog(int dialog)
Get dialog window.
|
PvDisplayIf |
getDisplay()
Get currently selected 3d-display, for example, for inclusion in an applet.
|
PvDisplayIf[] |
getDisplays()
Get array of registered displays.
|
java.awt.Frame |
getFrame()
Get current frame if running as application.
|
PgGeometryIf |
getGeometry()
Get current geometry whose inspector panels are displayed inside the control panel.
|
PgGeometryIf |
getGeometry(java.lang.String name)
Get geometry with given name.
|
int |
getNumFrames()
Get number of registered frame.
|
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 instance with given name.
|
java.util.Hashtable |
getProjectClasses()
Get hashtable with name and class of projects registered in PvViewer.
|
java.util.Hashtable |
getProjectInstances()
Get hashtable with name and instance of projects allocated in PvViewer.
|
java.lang.String |
getRecentGeometryFile()
Deprecated.
since JavaView 3.09.003, use PsJavaView#getFullFileName(int)
|
PvDisplayIf |
getSelectedDisplay()
Get currently selected display.
|
boolean |
hasDisplay(PvDisplayIf disp)
Determine whether a display is registered in the viewer.
|
boolean |
hasProject(java.lang.String name)
Check existence of a project instance with given name.
|
boolean |
hideDialog(int dialog)
Hides visible dialogs.
|
void |
init()
Creates an empty hashtable for all added projects, creates a display,
and a nearly empty control window.
|
boolean |
isEmbedded()
Check if JavaView is embedded into another system.
|
boolean |
isEnabledPanel(int aPanel)
Check if menu entry of panel is enable or disable.
|
void |
keyPressed(java.awt.event.KeyEvent event)
Receives function key and strg-key events to show and hide panels.
|
void |
keyReleased(java.awt.event.KeyEvent event)
Event currently not handled.
|
void |
keyTyped(java.awt.event.KeyEvent event)
Event currently not handled.
|
java.lang.String |
newDisplay()
Create a new AWT display inside a new frame with menu bar.
|
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.
|
PvControlMenu |
newMenuBar(java.awt.Frame frame)
Create a new menubar and call setEnabled(boolean) depending on the current scene.
|
PsToolbar |
newToolbar(java.awt.Frame frame)
Create a new toolbar for frame.
|
void |
printParameter()
Print all parameters and values to console.
|
boolean |
removeDisplay(PvDisplayIf disp)
Remove a registered display from list of registered displays.
|
boolean |
removeProject(PjProject proj)
Removes a registered project, project may be added again later.
|
boolean |
removeProject(java.lang.String aName)
Deprecated.
since JavaView 2.92.000, use removeProject(PjProject)
|
boolean |
selectDisplay(PvDisplayIf disp)
Select a registered display to become the active display.
|
boolean |
selectProject(PjProject prj)
Selects a project to become the active project.
|
boolean |
selectProject(java.lang.String aName)
Deprecated.
since JavaView 2.87, use selectProject(PjProject).
|
void |
setEmbedded(boolean flag)
Check if JavaView is embedded into another system.
|
boolean |
setEnabledPanel(int aPanel,
boolean cond)
Enable or disable menu entry of panel.
|
void |
setGeometry(PgGeometryIf geom)
Set current geometry whose inspector panels are displayed inside the control panel.
|
void |
setRecentGeometryFile(java.lang.String model)
Deprecated.
since JavaView 3.09.003, use PsJavaView#setFullFileName(int, String)
|
void |
showAllFrames()
Bring all frames to front (unless a frame is minimized).
|
boolean |
showDialog(int aDialog)
Show dialogs as separate frames.
|
boolean |
showPanel(int aPanel)
Make a panel visible if the control window has been created already.
|
void |
start()
Depending on applet parameter show control panel and call start method of current project.
|
void |
stop()
Dispose open dialogs and invoke stop method of projects.
|
boolean |
update(java.lang.Object object)
Just a dummy routine to catch update() calls of stand-alone projects.
|
void |
windowActivated(java.awt.event.WindowEvent event)
Select display if window is instance of class Frame containing a display.
|
void |
windowClosed(java.awt.event.WindowEvent event)
No method body, just declared to fulfill interface WindowListener.
|
void |
windowClosing(java.awt.event.WindowEvent event)
Exit the application, or, if run as applet, close window.
|
void |
windowDeactivated(java.awt.event.WindowEvent event)
No method body, just declared to fulfill interface WindowListener.
|
void |
windowDeiconified(java.awt.event.WindowEvent event)
No method body, just declared to fulfill interface WindowListener.
|
void |
windowIconified(java.awt.event.WindowEvent event)
No method body, just declared to fulfill interface WindowListener.
|
void |
windowOpened(java.awt.event.WindowEvent event)
No method body, just declared to fulfill interface WindowListener.
|
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels
public PvViewer()
PvViewer(Applet, Frame)
when writing JavaView based applets or applications.PvViewer(Applet, Frame)
public PvViewer(java.applet.Applet applet, java.awt.Frame frame)
PsConfig
at a
central place.
This constructor should be used if JavaView runs inside an applet or as standalone application.
Applications and applet should invoke the start()
method which shows the control panel if requested and invokes the
start method of the current project. On exit, applications should
call the stop()
method to stop any running animations.
The constructor checks license if running as application.
applet
- Parent appletframe
- Parent framePsConfig.init(Applet, PsViewerIf, Frame)
public void init()
public java.applet.Applet getApplet()
getApplet
in interface PvViewerIf
public java.awt.Frame getFrame()
getFrame
in interface PvViewerIf
public java.lang.String getParameter(java.lang.String parmLabel)
Reads parameters from the applet's HTML page, and from command line of applications.
Format on Html page: .
Format on command line: javaview label=some_value
.
If the parameter is not found then an empty String "" is return. This behavior was introduced to avoid null pointer checks in application programs.
getParameter
in interface PvViewerIf
Applet.getParameterInfo()
,
Applet.getParameter(String)
,
PsMainFrame.PsMainFrame(Component, String, String [])
,
PsMainFrame.PsMainFrame(Component, String [])
,
PsMainFrame.PsMainFrame(String, String [])
public void printParameter()
Applet.getParameter(String)
public boolean addGeometry(java.lang.String category, java.lang.String name, java.lang.String className)
category
- Unique name of category used to group geometrysname
- Unique name of geometry, used for identification and selectionclassName
- Class name of geometry, used for creationgetGeometry(String)
public PgGeometryIf getGeometry(java.lang.String name)
addGeometry(String, String, String)
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
public void addProjects()
addProject(PjProject)
public boolean addProject(java.lang.String category, java.lang.String name, java.lang.String className, java.lang.String[] parmList)
addProject
in interface PsViewerIf
category
- Unique name of category used to group projectsname
- Unique name of project, used for identification and selectionclassName
- Class name of project, used for creationparmList
- List of parameters, may be null
.addProject(String, String, String [])
,
addProject(PjProject)
,
selectProject(PjProject)
public boolean addProject(java.lang.String name, java.lang.String className, java.lang.String[] parmList)
addProject
in interface PvViewerIf
name
- Unique name of project, used for identification and selectionclassName
- Class name of project, used for creationparmList
- List of parameters, may be null
.addProject(String, String, String, String [])
,
addProject(PjProject)
,
selectProject(PjProject)
public boolean addProject(PjProject prj)
addProject(String, String, String [])
,
selectProject(PjProject)
public boolean hasProject(java.lang.String name)
hasProject
in interface PvViewerIf
getProject(String)
public PjProject getCurrentProject()
getProject(String)
public PjProject getProject(java.lang.String name)
public java.util.Hashtable getProjectClasses()
getProjectInstances()
public java.util.Hashtable getProjectInstances()
getProjectClasses()
public 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.
removeProject
in interface PvViewerIf
PvViewerIf.hasProject(String)
,
PvViewerIf.selectProject(String)
public boolean removeProject(PjProject proj)
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.
public boolean selectProject(PjProject prj)
Current display of PvViewer is added and selected in project. The
method start()
of the project
is invoked to start, e.g. animations.
The project is made the current project in the control panel, if control
frame exists already.
prj
- will become the new active project.addProject(PjProject)
public boolean selectProject(java.lang.String aName)
Current display of PvViewer is added and selected in project. The
method start()
of the project
is invoked to start, e.g. animations.
The project is made the current project in the control panel, if control
frame exists already.
selectProject
in interface PvViewerIf
addProject(PjProject)
public PgGeometryIf getGeometry()
public void setGeometry(PgGeometryIf geom)
setGeometry
in interface PvViewerIf
public boolean update(java.lang.Object object)
update
in interface PsUpdateIf
update
in class PsObject
object
- carries a lot of informationPjProject
public boolean showDialog(int aDialog)
PsViewerIf
.showDialog
in interface PvViewerIf
aDialog
- Dialog to be shown, see jv.object.PsViewerIf.PsViewerIf
,
hideDialog(int)
public boolean export(int aDialog, java.lang.String fileName, int width, int height)
PsViewerIf
.export
in interface PsViewerIf
aDialog
- Id of a dialog determining the file formatfileName
- Full file namewidth
- width of imageheight
- height of image, or -1 to keep aspect ratio.public java.lang.String getRecentGeometryFile()
getRecentGeometryFile
in interface PvViewerIf
public void setRecentGeometryFile(java.lang.String model)
setRecentGeometryFile
in interface PvViewerIf
public PsDialog getDialog(int dialog)
jv.object.PsViewerIf#ANIMATION
,
jv.object.PsViewerIf#CONSOLE
.
See static variables in PsViewerIf
.getDialog
in interface PvViewerIf
dialog
- Identifier of a dialog, see jv.object.PsViewerIfPsViewerIf
,
hideDialog(int)
,
showDialog(int)
public boolean hideDialog(int dialog)
jv.object.PsViewerIf#ANIMATION
,
jv.object.PsViewerIf#CONSOLE
,
jv.object.PsViewerIf#CONTROL
,
jv.object.PsViewerIf#HELP
.
See static variables in PsViewerIf
.hideDialog
in interface PvViewerIf
dialog
- Identifier of a dialogPsViewerIf
,
showDialog(int)
public java.lang.String newDisplay()
Projection mode is used as in current display.
Note: Method is currently only used by PvDisplay, and method is included in the interface jv.project.PvViewerIf to separate PvDisplay from PvViewer.
newDisplay
in interface PvViewerIf
newDisplay(String, boolean)
,
addDisplay(String, PvDisplayIf)
public PvDisplayIf newDisplay(java.lang.String name)
newDisplay(String, boolean)
.This method rescales and positions displays on the screen depending on the current number of displays.
newDisplay
in interface PvViewerIf
name
- Name of new display. If name is null, then default name is chosen.PvViewerIf.newDisplay(String, boolean)
public 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()
.
newDisplay
in interface PvViewerIf
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(String, boolean)
,
addDisplay(String, PvDisplayIf)
,
PvDisplayIf.getFrame()
public PvDisplayIf newDisplay(java.lang.String name, boolean bFrame)
Method simply invokes: return newDisplay(name, bFrame, true);
newDisplay
in interface PvViewerIf
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, boolean, boolean)
,
addDisplay(String, PvDisplayIf)
,
PvDisplayIf.getFrame()
public PvDisplayIf getDisplay()
getDisplay
in interface PvViewerIf
getDisplays()
,
newDisplay(String, boolean, boolean)
,
addDisplay(String, PvDisplayIf)
public PvDisplayIf[] getDisplays()
getDisplays
in interface PvViewerIf
getDisplay()
public boolean hasDisplay(PvDisplayIf disp)
hasDisplay
in interface PvViewerIf
disp
- display to be checkedfalse
if display is not registered.addDisplay(String, PvDisplayIf)
public boolean addDisplay(java.lang.String name, PvDisplayIf disp)
This viewer is registered as parent and key listener of the display.
addDisplay
in interface PvViewerIf
name
- name of displaydisp
- display to be addedfalse
if same name already exists.hasDisplay(PvDisplayIf)
,
selectDisplay(PvDisplayIf)
public boolean removeDisplay(PvDisplayIf disp)
This viewer is removed as key listener of the display.
removeDisplay
in interface PvViewerIf
disp
- display to be removedfalse
if display is not registered.addDisplay(String, PvDisplayIf)
,
hasDisplay(PvDisplayIf)
public boolean selectDisplay(PvDisplayIf disp)
The first selected display becomes the main display to which 'New Projects' are loaded.
selectDisplay
in interface PvViewerIf
disp
- display to selectedfalse
if display is not registered.addDisplay(String, PvDisplayIf)
,
hasDisplay(PvDisplayIf)
public PvDisplayIf getSelectedDisplay()
public int getNumFrames()
public void showAllFrames()
public void windowOpened(java.awt.event.WindowEvent event)
windowOpened
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent event)
windowClosed
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent event)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent event)
windowIconified
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent event)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowActivated(java.awt.event.WindowEvent event)
windowActivated
in interface java.awt.event.WindowListener
public void windowClosing(java.awt.event.WindowEvent event)
windowClosing
in interface java.awt.event.WindowListener
public boolean showPanel(int aPanel)
If the control window has not been created yet then the requested panel id is stored and shown when the control window becomes visible.
If panel has already been requested by a call to getPanel(int)
then
a call to showPanel is void and returns false.
showPanel
in interface PvViewerIf
aPanel
- Id of panel to be shown, see PsViewerIf for possible valuestrue
if success, false
if panel not found or
used outside via method getPanel(int)
.getPanel(int)
public boolean setEnabledPanel(int aPanel, boolean cond)
setEnabledPanel
in interface PvViewerIf
aPanel
- Id of panel to be enabled, see PsViewerIf for possible valuescond
- true
enables this panel's menu entry; if false, disables it.true
if panel exists, otherwise false
.isEnabledPanel(int)
,
showPanel(int)
public boolean isEnabledPanel(int aPanel)
aPanel
- Id of panel to be enabled, see PsViewerIf for possible valuestrue
if menu entry of panel is enabled.setEnabledPanel(int, boolean)
public java.awt.Panel getPanel(int aPanel)
showPanel(int)
. Menu entries will be disabled but still visible.getPanel
in interface PvViewerIf
aPanel
- Id of requested panel, see PsViewerIf for possible valuesshowPanel(int)
public boolean isEmbedded()
false
.true
if the user has set embeddednesssetEmbedded(boolean)
public void setEmbedded(boolean flag)
false
.setEmbedded(boolean)
public void keyTyped(java.awt.event.KeyEvent event)
keyTyped
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent event)
keyReleased
in interface java.awt.event.KeyListener
public void keyPressed(java.awt.event.KeyEvent event)
Disable the following request since this would bring the display to front and hide the just opened panel behind the display. Simultaneously we disable the requestFocus() in PvDisplay when the mouse focus moves over the display.
keyPressed
in interface java.awt.event.KeyListener
public void destroy()
Method is synchronized with start(), stop() and destroy() to avoid synchronization problems when applets are opened and closed very fast.
destroy
in interface PvViewerIf
public void start()
Method is synchronized with start(), stop() and destroy() to avoid synchronization problems when applets are opened and closed very fast.
start
in interface PvViewerIf
PjProject.start()
public void stop()
Method is synchronized with start(), stop() and destroy() to avoid synchronization problems when applets are opened and closed very fast.
stop
in interface PvViewerIf
PjProject.stop()
public boolean export(int aDialog, java.lang.String fileName)
PsViewerIf
.export
in interface PsViewerIf
aDialog
- ID of dialog determining the file formatfileName
- full file namepublic PsToolbar newToolbar(java.awt.Frame frame)
public PvControlMenu newMenuBar(java.awt.Frame frame)
HACK: should handle the closing of the frame using a listener interface. Currently the menu will not have a CLOSE entry if argument frame==null.
frame
- parent frame of the menubar which will be closed on CLOSE."