Interface PvDisplayIf
-
- All Superinterfaces:
- java.util.EventListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, PsUpdateIf
- All Known Implementing Classes:
- PvDisplay
public interface PvDisplayIf extends PsUpdateIf, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener
This interface must be implemented by all displays to be registered in JavaView, and which want to display any of the geometries implementing the interface PgGeometryIf. Each geometry instance may be registered in a set of displays. If a geometry is modified then it must notify the associated displays via a calldisplay.update(geometry)to invoke a repaint(). In response to this update the display calls the geometries paint(PvGeometryIf cont) method in which a container is filled with the modified data of the geometry.- See Also:
PgGeometryIf,PgGeometryIf.paint(PvGeometryIf),PvDisplay- Author:
- Konrad Polthier
- Version:
- 11.02.14, 3.60 revised (kp) Methods to show scenegraph added.
07.01.07, 3.50 revised (kp) Two new methods clearPopupMenu() and addPopupItem() added.
04.09.06, 3.40 revised (kp) New flags PICK_yyy added which determine sets of pickable geometries.
24.09.05, 3.30 revised (kp) Fill display added which 2D-scales the projected data.
20.04.03, 3.20 revised (kp) Method getVisibleGeometries() added.
19.03.03, 3.10 revised (kp) Scene title handling added.
22.12.02, 3.00 revised (kp) Methods for model and ambient transformations added.
09.12.02, 2.90 revised (kp) Methods for PvGeometryListenerIf added.
11.08.02, 2.80 revised (kp) Some static camera variables transferred to PvCameraIf.
06.05.02, 2.80 revised (kp) New methods for doubleBuffering added.
20.12.01, 2.70 revised (ep) Internationalization.
09.11.01, 2.60 revised (kp) New tag to unmark elements added.
15.03.01, 2.50 revised (kp) New method getCameras() added.
21.01.01, 2.40 revised (kp) New methods for positioning a background image added.
05.01.01, 2.30 revised (kp) Methods for z-buffered drawing added.
16.11.00, 2.20 revised (kp) New mode DUPLICATE added for reflection.
29.10.00, 2.10 revised (kp) New mode DELETE added.
29.09.00, 2.00 revised (kp) Many set/get methods renamed to show/isShowing.
29.09.00, 1.99 revised (kp) Renamed to PvDisplayIf from PgDisplayIf.
26.09.00, 1.90 revised (kp) Dependency on package jv.anim removed.
10.08.00, 1.80 revised (kp) Two methods for get/setting filename of background image removed.
28.07.00, 1.70 revised (kp) Implementation of mouse and key event interfaces added.
18.07.00, 1.50 revised (kp) Mode MODE_DISPLAY_PICK now returns display pick events and no geometries.
03.07.00, 1.40 revised (kp) Additional paint flags added.
06.05.00, 1.35 revised (kp) Number of methods to access PvPickListener reduced.
27.03.00, 1.31 revised (ep) changed return type of getCamera() to PvCameraIf.
07.02.00, 1.30 revised (kp) Additional mode to scale to specified rectangle added.
23.12.99, 1.20 revised (kp) Access to components of transformation matrix.
31.10.99, 1.10 revised (kp) Some methods added.
09.02.98, 1.00 created (kp)
-
-
Field Summary
Fields Modifier and Type Field and Description static intCAMERA_MODELDeprecated.use corresponding instance of PvCameraIfstatic java.lang.String[]CAMERA_NAMEDeprecated.use PvCameraIf#CAMERA_NAMEstatic intCAMERA_ORTHO_XYDeprecated.use corresponding instance of PvCameraIfstatic intCAMERA_ORTHO_XZDeprecated.use corresponding instance of PvCameraIfstatic intCAMERA_ORTHO_YZDeprecated.use corresponding instance of PvCameraIfstatic intCAMERA_PERSPECTIVEDeprecated.use corresponding instance of PvCameraIfstatic intGRID_XYOrientation of the grid to lie in the xy-plane.static intGRID_XZOrientation of the grid to lie in the xz-plane.static intGRID_YZOrientation of the grid to lie in the yz-plane.static intIMAGE_CENTERDetermines that a background image is positioned in the center of a display.static intIMAGE_FITDetermines that a background image is uniformly scaled to fill the display.static intIMAGE_RESIZEDetermines that a background image is (non-uniformly) resized to fill the display.static intIMAGE_TESSELATEDetermines that a background image is repeated to fill the display.static intMATRIX_AMBIENTType of geometry ambient modeling matrix used by cameras and display.static intMATRIX_INV_AMBIENTType of inverse geometry ambient modeling matrix used by cameras and display.static intMATRIX_INV_MODELType of inverse geometry modeling matrix used by cameras and display.static intMATRIX_INV_PROJECTType of inverse projection matrix used by cameras and display.static intMATRIX_INV_PROJECT_NONType of inverse projection matrix used by cameras and display.static intMATRIX_INV_PROJVIEWType of inverse transformation matrix PV^-1 used by cameras and display.static intMATRIX_INV_PROJVIEW_NONType of inverse transformation matrix PV^-1 used by cameras and display.static intMATRIX_INV_TRANSType of inverse full transformation matrix PVM^-1 used by cameras and display.static intMATRIX_INV_TRANS_NONType of inverse full transformation matrix PVM^-1 used by cameras and display.static intMATRIX_INV_VIEWType of inverse camera viewing matrix used by cameras and display.static intMATRIX_MODELType of geometry modeling matrix used by cameras and display.static intMATRIX_PROJECTType of projection matrix used by cameras and display.static intMATRIX_PROJECT_NONType of projection matrix used by cameras and display.static intMATRIX_PROJVIEWType of transformation matrix PV used by cameras and display.static intMATRIX_PROJVIEW_NONType of transformation matrix PV used by cameras and display.static intMATRIX_TRANSType of full transformation matrix PVM used by cameras and display.static intMATRIX_TRANS_NONType of full transformation matrix PVM used by cameras and display.static intMATRIX_VIEWType of camera viewing matrix used by cameras and display.static intMODE_ADDMajor mode in display to add new points of geometries.static intMODE_ADD_ELEMENTMajor mode in display to add new elements to geometry.static intMODE_BOUNDARY_PICKMinor mode in display to pick boundaries of geometries.static intMODE_DELETEMajor mode in display to delete items or geometries.static intMODE_DETAILMinor mode in display to show detail information of geometry items.static intMODE_DISPLAY_PICKMajor mode in display to select initial points in display without picking geometries.static intMODE_DRAWINGMajor mode allows to draw sketches in the display which are then converted to strokes.static intMODE_DUPLICATEMajor mode in display to duplicate geometries.static intMODE_FLYMinor mode in display to fly towards to or away from the camera interest.static intMODE_HIGHLIGHTMajor mode in display to highlight items on geometries if they receive focus.static intMODE_INITIAL_PICKMajor mode in display to select initial points on geometries.static intMODE_MARKMajor mode in display to mark a set of points on geometries.static intMODE_MARK_ELEMENTstatic intMODE_MARK_ELEMENTSMajor mode in display to mark a set of elements on geometries.static intMODE_ORBITMajor mode in display to rotate geometry.static intMODE_PICKMajor mode in display to pick and modify vertices.static intMODE_SCALEMajor mode in display to scale geometry by zooming.static intMODE_SCALE_RECTMajor mode in display to scale geometry by zooming into a specified rectangle.static intMODE_TRANSMajor mode in display to (x,y)-translate geometry.static intMODE_TRANS_ZMajor mode in display to z-translate geometry.static intMODE_UNMARKMajor mode in display to unmark a set of points on surfaces.static intMODE_UNMARK_ELEMENTSMajor mode in display to mark a set of elements on geometries.static intMODE_URLMinor mode in display to follow hyperlinks attached to vertices and elements.static intMODE_VERTICALMajor mode in display to rotate geometry either around z-axis of scene or around x-axis of display canvas, depending on larger mouse increment.static intPAINT_ALLEnable drawing in display canvas, default enabled, otherwise no repaint of the display happens, and nothing is visible nor changes.static intPAINT_ANTIALIASEnable antialiasing of display.static intPAINT_AXESEnable drawing of a coordinate axes around scene in the display.static intPAINT_BACKGROUNDEnable drawing of colored background.static intPAINT_BACKGROUND_IMAGEEnable drawing of background image.static intPAINT_BACKIMAGEDeprecated.use PAINT_BACKGROUND_IMAGEstatic intPAINT_BNDBOXEnable drawing of bounding box of current geometry.static intPAINT_BORDEREnable drawing of sunk border around display canvas.static intPAINT_CENTEREnable drawing of center of active geometry.static intPAINT_CLEAR_SCREENEnable clearing of screen after each repaint.static intPAINT_CROSSEnable drawing of cross at current cursor position.static intPAINT_FOREGROUND_IMAGEEnable drawing of foreground image.static intPAINT_FRAMEEnable drawing of a small coordinate frame in the lower left corner of the display.static intPAINT_INFOEnable drawing of additional information close to cursor in overlay window.static intPAINT_MAGNETAttach cursor to vertices of nearby.static intPAINT_SINGLERestrict drawing to a single geometry at the same time.static intPAINT_ZOOMScale transformation matrix to simulate floating point accuracy in pixel integers.static intPICK_ALLAll geometries of a display are pickable in pick and initialPick modes (default).static intPICK_BACKGROUNDThe background geometry of a display is pickable in pick and initialPick modes.static intPICK_SELECTEDThe selected geometry of a display is pickable in pick and initialPick modes.static intPICK_UNSELECTEDThe selected geometry of a display is pickable in pick and initialPick modes.static intTRANSFORM_AMBIENTViewing transformations affect the ambient modeling matrix of geometry.static intTRANSFORM_CAMERAViewing transformations affect the camera viewing matrix.static intTRANSFORM_MODELViewing transformations affect the modeling matrix of geometry.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method and Description voidaddCameraListener(PvCameraListenerIf listener)Add camera listener to receive camera eventsPvCameraEvent.booleanaddGeometry(PgGeometryIf anObject)Register geometry in display.voidaddGeometryListener(PvGeometryListenerIf listener)Add geometry listener to receive geometry events.voidaddKeyListener(java.awt.event.KeyListener listener)Register a keyListener to receive keyboard events of JavaView.booleanaddLight(PvLightIf light)Add a light to the current scene.voidaddPickListener(PvPickListenerIf listener)Add pick listener to receive pick eventsPvPickEvent.voidaddPopupItem(int menuID)Add a menu item to the right-mouse popup menu.voidcenter()Scale camera such that current geometries are centered in the display.voidclearPopupMenu()Removes all added menu items from right-mouse popup menu, except some standard JavaView items such as "exit".booleancontainsGeometry(PgGeometryIf anObject)Check whether geometry is registered in display.voidenableClip(boolean aFlag)Deprecated.use#setEnabledClipbooleanfit()Scale camera such that current geometries fit into display.java.awt.ColorgetBackgroundColor()Get color of background of display.java.awt.ImagegetBackgroundImage()Get background image of display canvas.java.lang.StringgetBackgroundImageFile()Get background image filename of display canvas.intgetBackgroundImageFit()Get the mode determining how a background image is scaled w.r.t. the display canvas.java.awt.ColorgetBndBoxColor()Get color of bounding box.doublegetBndBoxSize()Get thickness of edges of bounding box.PdVectorgetBoxRatio()Get individual scaling factors of coordinate axes.PvCameraIfgetCamera()Get current camera.PvCameraIfgetCamera(int type)Get a camera object of given type if registered in display.PsPanelgetCameraPanel()Get info panel of current camera.PvCameraIf[]getCameras()Get set of registered cameras.java.awt.CanvasgetCanvas()Get canvas of this display.double[]getClipBounds(int ind)Get minimum and maximum in one dimension of the clipping box.intgetClipBoundsType()Get index of axis which is selected when scene clip bounds is active of becomes active.doublegetFarClip()Get far clip distance of current camera.java.awt.ColorgetForegroundColor()Get foreground color.java.awt.ImagegetForegroundImage()Get foreground image of display canvas.java.lang.StringgetForegroundImageFile()Get foreground image filename of display canvas.intgetForegroundImageFit()Get the mode determining how a foreground image is scaled w.r.t. the display canvas.java.awt.FramegetFrame()Get reference to container frame of display, e.g. to allow display to hide/show frame.PgGeometryIf[]getGeometries()Get all registered geometry in display.java.awt.GraphicsgetGraphics()Deprecated.since JavaView 3.99.011, use getCanvas().getGraphics() instead.PdVectorgetGridIncrements(int gridOrient)Get spacing between grid lines in both coordinate directions.java.awt.ImagegetImage()Get the rendered image of the scene.intgetImageFitMode()Deprecated.use getBackgroundImageFit()PsPanelgetInfoPanel()Get info panel of display.PvLightIfgetLight()Get current light object.intgetLightingModel()Get currently active lighting model.PsPanelgetLightPanel()Get info panel of current camera.PvLightIf[]getLights()Get registered lights as enumeration.intgetMajorMode()Get the current interaction mode.java.lang.StringgetName()Get name of display, e.g. used as title in info panel and hashtable of PvViewer.doublegetNearClip()Get near clip distance of current camera.intgetNumGeometries()Get number of all registered geometry in display.intgetNumLights()Get number of light objects.java.lang.StringgetSceneTitle()Get title of scene.PgGeometryIfgetSelectedGeometry()Get selected geometry in display.PvLightIfgetSelectedLight()Select light from the list of registered lights in this scene.java.awt.DimensiongetSize()Get dimension with height and width of drawing canvas.intgetTransformationMode()Check whether transformation of current model is active, i.e. of model matrix.PdMatrixgetTransMatrix(int type)Get 4*4 transformation matrix or components from current camera and display.PvViewerIfgetViewer()Get the viewer manager of display, which manages multiple displays and is key listener.PgGeometryIf[]getVisibleGeometries()Get all visible registered geometry in display.booleanhasCamera(int type)Determine whether a camera object of given type is registered in display.booleanhasCameraListener(PvCameraListenerIf listener)Check for a registered camera listener.booleanhasGeometryListener(PvGeometryListenerIf listener)Check for a registered geometry listener.booleanhasLight(PvLightIf light)Determine whether a light is registered in display.booleanhasPaintTag(long flags)Check whether either of the bits in argument flags has been set.booleanhasPickListener(PvPickListenerIf listener)Check for a registered pick listener.booleanincrementAutoRotation()Do an increment of the auto-rotation animation.voidinit()Initialize and reset display.booleanisClip()Deprecated.use#isEnabledClipbooleanisEnabled3DLook()Check whether thick vertices and edges are drawn as 3d shapes in z-buffer mode.booleanisEnabledAdaptiveSize()Check whether adaptive thickness of vertices and edges is enabled.booleanisEnabledAnimation()Check whether auto-rotation is enabled.booleanisEnabledAntiAlias()Check if antialiased drawing is enabled.booleanisEnabledBoxRatio()Check whether individual scaling factors of coordinate axes is enabled.booleanisEnabledClip()Check whether clipping with front and back plane is enabled.booleanisEnabledClipAutoBounds()Check whether automatic recalculation of clip range is enabled when clipRange is switched on.booleanisEnabledClipBounds()Check whether clipping along coordinate axes is enabled.booleanisEnabledDirectSelect()Check whether selecting is enabled during mouse pick.booleanisEnabledDoubleBuffer()Check if double buffered drawing is enabled.booleanisEnabledFillDisplay()Check if scaling of scene to fill display is enabled.booleanisEnabledInspection()Check whether display and selected geometry can be inspected in control window.booleanisEnabledIntegerPick()Check whether picking is constrained to an integer grid.booleanisEnabledLocalTransform()Get flag whether local coordinate system is used in camera transformations.booleanisEnabledPainters()Check whether painter's algorithm during drawing is enabled.booleanisEnabledRepaint()Determine whether painting is enabled.booleanisEnabledUpdate()Determine whether update mechanism is enabled.booleanisEnabledZBuffer()Check whether z-buffered drawing is enabled.booleanisShowingAxes()Check whether axes of active geometry is currently showing.booleanisShowingBackgroundImage()Check drawing of background image of display window.booleanisShowingBackImage()Check drawing of background image of display window. // * @deprecated use showBackgroundImage(boolean)booleanisShowingBndBox()Check whether bounding box of active geometry is currently showing.booleanisShowingCopyright()Check drawing of copyright information in the display window.booleanisShowingDepthcue()Check if depthcued drawing is enabled.booleanisShowingEdgeAura()Check flag of drawing of edges by one or both elements adjacent to an edge.booleanisShowingEdgesOnce()Check flag of drawing of edges by one or both elements adjacent to an edge.booleanisShowingForegroundImage()Check drawing of foreground image of display window.booleanisShowingFrame()Check whether coordinate frame is currently showing.booleanisShowingGrid()Check whether grid is currently showing.booleanisShowingMagnet()Check whether cursor attached to vertices if nearby.booleanisShowingScenegraph()Trueif scenegraph is enabled.booleanisShowingTitle()Check drawing of title north in the display window.booleanisShowingVisible()Trueif visible geometries are show by the display.voidreleasePickFocus()Release pick focus, i.e. to be the unique listener who receives pick events.booleanremoveCamera(int type)Remove camera from the list of installed camera to be current camera in the display.booleanremoveCameraListener(PvCameraListenerIf listener)Remove a registered camera listener from list of registered listeners.voidremoveGeometries()Remove all geometries from display and remove any registered pick listener.booleanremoveGeometry(PgGeometryIf anObject)Remove geometry from display.booleanremoveGeometryListener(PvGeometryListenerIf listener)Remove a registered geometry listener from list of registered listeners.voidremoveKeyListener(java.awt.event.KeyListener listener)Remove a keyListener to receive keyboard events of JavaView.booleanremoveLight(PvLightIf light)Remove light from list of registered lights in this scene.voidremoveLights()Remove all lights from list of registered lights in this scene.booleanremovePickListener(PvPickListenerIf listener)Remove a registered pick listener from list of registered listeners.voidrequestPickFocus(PvPickListenerIf listener)Request pick focus, i.e. to be the unique listener who receives pick events.voidsaveDefaults()ALPHA: Save current status of display as default state to which display returns when project and user settings need to be reset.voidsaveInitials()Save current status of display as initial state to which display returns when project and user settings need to be reset.booleanselectCamera(int type)Select camera from the list of installed camera to be current camera in the display.booleanselectGeometry(PgGeometryIf anObject)Select geometry in display to receive pick events.booleanselectLight(PvLightIf light)Select light from the list of registered lights in this scene.voidsetAutoCenter(boolean flag)Set flag which determines whether camera will automatically center on geometry.voidsetAutoRotation(PdVector axis, double angle)Set axis and angle for auto-rotation.voidsetBackgroundColor(java.awt.Color aColor)Set color of background of display.voidsetBackgroundImage(java.awt.Image image)Set background image of display canvas.voidsetBackgroundImageFile(java.lang.String fileName)Set filename of background image of display canvas.voidsetBackgroundImageFit(int mode)Set the mode determining how a background image is scaled w.r.t. the display canvas.voidsetBndBoxColor(java.awt.Color color)Set color of bounding box.voidsetBndBoxSize(double size)Set thickness of edges of bounding box.voidsetBoxRatio(PdVector ratio)Set individual scaling factors of coordinate axes.voidsetClipBounds(int ind, double[] range)Set minimum and maximum in one dimension of the clipping box.voidsetClipBoundsType(int type)Set index of axis which is selected when scene clip bounds is active of becomes active.voidsetDrawingOrder(int order, PgGeometryIf geom)Choose z-order of geometry when drawn in display.voidsetEnabled3DLook(boolean flag)Enable drawing of thick vertices and edges as 3d shapes in z-buffer mode.voidsetEnabledAdaptiveSize(boolean flag)Enabled adaptive thickness of vertices and edges.voidsetEnabledAnimation(boolean aFlag)Enable and disable auto-rotation of scene.voidsetEnabledAntiAlias(boolean flag)Enable antialiased drawing.voidsetEnabledBoxRatio(boolean aFlag)Enable and disable individual scaling factors of coordinate axes.voidsetEnabledClip(boolean aFlag)Enable and disable clipping with front and back plane.voidsetEnabledClipAutoBounds(boolean aFlag)Enable automatic recalculation of clip range when clipRange is switched on.voidsetEnabledClipBounds(boolean aFlag)Enable and disable clipping along coordinate axes.voidsetEnabledDirectSelect(boolean flag)Enable and disable clipping with front and back plane.voidsetEnabledDoubleBuffer(boolean flag)Enable double buffered drawing.voidsetEnabledFillDisplay(boolean flag)Determine if scaling of scene to fill display is enabled.voidsetEnabledInspection(boolean flag)Enable whether display and selected geometry can be inspected in control window.voidsetEnabledIntegerPick(boolean flag)Restrict picking to an integer grid.voidsetEnabledLocalTransform(boolean flag)Set flag whether local coordinate system is used in camera transformations.voidsetEnabledPainters(boolean aFlag)Enable and disable painter's algorithm during drawing.voidsetEnabledRepaint(boolean flag)Set flag which determines whether painting is enabled.voidsetEnabledUpdate(boolean flag)Set flag which determines whether update mechanism is enabled.voidsetEnabledZBuffer(boolean flag)Enable and disable z-buffered drawing of scene.voidsetFarClip(double dist)Set far clip distance of current camera, works even if clipping is disabled.voidsetForegroundColor(java.awt.Color aColor)Set foreground color.voidsetForegroundImage(java.awt.Image image)Set foreground image of display canvas.voidsetForegroundImageFile(java.lang.String fileName)Set foreground image of display canvas.voidsetForegroundImageFit(int mode)Set the mode determining how a background image is scaled w.r.t. the display canvas.voidsetFrame(java.awt.Frame frame)Set reference to container frame of display, e.g. to allow display to hide/show frame.voidsetGridIncrements(int gridOrient, PdVector gridIncrements)Set spacing between grid lines in both coordinate directions.voidsetImageFitMode(int mode)Deprecated.use setBackgroundImageFit(int)voidsetLightingModel(int model)Set current lighting model.voidsetMajorMode(int aMode)Switch between interaction modes like rotating or scaling, usually done interactively.voidsetName(java.lang.String name)Set name of display, e.g. used as title in info panel and hashtable of PvViewer.voidsetNearClip(double dist)Set near clip distance of current camera, works even if clipping is disabled.voidsetPaintTag(long flags, boolean val)Set and clear all bits in argument flags determining painting aspects in the display.voidsetSceneTitle(java.lang.String title)Set title of scene.voidsetSizeWithinFrame(int width, int height)Set height and width of drawing canvas if canvas is inside a frame.voidsetTransformationMode(int mode)Enable transformation of modeling matrix M of single geometry rather than transforming the whole scene by modifying project P and view V matrices.voidsetTransMatrix(int type, PdMatrix mat)Set transformation matrix or components in current camera and display.voidsetViewer(PvViewerIf viewer)Set the viewer manager of display, which manages multiple displays and is key listener.voidshowAxes(boolean aFlag)Set visibility of axes active geometry, and create axes if not available.voidshowBackgroundImage(boolean aFlag)Enable and disable drawing of background image of display window.voidshowBndBox(boolean aFlag)Set visibility of bounding box active geometry, and create bounding box if not available.voidshowCopyright(boolean aFlag)Enable and disable drawing of copyright information in the display window.voidshowDepthcue(boolean aFlag)Enable and disable depthcue drawing.voidshowEdgeAura(boolean aFlag)Enable and disable drawing of edges by one or both elements adjacent to an edge.voidshowEdgesOnce(boolean aFlag)Enable and disable drawing of edges by one or both elements adjacent to an edge.voidshowForegroundImage(boolean aFlag)Enable and disable drawing of foreground image of display window.voidshowFrame(boolean aFlag)Set visibility of coordinate frame is shown, and create frame if not available.voidshowGrid(boolean aFlag)Set visibility of grid, and create grid if not available.voidshowMagnet(boolean aFlag)Attach cursor to vertices if nearby.voidshowScenegraph(boolean aFlag)Enable and disable scenegraph drawing.voidshowTitle(boolean aFlag)Enable and disable drawing of title north in the display window.voidshowVisible(boolean aFlag)Enable and disable showing of visible geometries.voidstart()Start auto-rotation in viewer where a matrix is constantly multiplied to transformation matrix.voidstop()Stop auto-rotation in viewer.booleanupdate(java.lang.Object event)Update mechanism of JavaView.-
Methods inherited from interface jv.object.PsUpdateIf
getFather, setParent
-
-
-
-
Field Detail
-
MODE_ORBIT
static final int MODE_ORBIT
Major mode in display to rotate geometry.- See Also:
- Constant Field Values
-
MODE_SCALE
static final int MODE_SCALE
Major mode in display to scale geometry by zooming.- See Also:
- Constant Field Values
-
MODE_SCALE_RECT
static final int MODE_SCALE_RECT
Major mode in display to scale geometry by zooming into a specified rectangle.- See Also:
- Constant Field Values
-
MODE_TRANS
static final int MODE_TRANS
Major mode in display to (x,y)-translate geometry.- See Also:
- Constant Field Values
-
MODE_TRANS_Z
static final int MODE_TRANS_Z
Major mode in display to z-translate geometry.- See Also:
- Constant Field Values
-
MODE_PICK
static final int MODE_PICK
Major mode in display to pick and modify vertices.- See Also:
- Constant Field Values
-
MODE_INITIAL_PICK
static final int MODE_INITIAL_PICK
Major mode in display to select initial points on geometries.- See Also:
- Constant Field Values
-
MODE_HIGHLIGHT
static final int MODE_HIGHLIGHT
Major mode in display to highlight items on geometries if they receive focus.- See Also:
- Constant Field Values
-
MODE_DISPLAY_PICK
static final int MODE_DISPLAY_PICK
Major mode in display to select initial points in display without picking geometries.- See Also:
- Constant Field Values
-
MODE_MARK
static final int MODE_MARK
Major mode in display to mark a set of points on geometries.- See Also:
- Constant Field Values
-
MODE_MARK_ELEMENTS
static final int MODE_MARK_ELEMENTS
Major mode in display to mark a set of elements on geometries.- See Also:
- Constant Field Values
-
MODE_UNMARK_ELEMENTS
static final int MODE_UNMARK_ELEMENTS
Major mode in display to mark a set of elements on geometries.- See Also:
- Constant Field Values
-
MODE_UNMARK
static final int MODE_UNMARK
Major mode in display to unmark a set of points on surfaces.- See Also:
- Constant Field Values
-
MODE_ADD
static final int MODE_ADD
Major mode in display to add new points of geometries.- See Also:
- Constant Field Values
-
MODE_DELETE
static final int MODE_DELETE
Major mode in display to delete items or geometries.- See Also:
- Constant Field Values
-
MODE_DUPLICATE
static final int MODE_DUPLICATE
Major mode in display to duplicate geometries.- See Also:
- Constant Field Values
-
MODE_ADD_ELEMENT
static final int MODE_ADD_ELEMENT
Major mode in display to add new elements to geometry.- See Also:
- Constant Field Values
-
MODE_VERTICAL
static final int MODE_VERTICAL
Major mode in display to rotate geometry either around z-axis of scene or around x-axis of display canvas, depending on larger mouse increment.- See Also:
- Constant Field Values
-
MODE_DRAWING
static final int MODE_DRAWING
Major mode allows to draw sketches in the display which are then converted to strokes.- See Also:
- Constant Field Values
-
MODE_FLY
static final int MODE_FLY
Minor mode in display to fly towards to or away from the camera interest.- See Also:
- Constant Field Values
-
MODE_URL
static final int MODE_URL
Minor mode in display to follow hyperlinks attached to vertices and elements.- See Also:
- Constant Field Values
-
MODE_DETAIL
static final int MODE_DETAIL
Minor mode in display to show detail information of geometry items.- See Also:
- Constant Field Values
-
MODE_BOUNDARY_PICK
static final int MODE_BOUNDARY_PICK
Minor mode in display to pick boundaries of geometries.- See Also:
- Constant Field Values
-
MODE_MARK_ELEMENT
static final int MODE_MARK_ELEMENT
- See Also:
- Constant Field Values
- HACK:
- (kp 2014-09-25) Major mode in display to mark a single element on geometries at a time.
-
CAMERA_PERSPECTIVE
static final int CAMERA_PERSPECTIVE
Deprecated. use corresponding instance of PvCameraIfCamera type and projection mode allowing to arbitrary rotate camera.- See Also:
- Constant Field Values
-
CAMERA_ORTHO_XY
static final int CAMERA_ORTHO_XY
Deprecated. use corresponding instance of PvCameraIfCamera type and projection mode projecting orthogonally onto xy-plane.- See Also:
- Constant Field Values
-
CAMERA_ORTHO_XZ
static final int CAMERA_ORTHO_XZ
Deprecated. use corresponding instance of PvCameraIfCamera type and projection mode projecting orthogonally onto xz-plane.- See Also:
- Constant Field Values
-
CAMERA_ORTHO_YZ
static final int CAMERA_ORTHO_YZ
Deprecated. use corresponding instance of PvCameraIfCamera type and projection mode projecting orthogonally onto yz-plane.- See Also:
- Constant Field Values
-
CAMERA_MODEL
static final int CAMERA_MODEL
Deprecated. use corresponding instance of PvCameraIfMisused camera type in display, simulates transformation of modeling matrix of geometry.- See Also:
- Constant Field Values
-
CAMERA_NAME
static final java.lang.String[] CAMERA_NAME
Deprecated. use PvCameraIf#CAMERA_NAMEArray of camera names. Position of names must match the integer id's of PvDisplayIf.CAMERA_PERSPECTIVE etc.
-
TRANSFORM_CAMERA
static final int TRANSFORM_CAMERA
Viewing transformations affect the camera viewing matrix.- See Also:
- Constant Field Values
-
TRANSFORM_MODEL
static final int TRANSFORM_MODEL
Viewing transformations affect the modeling matrix of geometry.- See Also:
- Constant Field Values
-
TRANSFORM_AMBIENT
static final int TRANSFORM_AMBIENT
Viewing transformations affect the ambient modeling matrix of geometry.- See Also:
- Constant Field Values
-
GRID_XY
static final int GRID_XY
Orientation of the grid to lie in the xy-plane.- See Also:
- Constant Field Values
-
GRID_YZ
static final int GRID_YZ
Orientation of the grid to lie in the yz-plane.- See Also:
- Constant Field Values
-
GRID_XZ
static final int GRID_XZ
Orientation of the grid to lie in the xz-plane.- See Also:
- Constant Field Values
-
IMAGE_CENTER
static final int IMAGE_CENTER
Determines that a background image is positioned in the center of a display.- See Also:
- Constant Field Values
-
IMAGE_FIT
static final int IMAGE_FIT
Determines that a background image is uniformly scaled to fill the display.- See Also:
- Constant Field Values
-
IMAGE_RESIZE
static final int IMAGE_RESIZE
Determines that a background image is (non-uniformly) resized to fill the display.- See Also:
- Constant Field Values
-
IMAGE_TESSELATE
static final int IMAGE_TESSELATE
Determines that a background image is repeated to fill the display.- See Also:
- Constant Field Values
-
MATRIX_TRANS
static final int MATRIX_TRANS
Type of full transformation matrix PVM used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_PROJVIEW
static final int MATRIX_PROJVIEW
Type of transformation matrix PV used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_PROJECT
static final int MATRIX_PROJECT
Type of projection matrix used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_VIEW
static final int MATRIX_VIEW
Type of camera viewing matrix used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_MODEL
static final int MATRIX_MODEL
Type of geometry modeling matrix used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_INV_TRANS
static final int MATRIX_INV_TRANS
Type of inverse full transformation matrix PVM^-1 used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_INV_PROJVIEW
static final int MATRIX_INV_PROJVIEW
Type of inverse transformation matrix PV^-1 used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_INV_PROJECT
static final int MATRIX_INV_PROJECT
Type of inverse projection matrix used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_INV_VIEW
static final int MATRIX_INV_VIEW
Type of inverse camera viewing matrix used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_INV_MODEL
static final int MATRIX_INV_MODEL
Type of inverse geometry modeling matrix used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_AMBIENT
static final int MATRIX_AMBIENT
Type of geometry ambient modeling matrix used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_INV_AMBIENT
static final int MATRIX_INV_AMBIENT
Type of inverse geometry ambient modeling matrix used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_TRANS_NON
static final int MATRIX_TRANS_NON
Type of full transformation matrix PVM used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_PROJVIEW_NON
static final int MATRIX_PROJVIEW_NON
Type of transformation matrix PV used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_PROJECT_NON
static final int MATRIX_PROJECT_NON
Type of projection matrix used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_INV_TRANS_NON
static final int MATRIX_INV_TRANS_NON
Type of inverse full transformation matrix PVM^-1 used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_INV_PROJVIEW_NON
static final int MATRIX_INV_PROJVIEW_NON
Type of inverse transformation matrix PV^-1 used by cameras and display.- See Also:
- Constant Field Values
-
MATRIX_INV_PROJECT_NON
static final int MATRIX_INV_PROJECT_NON
Type of inverse projection matrix used by cameras and display.- See Also:
- Constant Field Values
-
PAINT_ALL
static final int PAINT_ALL
Enable drawing in display canvas, default enabled, otherwise no repaint of the display happens, and nothing is visible nor changes. Clear this flag to prevent repainting of the display if a number of geometries must be updated at the same time. Further, when setting the tag again, then the display issues a repaint() command. Therefore, if the tag is set after the last of a sequence of geometry updates then the display repaints automatically.- See Also:
- Constant Field Values
-
PAINT_BACKGROUND
static final int PAINT_BACKGROUND
Enable drawing of colored background. If disabled background is white.- See Also:
- Constant Field Values
-
PAINT_BORDER
static final int PAINT_BORDER
Enable drawing of sunk border around display canvas.- See Also:
- Constant Field Values
-
PAINT_ZOOM
static final int PAINT_ZOOM
Scale transformation matrix to simulate floating point accuracy in pixel integers. Required for PostScript printing to increase pixel accuracy.HACK: This PostScript Driver temporarily scales all integer valued quantities during display by a factor of 1000 to increase accuracy. The variable PvThickGraphics.ZOOM is set to allow to adjust all 'thickness' sizes as well. The thickness sizes are not scaled by PostScript, so we must do it in PvThickGraphics by hand. This procedure is very error prone.
- See Also:
- Constant Field Values
-
PAINT_CROSS
static final int PAINT_CROSS
Enable drawing of cross at current cursor position.- See Also:
- Constant Field Values
-
PAINT_BACKGROUND_IMAGE
static final int PAINT_BACKGROUND_IMAGE
Enable drawing of background image.- See Also:
- Constant Field Values
-
PAINT_BACKIMAGE
static final int PAINT_BACKIMAGE
Deprecated. use PAINT_BACKGROUND_IMAGEEnable drawing of background image.- See Also:
- Constant Field Values
-
PAINT_FOREGROUND_IMAGE
static final int PAINT_FOREGROUND_IMAGE
Enable drawing of foreground image.- See Also:
- Constant Field Values
-
PAINT_ANTIALIAS
static final int PAINT_ANTIALIAS
Enable antialiasing of display.- See Also:
- Constant Field Values
-
PAINT_BNDBOX
static final int PAINT_BNDBOX
Enable drawing of bounding box of current geometry.- See Also:
- Constant Field Values
-
PAINT_INFO
static final int PAINT_INFO
Enable drawing of additional information close to cursor in overlay window.Note, drawing of additional information can cause the display refresh rate to slow down since after each mouse movement a complex pick event is generated by intersecting all geometries with a ray.
- See Also:
- Constant Field Values
-
PAINT_FRAME
static final int PAINT_FRAME
Enable drawing of a small coordinate frame in the lower left corner of the display.- See Also:
- Constant Field Values
-
PAINT_AXES
static final int PAINT_AXES
Enable drawing of a coordinate axes around scene in the display.- See Also:
- Constant Field Values
-
PAINT_SINGLE
static final int PAINT_SINGLE
Restrict drawing to a single geometry at the same time. Unsetting the flag allows multiple geometries to be visible at the same time, which is the default.This flag only determines the number of visible geometries. Independent of this flag there may only be a single geometry active.
- See Also:
- Constant Field Values
-
PAINT_MAGNET
static final int PAINT_MAGNET
Attach cursor to vertices of nearby.- See Also:
- Constant Field Values
-
PAINT_CLEAR_SCREEN
static final int PAINT_CLEAR_SCREEN
Enable clearing of screen after each repaint.- See Also:
- Constant Field Values
-
PAINT_CENTER
static final int PAINT_CENTER
Enable drawing of center of active geometry.- See Also:
- Constant Field Values
-
PICK_ALL
static final int PICK_ALL
All geometries of a display are pickable in pick and initialPick modes (default). Alternatively, a set of other geometry classes may be determined using or'ed combinations of other PICK_yyy types.- Since:
- JavaView 3.96.037
- See Also:
- Constant Field Values
- Version:
- 04.09.06, 1.00 created (kp)
-
PICK_SELECTED
static final int PICK_SELECTED
The selected geometry of a display is pickable in pick and initialPick modes.- See Also:
- Constant Field Values
-
PICK_UNSELECTED
static final int PICK_UNSELECTED
The selected geometry of a display is pickable in pick and initialPick modes.- See Also:
- Constant Field Values
-
PICK_BACKGROUND
static final int PICK_BACKGROUND
The background geometry of a display is pickable in pick and initialPick modes.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSceneTitle
java.lang.String getSceneTitle()
Get title of scene.
-
setSceneTitle
void setSceneTitle(java.lang.String title)
Set title of scene.
-
getName
java.lang.String getName()
Get name of display, e.g. used as title in info panel and hashtable of PvViewer.- Specified by:
getNamein interfacePsUpdateIf
-
setName
void setName(java.lang.String name)
Set name of display, e.g. used as title in info panel and hashtable of PvViewer.
-
init
void init()
Initialize and reset display.
-
saveInitials
void saveInitials()
Save current status of display as initial state to which display returns when project and user settings need to be reset. Typically, after a main program sets up the initial configuration of a display, this status might be saved as ground truth of this running session, e.g. end ofPvViewer.start().- Since:
- JavaView 4.70.010
- Version:
- 26.10.16, 1.00 created (kp)
-
saveDefaults
void saveDefaults()
ALPHA: Save current status of display as default state to which display returns when project and user settings need to be reset.- Since:
- JavaView 4.70.010
- Version:
- 26.10.16, 1.00 created (kp)
-
update
boolean update(java.lang.Object event)
Update mechanism of JavaView. Method included since JAX had problems.- Specified by:
updatein interfacePsUpdateIf- Parameters:
event- carries a lot of information- Returns:
- true if event has been handled, otherwise false
- See Also:
PsObject,PsUpdateIf.getFather(),PsUpdateIf.setParent(PsUpdateIf)
-
isEnabledUpdate
boolean isEnabledUpdate()
Determine whether update mechanism is enabled.
-
setEnabledUpdate
void setEnabledUpdate(boolean flag)
Set flag which determines whether update mechanism is enabled.
-
isEnabledRepaint
boolean isEnabledRepaint()
Determine whether painting is enabled.- Since:
- JavaView 3.62.000
- Version:
- 31.10.04, 1.00 created (kp)
-
setEnabledRepaint
void setEnabledRepaint(boolean flag)
Set flag which determines whether painting is enabled. Switch off repaint when updating a larger number of geometries at the same time.- Since:
- JavaView 3.62.000
- Version:
- 31.10.04, 1.00 created (kp)
-
setAutoCenter
void setAutoCenter(boolean flag)
Set flag which determines whether camera will automatically center on geometry.
-
getGraphics
java.awt.Graphics getGraphics()
Deprecated. since JavaView 3.99.011, use getCanvas().getGraphics() instead.General AWT getGraphics(Graphics) method included in interface to allow invocation from outside the display.
-
getCanvas
java.awt.Canvas getCanvas()
Get canvas of this display. Before GL implementation the display was the canvas, not we return a special instance variable. For some time, display still derives from canvas and will in fact be returned.- Since:
- JavaView 3.99.010
- Version:
- 03.02.08, 1.00 created (kp)
-
addGeometry
boolean addGeometry(PgGeometryIf anObject)
Register geometry in display.
-
containsGeometry
boolean containsGeometry(PgGeometryIf anObject)
Check whether geometry is registered in display.
-
removeGeometry
boolean removeGeometry(PgGeometryIf anObject)
Remove geometry from display.
-
removeGeometries
void removeGeometries()
Remove all geometries from display and remove any registered pick listener.
-
selectGeometry
boolean selectGeometry(PgGeometryIf anObject)
Select geometry in display to receive pick events.
-
getSelectedGeometry
PgGeometryIf getSelectedGeometry()
Get selected geometry in display.
-
getNumGeometries
int getNumGeometries()
Get number of all registered geometry in display. Method does not return any special geometries like bounding box, coordinate frames etc.
-
getGeometries
PgGeometryIf[] getGeometries()
Get all registered geometry in display. Method does not return any special geometries like bounding box, coordinate frames etc.
-
getVisibleGeometries
PgGeometryIf[] getVisibleGeometries()
Get all visible registered geometry in display. Method does not return any special geometries like bounding box, coordinate frames etc.
-
center
void center()
Scale camera such that current geometries are centered in the display.
-
fit
boolean fit()
Scale camera such that current geometries fit into display.- Returns:
- true if fitting was successful.
- Version:
- 28.11.02, 1.10 revised (kp) Return value added.
-
getTransMatrix
PdMatrix getTransMatrix(int type)
Get 4*4 transformation matrix or components from current camera and display. Allows to transform world coordinates into screen coordinates [0,0]*[width-1,height-1] of display.- Parameters:
type- Any matrix type jv.project.PvDisplayIf#MATRIX_...
-
setTransMatrix
void setTransMatrix(int type, PdMatrix mat)Set transformation matrix or components in current camera and display. Allows to transform world coordinates into screen coordinates [0,0]*[width-1,height-1] of display.- Parameters:
type- Any matrix type jv.project.PvDisplayIf#MATRIX_...
-
setDrawingOrder
void setDrawingOrder(int order, PgGeometryIf geom)Choose z-order of geometry when drawn in display. For possible values see PvGeometryIf#DRAW_ORDER_*.- See Also:
PvGeometryIf
-
isEnabledInspection
boolean isEnabledInspection()
Check whether display and selected geometry can be inspected in control window.- Since:
- JavaView 3.96.022
- Version:
- 18.06.06, 1.00 created (kp)
-
setEnabledInspection
void setEnabledInspection(boolean flag)
Enable whether display and selected geometry can be inspected in control window.- Since:
- JavaView 3.96.022
- Version:
- 18.06.06, 1.00 created (kp)
-
isEnabledLocalTransform
boolean isEnabledLocalTransform()
Get flag whether local coordinate system is used in camera transformations.- Since:
- JavaView 2.48.007
- Version:
- 22.12.02, 1.00 created (kp) Added to this interface.
-
setEnabledLocalTransform
void setEnabledLocalTransform(boolean flag)
Set flag whether local coordinate system is used in camera transformations.- Since:
- JavaView 2.48.007
- Version:
- 22.12.02, 1.00 created (kp) Added to this interface.
-
isEnabledDirectSelect
boolean isEnabledDirectSelect()
Check whether selecting is enabled during mouse pick.- Since:
- JavaView 2.48.007
- Version:
- 22.12.02, 1.00 created (kp) Added to this interface.
-
setEnabledDirectSelect
void setEnabledDirectSelect(boolean flag)
Enable and disable clipping with front and back plane.- Since:
- JavaView 2.48.007
- Version:
- 22.12.02, 1.00 created (kp) Added to this interface.
-
getTransformationMode
int getTransformationMode()
Check whether transformation of current model is active, i.e. of model matrix. Otherwise, whole scene is transformed, i.e. project and view matrix.- Since:
- JavaView 2.48.007
- Version:
- 22.12.02, 1.00 created (kp) Added to this interface.
-
setTransformationMode
void setTransformationMode(int mode)
Enable transformation of modeling matrix M of single geometry rather than transforming the whole scene by modifying project P and view V matrices.- Since:
- JavaView 2.48.007
- Version:
- 22.12.02, 1.00 created (kp) Added to this interface.
-
addCameraListener
void addCameraListener(PvCameraListenerIf listener)
Add camera listener to receive camera eventsPvCameraEvent.- Parameters:
listener- which is added- See Also:
hasCameraListener(PvCameraListenerIf),removeCameraListener(PvCameraListenerIf)
-
hasCameraListener
boolean hasCameraListener(PvCameraListenerIf listener)
Check for a registered camera listener.- Parameters:
listener- which is queried- Returns:
trueif registered listener found.- See Also:
addCameraListener(PvCameraListenerIf),removeCameraListener(PvCameraListenerIf)
-
removeCameraListener
boolean removeCameraListener(PvCameraListenerIf listener)
Remove a registered camera listener from list of registered listeners.- Parameters:
listener- which is removed- Returns:
falseif listener does not exists.- See Also:
addCameraListener(PvCameraListenerIf),hasCameraListener(PvCameraListenerIf)
-
addGeometryListener
void addGeometryListener(PvGeometryListenerIf listener)
Add geometry listener to receive geometry events.- Parameters:
listener- which is added- Since:
- JavaView 2.48
- See Also:
hasGeometryListener(PvGeometryListenerIf),removeGeometryListener(PvGeometryListenerIf)- Version:
- 09.12.02, 1.00 created (kp)
-
hasGeometryListener
boolean hasGeometryListener(PvGeometryListenerIf listener)
Check for a registered geometry listener.- Parameters:
listener- which is queried- Returns:
trueif registered listener found.- Since:
- JavaView 2.48
- See Also:
addGeometryListener(PvGeometryListenerIf),removeGeometryListener(PvGeometryListenerIf)- Version:
- 09.12.02, 1.00 created (kp)
-
removeGeometryListener
boolean removeGeometryListener(PvGeometryListenerIf listener)
Remove a registered geometry listener from list of registered listeners.- Parameters:
listener- which is removed- Returns:
falseif listener does not exists.- Since:
- JavaView 2.48
- See Also:
addGeometryListener(PvGeometryListenerIf),hasGeometryListener(PvGeometryListenerIf)- Version:
- 09.12.02, 1.00 created (kp)
-
addPickListener
void addPickListener(PvPickListenerIf listener)
Add pick listener to receive pick eventsPvPickEvent.
-
hasPickListener
boolean hasPickListener(PvPickListenerIf listener)
Check for a registered pick listener.- Returns:
trueif registered listener found.- See Also:
addPickListener(PvPickListenerIf),removePickListener(PvPickListenerIf)
-
removePickListener
boolean removePickListener(PvPickListenerIf listener)
Remove a registered pick listener from list of registered listeners.- Parameters:
listener- which is removed- Returns:
falseif listener does not exists.- See Also:
addPickListener(PvPickListenerIf),hasPickListener(PvPickListenerIf)
-
requestPickFocus
void requestPickFocus(PvPickListenerIf listener)
Request pick focus, i.e. to be the unique listener who receives pick events. The focus should only be requested temporarily, and must be released after use.- Parameters:
listener- which will receives pick events- See Also:
releasePickFocus()
-
releasePickFocus
void releasePickFocus()
Release pick focus, i.e. to be the unique listener who receives pick events. The focus should only be requested temporarily, and must be released after use.- See Also:
requestPickFocus(PvPickListenerIf)
-
setMajorMode
void setMajorMode(int aMode)
Switch between interaction modes like rotating or scaling, usually done interactively. Modes may be changed either interactively using a keyboard shortcuts, or via the display panel or using via method. Modes are available in in jv.project.PvDisplayIf, for example,PvDisplayIf.MODE_SCALE- Parameters:
aMode- any of the modes available in PvDisplayIf.- See Also:
getMajorMode()
-
getMajorMode
int getMajorMode()
Get the current interaction mode. Modes may be changed either interactively using a keyboard shortcuts, or via the display panel or using via method. Modes are available in in jv.project.PvDisplayIf, for example,PvDisplayIf.MODE_SCALE- Returns:
- aMode any of the modes available in PvDisplayIf.
- See Also:
setMajorMode(int)
-
addKeyListener
void addKeyListener(java.awt.event.KeyListener listener)
Register a keyListener to receive keyboard events of JavaView.
-
removeKeyListener
void removeKeyListener(java.awt.event.KeyListener listener)
Remove a keyListener to receive keyboard events of JavaView.
-
hasPaintTag
boolean hasPaintTag(long flags)
Check whether either of the bits in argument flags has been set. Possible arguments are all tags PvDisplayIf#PAINT_... If available then preferably use individual isShowing...() methods.
-
setPaintTag
void setPaintTag(long flags, boolean val)Set and clear all bits in argument flags determining painting aspects in the display. Possible arguments are all tags PvDisplayIf#PAINT_... If available then preferably use individual show...(boolean) methods.
-
setAutoRotation
void setAutoRotation(PdVector axis, double angle)
Set axis and angle for auto-rotation. This data is valid until the user starts interacting with the display. The main use of this method is to specify an initial axis for an animation when the display opens.
-
incrementAutoRotation
boolean incrementAutoRotation()
Do an increment of the auto-rotation animation.
-
start
void start()
Start auto-rotation in viewer where a matrix is constantly multiplied to transformation matrix. Use#setAutoRotationto specify a rotation axis. Auto-rotation spawns a new thread.
-
stop
void stop()
Stop auto-rotation in viewer. Usestart()to continue the animation.
-
getImageFitMode
int getImageFitMode()
Deprecated. use getBackgroundImageFit()Get the mode determining how a background image is scaled w.r.t. the display canvas.
-
setImageFitMode
void setImageFitMode(int mode)
Deprecated. use setBackgroundImageFit(int)Set the mode determining how a background image is scaled w.r.t. the display canvas.
-
getBackgroundImageFit
int getBackgroundImageFit()
Get the mode determining how a background image is scaled w.r.t. the display canvas.- Since:
- JavaView 2.36
-
setBackgroundImageFit
void setBackgroundImageFit(int mode)
Set the mode determining how a background image is scaled w.r.t. the display canvas.- Since:
- JavaView 2.36
-
getForegroundImageFit
int getForegroundImageFit()
Get the mode determining how a foreground image is scaled w.r.t. the display canvas.- Since:
- JavaView 2.36
-
setForegroundImageFit
void setForegroundImageFit(int mode)
Set the mode determining how a background image is scaled w.r.t. the display canvas.- Since:
- JavaView 2.36
-
isEnabled3DLook
boolean isEnabled3DLook()
Check whether thick vertices and edges are drawn as 3d shapes in z-buffer mode.- Since:
- JavaView 3.20.004
- Version:
- 11.04.04, 1.00 created (kp)
-
setEnabled3DLook
void setEnabled3DLook(boolean flag)
Enable drawing of thick vertices and edges as 3d shapes in z-buffer mode.- Since:
- JavaView 3.20.004
- Version:
- 11.04.04, 1.00 created (kp)
-
isEnabledAdaptiveSize
boolean isEnabledAdaptiveSize()
Check whether adaptive thickness of vertices and edges is enabled.- Since:
- JavaView 3.22.000
- Version:
- 25.04.04, 1.00 created (kp)
-
setEnabledAdaptiveSize
void setEnabledAdaptiveSize(boolean flag)
Enabled adaptive thickness of vertices and edges.- Since:
- JavaView 3.22.000
- Version:
- 25.04.04, 1.00 created (kp)
-
isEnabledAnimation
boolean isEnabledAnimation()
Check whether auto-rotation is enabled.
-
setEnabledAnimation
void setEnabledAnimation(boolean aFlag)
Enable and disable auto-rotation of scene.
-
isEnabledAntiAlias
boolean isEnabledAntiAlias()
Check if antialiased drawing is enabled.
-
setEnabledAntiAlias
void setEnabledAntiAlias(boolean flag)
Enable antialiased drawing.
-
isShowingAxes
boolean isShowingAxes()
Check whether axes of active geometry is currently showing.
-
showAxes
void showAxes(boolean aFlag)
Set visibility of axes active geometry, and create axes if not available.
-
isShowingBackImage
boolean isShowingBackImage()
Check drawing of background image of display window. // * @deprecated use showBackgroundImage(boolean)
-
isShowingBackgroundImage
boolean isShowingBackgroundImage()
Check drawing of background image of display window.- Since:
- JavaView 2.31
-
showBackgroundImage
void showBackgroundImage(boolean aFlag)
Enable and disable drawing of background image of display window.- Since:
- JavaView 2.31
-
isShowingForegroundImage
boolean isShowingForegroundImage()
Check drawing of foreground image of display window.- Since:
- JavaView 2.31
-
showForegroundImage
void showForegroundImage(boolean aFlag)
Enable and disable drawing of foreground image of display window.- Since:
- JavaView 2.31
-
isShowingBndBox
boolean isShowingBndBox()
Check whether bounding box of active geometry is currently showing.
-
showBndBox
void showBndBox(boolean aFlag)
Set visibility of bounding box active geometry, and create bounding box if not available.
-
isEnabledClip
boolean isEnabledClip()
Check whether clipping with front and back plane is enabled.
-
setEnabledClip
void setEnabledClip(boolean aFlag)
Enable and disable clipping with front and back plane.
-
isEnabledClipAutoBounds
boolean isEnabledClipAutoBounds()
Check whether automatic recalculation of clip range is enabled when clipRange is switched on.
-
setEnabledClipAutoBounds
void setEnabledClipAutoBounds(boolean aFlag)
Enable automatic recalculation of clip range when clipRange is switched on.
-
isEnabledClipBounds
boolean isEnabledClipBounds()
Check whether clipping along coordinate axes is enabled.
-
setEnabledClipBounds
void setEnabledClipBounds(boolean aFlag)
Enable and disable clipping along coordinate axes.
-
isShowingCopyright
boolean isShowingCopyright()
Check drawing of copyright information in the display window.
-
showCopyright
void showCopyright(boolean aFlag)
Enable and disable drawing of copyright information in the display window.
-
isShowingDepthcue
boolean isShowingDepthcue()
Check if depthcued drawing is enabled.
-
showDepthcue
void showDepthcue(boolean aFlag)
Enable and disable depthcue drawing.
-
isEnabledDoubleBuffer
boolean isEnabledDoubleBuffer()
Check if double buffered drawing is enabled.
-
setEnabledDoubleBuffer
void setEnabledDoubleBuffer(boolean flag)
Enable double buffered drawing.
-
isShowingEdgeAura
boolean isShowingEdgeAura()
Check flag of drawing of edges by one or both elements adjacent to an edge.
-
showEdgeAura
void showEdgeAura(boolean aFlag)
Enable and disable drawing of edges by one or both elements adjacent to an edge.
-
isShowingEdgesOnce
boolean isShowingEdgesOnce()
Check flag of drawing of edges by one or both elements adjacent to an edge.
-
showEdgesOnce
void showEdgesOnce(boolean aFlag)
Enable and disable drawing of edges by one or both elements adjacent to an edge.
-
isEnabledFillDisplay
boolean isEnabledFillDisplay()
Check if scaling of scene to fill display is enabled.- Since:
- JavaView v3.94.003.
- Version:
- 28.09.05, 1.00 created (kp)
-
setEnabledFillDisplay
void setEnabledFillDisplay(boolean flag)
Determine if scaling of scene to fill display is enabled.- Since:
- JavaView v3.94.003.
- Version:
- 28.09.05, 1.00 created (kp)
-
isShowingFrame
boolean isShowingFrame()
Check whether coordinate frame is currently showing.
-
showFrame
void showFrame(boolean aFlag)
Set visibility of coordinate frame is shown, and create frame if not available.
-
isShowingGrid
boolean isShowingGrid()
Check whether grid is currently showing.
-
showGrid
void showGrid(boolean aFlag)
Set visibility of grid, and create grid if not available.
-
getGridIncrements
PdVector getGridIncrements(int gridOrient)
Get spacing between grid lines in both coordinate directions.- Returns:
- Increments determine the spacing for both gridlines.
- Since:
- JavaView 3.96.014
- Version:
- 06.06.06, 1.00 created (kp)
-
setGridIncrements
void setGridIncrements(int gridOrient, PdVector gridIncrements)Set spacing between grid lines in both coordinate directions. Must invoke #compute() after orientation has changed.- Parameters:
gridOrient- Determines the xy, yz, or xz plane, see PvDisplayIf#GRID_XY.gridIncrements- Determine the spacing for both gridlines.- Since:
- JavaView 3.96.014
- Version:
- 06.06.06, 1.00 created (kp)
-
isShowingScenegraph
boolean isShowingScenegraph()
Trueif scenegraph is enabled.- Since:
- JavaView 4.08.002
- Version:
- 11.02.14, 1.00 created (kp)
-
showScenegraph
void showScenegraph(boolean aFlag)
Enable and disable scenegraph drawing.- Since:
- JavaView 4.08.002
- Version:
- 11.02.14, 1.00 created (kp)
-
isEnabledIntegerPick
boolean isEnabledIntegerPick()
Check whether picking is constrained to an integer grid.- Since:
- JavaView 3.63.002
-
setEnabledIntegerPick
void setEnabledIntegerPick(boolean flag)
Restrict picking to an integer grid.- Since:
- JavaView 3.63.002
-
isShowingMagnet
boolean isShowingMagnet()
Check whether cursor attached to vertices if nearby.
-
showMagnet
void showMagnet(boolean aFlag)
Attach cursor to vertices if nearby.
-
isEnabledPainters
boolean isEnabledPainters()
Check whether painter's algorithm during drawing is enabled.
-
setEnabledPainters
void setEnabledPainters(boolean aFlag)
Enable and disable painter's algorithm during drawing.
-
isShowingTitle
boolean isShowingTitle()
Check drawing of title north in the display window.- Since:
- JavaView 2.49.004
-
showTitle
void showTitle(boolean aFlag)
Enable and disable drawing of title north in the display window.- Since:
- JavaView 2.49.004
-
isShowingVisible
boolean isShowingVisible()
Trueif visible geometries are show by the display.- Since:
- JavaView 4.81.004
- Version:
- 12.05.17, 1.00 created (kp)
-
showVisible
void showVisible(boolean aFlag)
Enable and disable showing of visible geometries. Allows to temporarily hide the current set of visible geometries by hiding the internal geometry containers.- Since:
- JavaView 4.81.004
- Version:
- 12.05.17, 1.00 created (kp)
-
isEnabledZBuffer
boolean isEnabledZBuffer()
Check whether z-buffered drawing is enabled.
-
setEnabledZBuffer
void setEnabledZBuffer(boolean flag)
Enable and disable z-buffered drawing of scene.
-
getBndBoxColor
java.awt.Color getBndBoxColor()
Get color of bounding box.- Returns:
- color of bounding box
- Since:
- JavaView 2.49.005
- Version:
- 18.01.03, 1.00 created (kp)
-
setBndBoxColor
void setBndBoxColor(java.awt.Color color)
Set color of bounding box.- Parameters:
color- color of bounding box- Since:
- JavaView 2.49.005
- Version:
- 18.01.03, 1.00 created (kp)
-
getBndBoxSize
double getBndBoxSize()
Get thickness of edges of bounding box.- Returns:
- thickness of edges bounding box
- Since:
- JavaView 2.49.005
- Version:
- 18.01.03, 1.00 created (kp)
-
setBndBoxSize
void setBndBoxSize(double size)
Set thickness of edges of bounding box.- Parameters:
size- thickness of edges bounding box- Since:
- JavaView 2.49.005
- Version:
- 18.01.03, 1.00 created (kp)
-
getBoxRatio
PdVector getBoxRatio()
Get individual scaling factors of coordinate axes.- Returns:
- scaling factors of coordinate axes
- Since:
- JavaView 2.60.002
- Version:
- 15.03.03, 1.00 created (kp)
-
setBoxRatio
void setBoxRatio(PdVector ratio)
Set individual scaling factors of coordinate axes.- Parameters:
ratio- scaling factors of coordinate axes- Since:
- JavaView 2.60.002
- Version:
- 15.03.03, 1.00 created (kp)
-
isEnabledBoxRatio
boolean isEnabledBoxRatio()
Check whether individual scaling factors of coordinate axes is enabled.
-
setEnabledBoxRatio
void setEnabledBoxRatio(boolean aFlag)
Enable and disable individual scaling factors of coordinate axes.
-
isClip
boolean isClip()
Deprecated. use#isEnabledClipCheck whether clipping with front and back plane is enabled.
-
enableClip
void enableClip(boolean aFlag)
Deprecated. use#setEnabledClipEnable and disable clipping with front and back plane.
-
getNearClip
double getNearClip()
Get near clip distance of current camera. Returns a value even if clipping is disabled.
-
setNearClip
void setNearClip(double dist)
Set near clip distance of current camera, works even if clipping is disabled.
-
getFarClip
double getFarClip()
Get far clip distance of current camera. Returns a value even if clipping is disabled.
-
setFarClip
void setFarClip(double dist)
Set far clip distance of current camera, works even if clipping is disabled.
-
getClipBoundsType
int getClipBoundsType()
Get index of axis which is selected when scene clip bounds is active of becomes active.- Since:
- JavaView 2.99.012
- Version:
- 01.09.03, 1.00 created (kp)
-
setClipBoundsType
void setClipBoundsType(int type)
Set index of axis which is selected when scene clip bounds is active of becomes active.- Since:
- JavaView 2.99.012
- Version:
- 01.09.03, 1.00 created (kp)
-
getClipBounds
double[] getClipBounds(int ind)
Get minimum and maximum in one dimension of the clipping box.- Parameters:
ind- index of ruler of axes in which direction is clipped- Returns:
- range minimum and maximum of visible range in axis direction
- Since:
- JavaView 2.49.005
- Version:
- 19.01.03, 1.00 created (kp)
-
setClipBounds
void setClipBounds(int ind, double[] range)Set minimum and maximum in one dimension of the clipping box.- Parameters:
ind- index of ruler of axes in which direction is clippedrange- minimum and maximum of visible range in axis direction- Since:
- JavaView 2.49.005
- Version:
- 19.01.03, 1.00 created (kp)
-
getBackgroundColor
java.awt.Color getBackgroundColor()
Get color of background of display. If background image is set, then color is visible in transparent regions of the image.
-
setBackgroundColor
void setBackgroundColor(java.awt.Color aColor)
Set color of background of display. If background image is set, then color is visible in transparent regions of the image.
-
getForegroundColor
java.awt.Color getForegroundColor()
Get foreground color. Currently neither defined nor used.
-
setForegroundColor
void setForegroundColor(java.awt.Color aColor)
Set foreground color. Currently neither defined nor used.
-
getBackgroundImage
java.awt.Image getBackgroundImage()
Get background image of display canvas.
-
setBackgroundImage
void setBackgroundImage(java.awt.Image image)
Set background image of display canvas.
-
getBackgroundImageFile
java.lang.String getBackgroundImageFile()
Get background image filename of display canvas.- Returns:
- file name of background image
- Since:
- JavaView 2.31
-
setBackgroundImageFile
void setBackgroundImageFile(java.lang.String fileName)
Set filename of background image of display canvas. Method tries to load file immediately.- Parameters:
fileName- relative file name of image.- Since:
- JavaView 2.31
-
getForegroundImage
java.awt.Image getForegroundImage()
Get foreground image of display canvas.- Since:
- JavaView 2.31
-
setForegroundImage
void setForegroundImage(java.awt.Image image)
Set foreground image of display canvas.- Since:
- JavaView 2.31
-
getForegroundImageFile
java.lang.String getForegroundImageFile()
Get foreground image filename of display canvas.- Returns:
- file name of foreground image
- Since:
- JavaView 2.31
-
setForegroundImageFile
void setForegroundImageFile(java.lang.String fileName)
Set foreground image of display canvas.- Parameters:
fileName- relative file name of image.- Since:
- JavaView 2.31
-
getCamera
PvCameraIf getCamera()
Get current camera.
-
getCameras
PvCameraIf[] getCameras()
Get set of registered cameras.
-
getCamera
PvCameraIf getCamera(int type)
Get a camera object of given type if registered in display. Type is amongPvCameraIf#CAMERA_PERSPECTIVE,PvCameraIf#CAMERA_ORTHO_XY,PvCameraIf#CAMERA_ORTHO_XZ,PvCameraIf#CAMERA_ORTHO_YZ, For a list of possible types seePvDisplayIf.
-
hasCamera
boolean hasCamera(int type)
Determine whether a camera object of given type is registered in display. Type is amongPvCameraIf#CAMERA_PERSPECTIVE,PvCameraIf#CAMERA_ORTHO_XY,PvCameraIf#CAMERA_ORTHO_XZ,PvCameraIf#CAMERA_ORTHO_YZ, For a list of possible types seePvDisplayIf.
-
selectCamera
boolean selectCamera(int type)
Select camera from the list of installed camera to be current camera in the display. Type is amongPvCameraIf#CAMERA_PERSPECTIVE,PvCameraIf#CAMERA_ORTHO_XY,PvCameraIf#CAMERA_ORTHO_XZ,PvCameraIf#CAMERA_ORTHO_YZ, For a list of possible types seePvDisplayIf.
-
removeCamera
boolean removeCamera(int type)
Remove camera from the list of installed camera to be current camera in the display. Type is amongPvCameraIf#CAMERA_PERSPECTIVE,PvCameraIf#CAMERA_ORTHO_XY,PvCameraIf#CAMERA_ORTHO_XZ,PvCameraIf#CAMERA_ORTHO_YZ, For a list of possible types seePvDisplayIf.
-
getLightingModel
int getLightingModel()
Get currently active lighting model.
-
setLightingModel
void setLightingModel(int model)
Set current lighting model.
-
addLight
boolean addLight(PvLightIf light)
Add a light to the current scene. Light is registered using its name.- Parameters:
light- new light added to scene
-
getNumLights
int getNumLights()
Get number of light objects.- Returns:
- number of light objects
-
getLight
PvLightIf getLight()
Get current light object.- Returns:
- current light object
-
getLights
PvLightIf[] getLights()
Get registered lights as enumeration.- Returns:
- array of registered lights
-
hasLight
boolean hasLight(PvLightIf light)
Determine whether a light is registered in display.- Parameters:
light- a light object- Returns:
trueif light is registered.
-
removeLights
void removeLights()
Remove all lights from list of registered lights in this scene.
-
removeLight
boolean removeLight(PvLightIf light)
Remove light from list of registered lights in this scene.- Parameters:
light- a light object- Returns:
trueif light was found and successfully removed.
-
getSelectedLight
PvLightIf getSelectedLight()
Select light from the list of registered lights in this scene.- Returns:
trueif light was found and successfully selected.
-
selectLight
boolean selectLight(PvLightIf light)
Select light from the list of registered lights in this scene.- Parameters:
light- a light object- Returns:
trueif light was found and successfully selected.
-
getCameraPanel
PsPanel getCameraPanel()
Get info panel of current camera. Camera allocates panel if it does not exist.
-
getInfoPanel
PsPanel getInfoPanel()
Get info panel of display. Display allocates panel if it does not exist.
-
getLightPanel
PsPanel getLightPanel()
Get info panel of current camera. Camera allocates panel if it does not exist.
-
getFrame
java.awt.Frame getFrame()
Get reference to container frame of display, e.g. to allow display to hide/show frame.
-
setFrame
void setFrame(java.awt.Frame frame)
Set reference to container frame of display, e.g. to allow display to hide/show frame.
-
getViewer
PvViewerIf getViewer()
Get the viewer manager of display, which manages multiple displays and is key listener.- Since:
- JavaView 2.30
- Version:
- 25.07.02, 1.00 created (kp)
-
setViewer
void setViewer(PvViewerIf viewer)
Set the viewer manager of display, which manages multiple displays and is key listener.- Since:
- JavaView 2.30
- Version:
- 25.07.02, 1.00 created (kp)
-
getImage
java.awt.Image getImage()
Get the rendered image of the scene.
-
getSize
java.awt.Dimension getSize()
Get dimension with height and width of drawing canvas.
-
setSizeWithinFrame
void setSizeWithinFrame(int width, int height)Set height and width of drawing canvas if canvas is inside a frame.
-
clearPopupMenu
void clearPopupMenu()
Removes all added menu items from right-mouse popup menu, except some standard JavaView items such as "exit". Use addPopupItem(int) to fill popup menu with own selection of menu items.- Since:
- JavaView 3.97.044
- See Also:
addPopupItem(int)- Version:
- 05.01.07, 1.00 created (kp)
-
addPopupItem
void addPopupItem(int menuID)
Add a menu item to the right-mouse popup menu. Menu items appear in the same order in which they where added.Possible menu items are all major modes of PvDisplay specified in PsViewerIf#MENU_DISPLAY_XXX plus MENU_FILE_NEW_DISPLAY, MENU_WINDOW_CONSOLE, MENU_INSPECTOR and MENU_SEPARATOR.
- Since:
- JavaView 3.97.044
- See Also:
clearPopupMenu()- Version:
- 05.01.07, 1.00 created (kp)
-
-
"