JavaView© v3.95.000

jv.viewer
Class PvDisplay

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Canvas
          extended byjv.viewer.PvDisplay
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.KeyListener, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, PsUpdateIf, PvDisplayIf, java.lang.Runnable, java.io.Serializable

public final class PvDisplay
extends java.awt.Canvas
implements PvDisplayIf, java.lang.Runnable, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.ActionListener, java.io.Serializable

Display of JavaView for viewing and interaction with 3d geometries. The display is subclass of an AWT canvas and fulfills the interface PvDisplayIf. It may be included inside any Java containter with any layout manager.

A display may be obtained by three different ways:

  1. Simple applets may directly create a display, add a geometry, and call the instance methods of the display to configure it.
  2. A slightly advanced applet should obtain the default display from the central PvViewer instance using PvViewer#getDisplay(). This mechanism avoids any need to connect the geometry of the current project or viewer to the display.
  3. In some cases an applet or project may need additional displays.
Simple applets may directly create a display and call its instance methods.

Each class fulfilling the interface PvDisplayIf can serve as a display in JavaView.

If the display is not added to an AWT container yet then external rendering does not work since this display has no Graphics yet.

See Also:
Serialized Form

Field Summary
 java.lang.String m_backgroundImageFile
          Background image for display.
 java.lang.String m_defBackgroundImageFile
          Default background image for display.
 java.lang.String m_defForegroundImageFile
          Default foreground image for display.
 java.lang.String m_foregroundImageFile
          Background image for display.
static int M_MODE_ADD
           
static int M_MODE_DELETE
           
static int M_MODE_DISPLAY_PICK
           
static int M_MODE_DUPLICATE
           
static int M_MODE_HIGHLIGHT
           
static int M_MODE_INITIAL_PICK
           
static int M_MODE_MARK
           
static int M_MODE_MARK_ELEMENTS
           
static int M_MODE_ORBIT
           
static int M_MODE_PICK
           
static int M_MODE_SCALE
           
static int M_MODE_SCALE_RECT
           
static int M_MODE_TRANS
           
static int M_MODE_TRANS_Z
           
static int M_MODE_UNMARK
           
static int M_MODE_UNMARK_ELEMENTS
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface jv.project.PvDisplayIf
CAMERA_MODEL, CAMERA_NAME, CAMERA_ORTHO_XY, CAMERA_ORTHO_XZ, CAMERA_ORTHO_YZ, CAMERA_PERSPECTIVE, IMAGE_CENTER, IMAGE_FIT, IMAGE_RESIZE, IMAGE_TESSELATE, MATRIX_AMBIENT, MATRIX_INV_AMBIENT, MATRIX_INV_MODEL, MATRIX_INV_PROJECT, MATRIX_INV_PROJECT_NON, MATRIX_INV_PROJVIEW, MATRIX_INV_PROJVIEW_NON, MATRIX_INV_TRANS, MATRIX_INV_TRANS_NON, MATRIX_INV_VIEW, MATRIX_MODEL, MATRIX_PROJECT, MATRIX_PROJECT_NON, MATRIX_PROJVIEW, MATRIX_PROJVIEW_NON, MATRIX_TRANS, MATRIX_TRANS_NON, MATRIX_VIEW, MODE_ADD, MODE_ADD_ELEMENT, MODE_DELETE, MODE_DISPLAY_PICK, MODE_DUPLICATE, MODE_HIGHLIGHT, MODE_INITIAL_PICK, MODE_MARK, MODE_MARK_ELEMENTS, MODE_ORBIT, MODE_PICK, MODE_SCALE, MODE_SCALE_RECT, MODE_TRANS, MODE_TRANS_Z, MODE_UNMARK, MODE_UNMARK_ELEMENTS, MODE_VERTICAL, PAINT_BACKIMAGE, TRANSFORM_AMBIENT, TRANSFORM_CAMERA, TRANSFORM_MODEL
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PvDisplay()
          Constructor of display without viewer as parent.
PvDisplay(java.applet.Applet applet, java.awt.Frame frame)
          Constructor of display inside applet, or inside frame if applet is null.
PvDisplay(PvViewerIf viewer)
          Constructor of display with given argument viewer as parent.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
 int addCamera(java.lang.String aName, PvCamera aCamera)
          Add new camera and make it accessible under the given name.
 void addCameraListener(PvCameraListenerIf listener)
          Add camera listener to receive camera events PvCameraEvent.
 boolean addGeometry(PgGeometryIf aGeom)
          Add geometry to display.
 void addGeometryListener(PvGeometryListenerIf listener)
          Add geometry listener to receive geometry events.
 boolean addLight(PvLightIf light)
          Add a light to the current scene.
 void addPickListener(PvPickListenerIf listener)
          Add pick listener to receive pick events PvPickEvent.
 void burn()
          Burn the current status as texture on each surface.
 void center()
          Center geometry in window, do no scaling
 boolean containsGeometry(PgGeometryIf aGeom)
          Check whether geometry is registered in display.
 void enableClip(boolean aFlag)
          Deprecated. use #setEnabledClip
 boolean fit()
          Center and scale camera such that geometry fits exactly into window.
 int getAmbientProjection()
          Get projection mode of ambient space used in model camera.
 int getAmbientSpace()
          Get ambient space used in model transformations.
 PgAxes getAxes()
          Get axes geometry with individual rulers for each coordinate axis.
 PsPanel getAxisPanel()
          Get info panel of axes object to control all rulers uniformly.
 PsPanel getAxisPanel(int ind)
          Get info panel of individual ruler.
 java.awt.Color getBackgroundColor()
          Get color of background of display.
 java.awt.Image getBackgroundImage()
          Make background image of display available to outside world.
 java.lang.String getBackgroundImageFile()
          Get filename of background image of display canvas.
 int getBackgroundImageFit()
          Get the mode determining how a background image is scaled w.r.t. the display canvas.
 java.awt.Color getBndBoxColor()
          Get color of bounding box.
 double getBndBoxSize()
          Get thickness of edges of bounding box.
 PdVector getBoxRatio()
          Get individual scaling factors of coordinate axes.
 PvCameraIf getCamera()
          Get current camera object.
 PvCameraIf getCamera(int type)
          Get a camera object by type.
 PsPanel getCameraPanel()
          Get info panel of current camera.
 PvCameraIf[] getCameras()
          Get current camera object.
 double[] getClipBounds(int ind)
          Get minimum and maximum in one dimension of the clipping box.
 int getClipBoundsType()
          Get index of axis which is selected when scene clip bounds is active of becomes active.
 double getFarClip()
          Get far clip distance of current camera.
 PsUpdateIf getFather()
          Get father of display.
 java.awt.Color getForegroundColor()
          Get foreground color.
 java.awt.Image getForegroundImage()
          Get foreground image of display canvas.
 java.lang.String getForegroundImageFile()
          Get filename of foreground image of display canvas.
 int getForegroundImageFit()
          Get the mode determining how a foreground image is scaled w.r.t. the display canvas.
 java.awt.Frame getFrame()
          Get reference to container frame of display, e.g. to allow display to hide/show frame.
 java.lang.String getFrameLabel(int index)
          Get one of the labels of the coordinate frame.
 PgGeometryIf[] getGeometries()
          Get array with registered geometries.
 java.awt.Image getImage()
          Make image of display available to outside world.
 int getImageFitMode()
          Deprecated. use getBackgroundImageFit()
 PsPanel getInfoPanel()
          Get info panel of display.
 PvLightIf getLight()
          Get current light object.
 int getLightingModel()
          Get currently active lighting model.
 PsPanel getLightPanel()
          Get info panel of lights.
 PvLightIf[] getLights()
          Get registered lights as array.
 int getMajorMode()
          Get the current interaction mode.
 java.awt.Dimension getMinimumSize()
          Assure correct horizontal size of all project panels.
 java.lang.String getName()
          Get name of this display.
 double getNearClip()
          Get near clip distance of current camera.
 int getNumGeometries()
          Get number of all registered geometry in display.
 int getNumLights()
          Get number of light objects.
 PvPickEvent getPickEvent(int x, int y)
          Find intersection of ray through pick locus on registered geometries.
 java.awt.Point getPosition(int xPos, int yPos)
          Get upper left corner of frame, or null if no parent frame available.
 java.awt.Dimension getPreferredSize()
          Assure correct horizontal size of all project panels.
 java.lang.String getSceneTitle()
          Get title of scene.
 java.lang.String[] getSearchPaths()
          Get image search paths.
 PgGeometryIf getSelectedGeometry()
          Get currently selected geometry.
 PvLightIf getSelectedLight()
          Select light from the list of registered lights in this scene.
 java.awt.Dimension getSize()
          Get height of drawing canvas.
 int getTransformationMode()
          Check whether transformation of current model is active, i.e. of model matrix.
 PdMatrix getTransMatrix(int type)
          Get 4*4 transformation matrix or components from current camera and display.
 PvViewerIf getViewer()
          Get the viewer manager of display, which manages multiple displays and is key listener.
 PgGeometryIf[] getVisibleGeometries()
          Get array with registered and visible geometries.
 boolean hasAxes()
          Check existence of axes geometry.
 boolean hasCamera(int type)
          Determine whether a camera object of given type is registered in display.
 boolean hasCameraListener(PvCameraListenerIf listener)
          Check for a registered listener.
 boolean hasGeometryListener(PvGeometryListenerIf listener)
          Check for a registered geometry listener.
 boolean hasLight(PvLightIf light)
          Determine whether a light is registered in display.
 boolean hasPaintTag(long flags)
          Check whether either if the bits in parameter has been set.
 boolean hasPickListener(PvPickListenerIf listener)
          Check for a registered listener.
 boolean incrementAutoRotation()
          Do a single increment of auto-rotation animaton.
 void init()
          Initialize and reset dispay.
 boolean isClip()
          Deprecated. use #isEnabledClip
 boolean isEnabled3DLook()
          Check whether thick vertices and edges are drawn as 3d shapes in z-buffer mode.
 boolean isEnabledAdaptiveSize()
          Check whether adaptive thickness of vertices and edges is enabled.
 boolean isEnabledAnimation()
          Check whether auto-rotation is enabled.
 boolean isEnabledAntiAlias()
          Check if antialiased drawing is enabled.
 boolean isEnabledBoxRatio()
          Check whether individual scaling factors of coordinate axes is enabled.
 boolean isEnabledClearScreen()
          Check whether screen is cleared after each repaint.
 boolean isEnabledClip()
          Check whether clipping with front and back plane is enabled.
 boolean isEnabledClipAutoBounds()
          Check whether automatic recalculation of clip range is enabled when clipRange is switched on.
 boolean isEnabledClipBounds()
          Check whether clipping with scene in direction of coordinate axis is enabled.
 boolean isEnabledDirectSelect()
          Check whether selecting is enabled during mouse pick.
 boolean isEnabledDoubleBuffer()
          Check if double buffered drawing is enabled.
 boolean isEnabledExternalRendering()
          Check if rendering into an external image is enabled.
 boolean isEnabledFastZBuffer()
          Check whether z-buffered is disabled during drawing.
 boolean isEnabledFillDisplay()
          Check if scaling of scene to fill display is enabled.
 boolean isEnabledIntegerPick()
          Check whether picking is constrained to an integer grid.
 boolean isEnabledLocalTransform()
          Get flag whether local coordinate system is used in camera transformations.
 boolean isEnabledPainters()
          Check whether painter's algorithm during drawing is enabled.
 boolean isEnabledRepaint()
          Determine whether painting is enabled.
 boolean isEnabledTags()
          Determine whether tag mode is enabled to move marked elements.
 boolean isEnabledUpdate()
          Determine whether update mechanism is enabled.
 boolean isEnabledZBuffer()
          Check whether z-buffered drawing is enabled.
 boolean isShowingAllViews()
          Check drawing of copyright information in the display window.
 boolean isShowingAxes()
          Check whether axes of active geometry is currently showing.
 boolean isShowingBackgroundImage()
          Check drawing of background image of display window.
 boolean isShowingBackImage()
          Deprecated. use isShowingBackgroundImage()
 boolean isShowingBndBox()
          Check whether bounding box of active geometry is currently showing.
 boolean isShowingCamera()
          Check whether active camera of this display is visible.
 boolean isShowingCopyright()
          Check drawing of copyright information in the display window.
 boolean isShowingDepthcue()
          True if depthcue is enabled.
 boolean isShowingEdgeAura()
          Check flag of drawing of edges by one or both elements adjacent to an edge.
 boolean isShowingEdgesOnce()
          Check flag of drawing of edges by one or both elements adjacent to an edge.
 boolean isShowingForegroundImage()
          Check drawing of foreground image of display window.
 boolean isShowingFrame()
          Check whether coordinate frame is currently showing.
 boolean isShowingGrid()
          Check whether grid is currently showing.
 boolean isShowingInterest()
          Check whether interest of active camera is visible.
 boolean isShowingMagnet()
          Check whether cursor attached to vertices if nearby.
 boolean isShowingTitle()
          Check drawing of title north in the display window.
 void keyPressed(java.awt.event.KeyEvent event)
           
 void keyReleased(java.awt.event.KeyEvent event)
           
 void keyTyped(java.awt.event.KeyEvent event)
           
 void mouseClicked(java.awt.event.MouseEvent event)
          Shows popup menu if event is a popup trigger.
 void mouseDragged(java.awt.event.MouseEvent event)
           
 void mouseEntered(java.awt.event.MouseEvent event)
          This display requests the focus when the mouse enters the canvas unless request of focus is disabled by external calls.
 void mouseExited(java.awt.event.MouseEvent event)
          Sets a flag that mouse is outside.
 void mouseMoved(java.awt.event.MouseEvent event)
          Updates mouse position and invokes temporary information like magnet and info.
 void mousePressed(java.awt.event.MouseEvent event)
          Do not react on popup events or other than left mouse clicks.
 void mouseReleased(java.awt.event.MouseEvent event)
           
 void paint(java.awt.Graphics g)
          Override Canvas.paint(g) to initiate redrawing of geometries.
 void recomputeAxes()
          Recalculate length of axes depending on bounding box of scene or current geometry depending on current transformation mode.
 void releasePickFocus()
          Release pick focus, i.e. to be the unique listener who receives pick events.
 boolean removeCamera(int type)
          Remove camera from list of registered cameras.
 boolean removeCameraListener(PvCameraListenerIf listener)
          Remove a registered listener from list of registered listeners.
 void removeGeometries()
          Remove all geometries from list of registered geometries.
 boolean removeGeometry(PgGeometryIf aGeom)
          Remove geometry from list of registered geometries.
 boolean removeGeometryListener(PvGeometryListenerIf listener)
          Remove a registered geometry listener from list of registered listeners.
 boolean removeLight(PvLightIf light)
          Remove light from list of registered lights in this scene.
 void removeLights()
          Remove all lights from list of registered lights in this scene.
 boolean removePickListener(PvPickListenerIf listener)
          Remove a registered listener from list of registered listeners.
 void render()
          Initiate the rendering process when using this display as a batch renderer.
 void repaint()
          For debug only.
 void requestPickFocus(PvPickListenerIf listener)
          Request pick focus, i.e. to be the unique listener who receives pick events.
 void reset()
          Reset this display to state determined by m_sceneDefaults.
 void resetTransformModel()
          Reset ambient and model matrix of current model and modelCamera.
 void run()
          Do the animation by incrementing the transformation matrix with the last action.
 void saveCameraDefaults()
          Save settings of current camera as default.
 boolean selectCamera(int type)
          Select current camera used in dispay by id.
 boolean selectGeometry(PgGeometryIf aGeom)
          Select geometry to be active and receive pick events.
 boolean selectLight(PvLightIf light)
          Select light from the list of registered lights in this scene.
 void setAmbientProjection(int mode)
          Set projection mode of ambient space used in model camera.
 void setAmbientSpace(int mode)
          Set ambient space used in model transformations.
 void setAutoCenter(boolean flag)
          Set flag which determines whether camera will automatically center on geometry.
 void setAutoRotation(PdVector axis, double angle)
          Set axis and angle for auto-rotation.
 void setAxes(PgAxes axes)
          Register axes geometry in this display.
 void setBackgroundColor(java.awt.Color color)
          Set color of background of display.
 void setBackgroundImage(java.awt.Image anImage)
          Set background image of display canvas.
 void setBackgroundImage(java.lang.String fileName)
          Deprecated. use setBackgroundImageFile(String)
 void setBackgroundImageFile(java.lang.String fileName)
          Set filename of background image of display canvas.
 void setBackgroundImageFit(int mode)
          Set the mode determining how a background image is scaled w.r.t. the display canvas.
 void setBndBoxColor(java.awt.Color color)
          Set color of bounding box.
 void setBndBoxSize(double size)
          Set thickness of edges of bounding box.
 void setBoxRatio(PdVector ratio)
          Set individual scaling factors of coordinate axes.
 void setClipBounds(int ind, double[] range)
          Set minimum and maximum in one dimension of the clipping box.
 void setClipBoundsType(int type)
          Set index of axis which is selected when scene clip bounds is active of becomes active.
static void setDefaultSize(java.awt.Dimension size)
          Set default dimension of drawing canvas from outside.
 void setDrawingOrder(int order, PgGeometryIf aGeom)
          Choose z-order of geometry when drawn in display.
 void setEnabled3DLook(boolean flag)
          Enable drawing of thick vertices and edges as 3d shapes in z-buffer mode.
 void setEnabledAdaptiveSize(boolean flag)
          Enabled adaptive thickness of vertices and edges.
 void setEnabledAnimation(boolean flag)
          Enable and disable auto-rotation of scene.
 void setEnabledAntiAlias(boolean flag)
          Enable antialiased drawing.
 void setEnabledBoxRatio(boolean flag)
          Enable and disable individual scaling factors of coordinate axes.
 void setEnabledClearScreen(boolean aFlag)
          Enable clearing of screen after each repaint.
 void setEnabledClip(boolean flag)
          Enable and disable clipping with front and back plane in camera viewing direction.
 void setEnabledClipAutoBounds(boolean flag)
          Enable automatic recalculation of clip range when clipRange is switched on.
 void setEnabledClipBounds(boolean flag)
          Enable and disable clipping of scene along coordinate axes.
 void setEnabledDirectSelect(boolean flag)
          Enable and disable clipping with front and back plane.
 void setEnabledDoubleBuffer(boolean flag)
          Enable double buffered drawing.
 void setEnabledExternalRendering(boolean flag)
          Enable rendering into an external image.
 void setEnabledFastZBuffer(boolean aFlag)
          Enable and disable z-buffered drawing of scene.
 void setEnabledFillDisplay(boolean flag)
          Determine if scaling of scene to fill display is enabled.
 void setEnabledIntegerPick(boolean flag)
          Restrict picking to an integer grid.
 void setEnabledLocalTransform(boolean flag)
          Set flag whether local coordinate system is used in camera transformations.
 void setEnabledPainters(boolean flag)
          Enable and disable painter's algorithm during drawing, i.e. a z-sort of drawing items.
 void setEnabledRepaint(boolean flag)
          Set flag which determines whether painting is enabled.
 void setEnabledTags(boolean flag)
          Enable and disable tag mode to move marked elements.
 void setEnabledUpdate(boolean flag)
          Set flag which determines whether update mechanism is enabled.
 void setEnabledZBuffer(boolean flag)
          Enable and disable z-buffered drawing of scene.
 void setExternalRenderSize(int width, int height)
          Set dimension of the external render image.
 void setFarClip(double dist)
          Set far clip distance of current camera, works even if clipping is disabled.
 void setForegroundColor(java.awt.Color color)
          Set foreground color of display.
 void setForegroundImage(java.awt.Image image)
          Set foreground image of display canvas.
 void setForegroundImageFile(java.lang.String fileName)
          Load an image from file and set it as foreground image of display canvas.
 void setForegroundImageFit(int mode)
          Set the mode determining how a background image is scaled w.r.t. the display canvas.
 void setFrame(java.awt.Frame frame)
          Set reference to container frame of display, e.g. to allow display to hide/show frame.
 void setFrameLabel(int index, java.lang.String label)
          Sets one of the labels of the coordinate frame.
 void setImageFitMode(int mode)
          Deprecated. use setBackgroundImageFit(int)
 void setLightingModel(int model)
          Set current lighting model, and thereby enable or disable usage of light.
 void setMajorMode(int mode)
          Switch between interaction modes like rotating or scaling, usually done interactively.
 void setName(java.lang.String aName)
          Set name of this display.
 void setNearClip(double dist)
          Set near clip distance of current camera, works even if clipping is disabled.
 void setPaintTag(long flags, boolean val)
          Set all bits which are set in parameter.
 void setParent(PsUpdateIf father)
          Set father of display which receives update events when current class has changed.
 void setPosition(int xPos, int yPos)
          Set position of upper left corner of frame from outside.
 void setPreferredSize(java.awt.Dimension size)
          Set default dimension of drawing canvas from outside.
 void setSceneTitle(java.lang.String title)
          Set title of scene.
 void setSearchPaths(java.lang.String[] searchPath)
          Set image search paths.
 void setSizeWithinFrame(int width, int height)
          Set dimension of display which is included in a parent frame.
 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.
 void setTransMatrix(int type, PdMatrix mat)
          Set transformation matrices PV, P, V and their inverses in current camera and display.
 void setViewer(PvViewerIf viewer)
          Set the viewer manager of display, which manages multiple displays and is key listener.
 void showAllViews(boolean flag)
          Enable and disable drawing of copyright information in the display window.
 void showAxes(boolean aFlag)
          Set visibility of axes active geometry, and create axes if not available.
 void showBackgroundImage(boolean aFlag)
          Enable and disable drawing of background image of display window.
 void showBackImage(boolean aFlag)
          Deprecated. use showBackgroundImage(boolean)
 void showBndBox(boolean aFlag)
          Set visibility of bounding box of active geometry, and create bounding box if not available.
 void showCamera(boolean aFlag)
          Set visibility of active camera in this display, and create camera geometry if not available.
 void showCopyright(boolean aFlag)
          Enable and disable drawing of copyright information in the display window.
 void showDepthcue(boolean aFlag)
          Enable and disable depthcue drawing.
 void showEdgeAura(boolean aFlag)
          Enable and disable drawing of edges by one or both elements adjacent to an edge.
 void showEdgesOnce(boolean aFlag)
          Enable and disable drawing of edges by one or both elements adjacent to an edge.
 void showForegroundImage(boolean aFlag)
          Enable and disable drawing of foreground image of display window.
 void showFrame(boolean aFlag)
          Set visibility of coordinate frame is shown, and create frame if not available.
 void showGrid(boolean flag)
          Set visibility of grid, and create grid if not available.
 void showInterest(boolean aFlag)
          Set visibility of interest of active camera, and create interest geometry if not available.
 void showMagnet(boolean aFlag)
          Attach cursor to vertices if nearby.
 void showTitle(boolean aFlag)
          Enable and disable drawing of title north in the display window.
 void start()
          Start animation by creating a new thread
 void stop()
          Stop animation by stopping the thread.
 void update(java.awt.Graphics g)
          Override Component.update(g) to initiate redrawing of geometries.
 boolean update(java.lang.Object event)
          Handle update events sent to display by JavaView.
 
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jv.project.PvDisplayIf
addKeyListener, getGraphics, removeKeyListener
 

Field Detail

M_MODE_ORBIT

public static final int M_MODE_ORBIT
See Also:
Constant Field Values

M_MODE_SCALE

public static final int M_MODE_SCALE
See Also:
Constant Field Values

M_MODE_SCALE_RECT

public static final int M_MODE_SCALE_RECT
See Also:
Constant Field Values

M_MODE_TRANS

public static final int M_MODE_TRANS
See Also:
Constant Field Values

M_MODE_TRANS_Z

public static final int M_MODE_TRANS_Z
See Also:
Constant Field Values

M_MODE_PICK

public static final int M_MODE_PICK
See Also:
Constant Field Values

M_MODE_INITIAL_PICK

public static final int M_MODE_INITIAL_PICK
See Also:
Constant Field Values

M_MODE_HIGHLIGHT

public static final int M_MODE_HIGHLIGHT
See Also:
Constant Field Values

M_MODE_DISPLAY_PICK

public static final int M_MODE_DISPLAY_PICK
See Also:
Constant Field Values

M_MODE_MARK

public static final int M_MODE_MARK
See Also:
Constant Field Values

M_MODE_MARK_ELEMENTS

public static final int M_MODE_MARK_ELEMENTS
See Also:
Constant Field Values

M_MODE_UNMARK_ELEMENTS

public static final int M_MODE_UNMARK_ELEMENTS
See Also:
Constant Field Values

M_MODE_UNMARK

public static final int M_MODE_UNMARK
See Also:
Constant Field Values

M_MODE_ADD

public static final int M_MODE_ADD
See Also:
Constant Field Values

M_MODE_DELETE

public static final int M_MODE_DELETE
See Also:
Constant Field Values

M_MODE_DUPLICATE

public static final int M_MODE_DUPLICATE
See Also:
Constant Field Values

m_defBackgroundImageFile

public java.lang.String m_defBackgroundImageFile
Default background image for display.


m_backgroundImageFile

public java.lang.String m_backgroundImageFile
Background image for display.


m_defForegroundImageFile

public java.lang.String m_defForegroundImageFile
Default foreground image for display.


m_foregroundImageFile

public java.lang.String m_foregroundImageFile
Background image for display.

Constructor Detail

PvDisplay

public PvDisplay()
Constructor of display without viewer as parent. Allows display to act as bean.


PvDisplay

public PvDisplay(PvViewerIf viewer)
Constructor of display with given argument viewer as parent.

Parameters:
viewer - parent of display to handle certain events like export.

PvDisplay

public PvDisplay(java.applet.Applet applet,
                 java.awt.Frame frame)
Constructor of display inside applet, or inside frame if applet is null. Frame is used to allow modification of size of display if no viewer available.

Parameters:
applet - which is container of display
frame - which contains applet, or is container of display
Method Detail

init

public void init()
Description copied from interface: PvDisplayIf
Initialize and reset dispay.

Specified by:
init in interface PvDisplayIf

reset

public void reset()
Reset this display to state determined by m_sceneDefaults.


getName

public java.lang.String getName()
Get name of this display.

Specified by:
getName in interface PvDisplayIf

setName

public void setName(java.lang.String aName)
Set name of this display.

Specified by:
setName in interface PvDisplayIf

getSceneTitle

public java.lang.String getSceneTitle()
Get title of scene.

Specified by:
getSceneTitle in interface PvDisplayIf

setSceneTitle

public void setSceneTitle(java.lang.String title)
Set title of scene.

Specified by:
setSceneTitle in interface PvDisplayIf

getFrame

public java.awt.Frame getFrame()
Get reference to container frame of display, e.g. to allow display to hide/show frame.

Specified by:
getFrame in interface PvDisplayIf

setFrame

public void setFrame(java.awt.Frame frame)
Set reference to container frame of display, e.g. to allow display to hide/show frame.

Specified by:
setFrame in interface PvDisplayIf

getViewer

public PvViewerIf getViewer()
Get the viewer manager of display, which manages multiple displays and is key listener.

Specified by:
getViewer in interface PvDisplayIf
Since:
JavaView 2.30

setViewer

public void setViewer(PvViewerIf viewer)
Set the viewer manager of display, which manages multiple displays and is key listener.

Specified by:
setViewer in interface PvDisplayIf
Since:
JavaView 2.30

addPickListener

public void addPickListener(PvPickListenerIf listener)
Add pick listener to receive pick events PvPickEvent.

Specified by:
addPickListener in interface PvDisplayIf
Parameters:
listener - which is added
See Also:
hasPickListener(PvPickListenerIf), removePickListener(PvPickListenerIf)

hasPickListener

public boolean hasPickListener(PvPickListenerIf listener)
Check for a registered listener.

Specified by:
hasPickListener in interface PvDisplayIf
Parameters:
listener - which is queried
Returns:
true if registered listener found.
See Also:
addPickListener(PvPickListenerIf), removePickListener(PvPickListenerIf)

removePickListener

public boolean removePickListener(PvPickListenerIf listener)
Remove a registered listener from list of registered listeners.

Specified by:
removePickListener in interface PvDisplayIf
Parameters:
listener - which is removed
Returns:
false if listener does not exists.
See Also:
addPickListener(PvPickListenerIf), hasPickListener(PvPickListenerIf)

addGeometryListener

public void addGeometryListener(PvGeometryListenerIf listener)
Add geometry listener to receive geometry events.

Listener is not informed about changes of special geometries of the display like bndbox, frame, or axis.

Specified by:
addGeometryListener in interface PvDisplayIf
Parameters:
listener - which is added
Since:
JavaView 2.48
See Also:
hasGeometryListener(PvGeometryListenerIf), removeGeometryListener(PvGeometryListenerIf)

hasGeometryListener

public boolean hasGeometryListener(PvGeometryListenerIf listener)
Check for a registered geometry listener.

Specified by:
hasGeometryListener in interface PvDisplayIf
Parameters:
listener - which is queried
Returns:
true if registered listener found.
Since:
JavaView 2.48
See Also:
addGeometryListener(PvGeometryListenerIf), removeGeometryListener(PvGeometryListenerIf)

removeGeometryListener

public boolean removeGeometryListener(PvGeometryListenerIf listener)
Remove a registered geometry listener from list of registered listeners.

Specified by:
removeGeometryListener in interface PvDisplayIf
Parameters:
listener - which is removed
Returns:
false if listener does not exists.
Since:
JavaView 2.48
See Also:
addGeometryListener(PvGeometryListenerIf), hasGeometryListener(PvGeometryListenerIf)

addCameraListener

public void addCameraListener(PvCameraListenerIf listener)
Add camera listener to receive camera events PvCameraEvent.

Specified by:
addCameraListener in interface PvDisplayIf
Parameters:
listener - which is added
See Also:
hasCameraListener(PvCameraListenerIf), removeCameraListener(PvCameraListenerIf)

hasCameraListener

public boolean hasCameraListener(PvCameraListenerIf listener)
Check for a registered listener.

Specified by:
hasCameraListener in interface PvDisplayIf
Parameters:
listener - which is queried
Returns:
true if registered listener found.
See Also:
addCameraListener(PvCameraListenerIf), removeCameraListener(PvCameraListenerIf)

removeCameraListener

public boolean removeCameraListener(PvCameraListenerIf listener)
Remove a registered listener from list of registered listeners.

Specified by:
removeCameraListener in interface PvDisplayIf
Parameters:
listener - which is removed
Returns:
false if listener does not exists.
See Also:
addCameraListener(PvCameraListenerIf), hasCameraListener(PvCameraListenerIf)

requestPickFocus

public 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.

Specified by:
requestPickFocus in interface PvDisplayIf
Parameters:
listener - which will receives pick events
See Also:
releasePickFocus()

releasePickFocus

public 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.

Specified by:
releasePickFocus in interface PvDisplayIf
See Also:
requestPickFocus(PvPickListenerIf)

addGeometry

public boolean addGeometry(PgGeometryIf aGeom)
Add geometry to display. Display may show several geometries among one of them is the currently active geometry. The active geometry is the target for picking.

After the first geometry is added, the display performs a fit() operation to center and scale the camera such that the geometry is completely visible in the display.

The first geometry added to a display automatically becomes the active geometry. After having added several geometries the active geometry may be selected with selectGeometry().

Note, default drawing order is PvGeometryIf#DRAW_ORDER_STANDARD which means, that z-depth of geometry elements are orderer in comparison with all other geometries. Except, if drawing order is PvGeometryIf#DRAW_ORDER_FRONT or PvGeometryIf.DRAW_ORDER_BACK then no comparison is done during display. Use method #setDrawingOrder(int, jv.project.PgGeometryIf) to modify the drawing order of a geometry after it has been added to the display.

Specified by:
addGeometry in interface PvDisplayIf

removeGeometries

public void removeGeometries()
Remove all geometries from list of registered geometries. The current geometry is null after this call.

This method does not remove any special geometry like bounding box, axis frame etc. The special geometries must be removed individually using methods like showBndBox(false).

Specified by:
removeGeometries in interface PvDisplayIf

removeGeometry

public boolean removeGeometry(PgGeometryIf aGeom)
Remove geometry from list of registered geometries. The current geometry changes if it was the removed geometry.

If the currently active geometry is removed, then the first geometry becomes active.

Specified by:
removeGeometry in interface PvDisplayIf

selectGeometry

public boolean selectGeometry(PgGeometryIf aGeom)
Select geometry to be active and receive pick events.

Specified by:
selectGeometry in interface PvDisplayIf

containsGeometry

public boolean containsGeometry(PgGeometryIf aGeom)
Check whether geometry is registered in display.

Specified by:
containsGeometry in interface PvDisplayIf

getNumGeometries

public int getNumGeometries()
Get number of all registered geometry in display. Method does not return any special geometries like bounding box, coordinate frames etc.

Specified by:
getNumGeometries in interface PvDisplayIf

getGeometries

public PgGeometryIf[] getGeometries()
Get array with registered geometries. The currently active geometry can be obtained using getSelectedGeometry. Method does not return any special geometries like bounding box which are for internal use only.

Specified by:
getGeometries in interface PvDisplayIf
Returns:
array with registered geometries

getVisibleGeometries

public PgGeometryIf[] getVisibleGeometries()
Get array with registered and visible geometries. Method does not return any special geometries like bounding box which are for internal use only.

Specified by:
getVisibleGeometries in interface PvDisplayIf
Returns:
array with visible geometries
Since:
JavaView 2.68.000

getSelectedGeometry

public PgGeometryIf getSelectedGeometry()
Get currently selected geometry.

Specified by:
getSelectedGeometry in interface PvDisplayIf

center

public void center()
Center geometry in window, do no scaling

Specified by:
center in interface PvDisplayIf

saveCameraDefaults

public void saveCameraDefaults()
Save settings of current camera as default. Default values can be reactivated with the reset button or key.

Since:
JavaView 2.47

fit

public boolean fit()
Center and scale camera such that geometry fits exactly into window. If display was not laid out yet or no geometry available then fit() does nothing and returns false.

Specified by:
fit in interface PvDisplayIf
Returns:
true if fitting was successful.

getBackgroundColor

public 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.

Specified by:
getBackgroundColor in interface PvDisplayIf

setBackgroundColor

public void setBackgroundColor(java.awt.Color color)
Set color of background of display. If background image is set, then color is visible in transparent regions of the image.

Specified by:
setBackgroundColor in interface PvDisplayIf

getForegroundColor

public java.awt.Color getForegroundColor()
Get foreground color. Currently neither defined nor used.

Specified by:
getForegroundColor in interface PvDisplayIf

setForegroundColor

public void setForegroundColor(java.awt.Color color)
Set foreground color of display. Currently neither defined nor used.

Specified by:
setForegroundColor in interface PvDisplayIf

isEnabledAnimation

public boolean isEnabledAnimation()
Check whether auto-rotation is enabled.

Specified by:
isEnabledAnimation in interface PvDisplayIf

setEnabledAnimation

public void setEnabledAnimation(boolean flag)
Enable and disable auto-rotation of scene.

Specified by:
setEnabledAnimation in interface PvDisplayIf

getAmbientSpace

public int getAmbientSpace()
Get ambient space used in model transformations.


setAmbientSpace

public void setAmbientSpace(int mode)
Set ambient space used in model transformations.


getAmbientProjection

public int getAmbientProjection()
Get projection mode of ambient space used in model camera.


setAmbientProjection

public void setAmbientProjection(int mode)
Set projection mode of ambient space used in model camera.


isEnabledLocalTransform

public boolean isEnabledLocalTransform()
Get flag whether local coordinate system is used in camera transformations.

Specified by:
isEnabledLocalTransform in interface PvDisplayIf

setEnabledLocalTransform

public void setEnabledLocalTransform(boolean flag)
Set flag whether local coordinate system is used in camera transformations.

Specified by:
setEnabledLocalTransform in interface PvDisplayIf

getTransformationMode

public 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.

Specified by:
getTransformationMode in interface PvDisplayIf

setTransformationMode

public 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.

Specified by:
setTransformationMode in interface PvDisplayIf

resetTransformModel

public void resetTransformModel()
Reset ambient and model matrix of current model and modelCamera.


getSearchPaths

public java.lang.String[] getSearchPaths()
Get image search paths.

Returns:
array of search paths
Since:
JavaView 3.61.003

setSearchPaths

public void setSearchPaths(java.lang.String[] searchPath)
Set image search paths.

Parameters:
searchPath - array of search paths
Since:
JavaView 3.61.003

isEnabledFillDisplay

public boolean isEnabledFillDisplay()
Check if scaling of scene to fill display is enabled.

Specified by:
isEnabledFillDisplay in interface PvDisplayIf
Since:
JavaView v3.94.003.

setEnabledFillDisplay

public void setEnabledFillDisplay(boolean flag)
Determine if scaling of scene to fill display is enabled.

Specified by:
setEnabledFillDisplay in interface PvDisplayIf
Since:
JavaView v3.94.003.

getImageFitMode

public int getImageFitMode()
Deprecated. use getBackgroundImageFit()

Get the mode determining how a background image is scaled w.r.t. the display canvas.

Specified by:
getImageFitMode in interface PvDisplayIf

setImageFitMode

public void setImageFitMode(int mode)
Deprecated. use setBackgroundImageFit(int)

Set the mode determining how a background image is scaled w.r.t. the display canvas.

Specified by:
setImageFitMode in interface PvDisplayIf

getBackgroundImageFit

public int getBackgroundImageFit()
Get the mode determining how a background image is scaled w.r.t. the display canvas.

Specified by:
getBackgroundImageFit in interface PvDisplayIf
Since:
JavaView 2.36

setBackgroundImageFit

public void setBackgroundImageFit(int mode)
Set the mode determining how a background image is scaled w.r.t. the display canvas.

Specified by:
setBackgroundImageFit in interface PvDisplayIf
Since:
JavaView 2.36

getForegroundImageFit

public int getForegroundImageFit()
Get the mode determining how a foreground image is scaled w.r.t. the display canvas.

Specified by:
getForegroundImageFit in interface PvDisplayIf
Since:
JavaView 2.36

setForegroundImageFit

public void setForegroundImageFit(int mode)
Set the mode determining how a background image is scaled w.r.t. the display canvas.

Specified by:
setForegroundImageFit in interface PvDisplayIf
Since:
JavaView 2.36

isShowingBackImage

public boolean isShowingBackImage()
Deprecated. use isShowingBackgroundImage()

Check drawing of background image of display window.

Specified by:
isShowingBackImage in interface PvDisplayIf

isShowingBackgroundImage

public boolean isShowingBackgroundImage()
Check drawing of background image of display window.

Specified by:
isShowingBackgroundImage in interface PvDisplayIf
Since:
JavaView 2.31

showBackImage

public void showBackImage(boolean aFlag)
Deprecated. use showBackgroundImage(boolean)

Enable and disable drawing of background image of display window.


showBackgroundImage

public void showBackgroundImage(boolean aFlag)
Enable and disable drawing of background image of display window. Image is loaded from file if file name exists and showing of image is enabled.

Specified by:
showBackgroundImage in interface PvDisplayIf
Since:
JavaView 2.31

isShowingForegroundImage

public boolean isShowingForegroundImage()
Check drawing of foreground image of display window.

Specified by:
isShowingForegroundImage in interface PvDisplayIf
Since:
JavaView 2.31

showForegroundImage

public void showForegroundImage(boolean aFlag)
Enable and disable drawing of foreground image of display window. Image is loaded from file if file name exists and showing of image is enabled.

Specified by:
showForegroundImage in interface PvDisplayIf
Since:
JavaView 2.31

isShowingCopyright

public boolean isShowingCopyright()
Check drawing of copyright information in the display window.

Specified by:
isShowingCopyright in interface PvDisplayIf

showCopyright

public void showCopyright(boolean aFlag)
Enable and disable drawing of copyright information in the display window.

Specified by:
showCopyright in interface PvDisplayIf

isShowingTitle

public boolean isShowingTitle()
Check drawing of title north in the display window.

Specified by:
isShowingTitle in interface PvDisplayIf
Since:
JavaView 2.49.004

showTitle

public void showTitle(boolean aFlag)
Enable and disable drawing of title north in the display window.

Specified by:
showTitle in interface PvDisplayIf
Since:
JavaView 2.49.004

isShowingDepthcue

public boolean isShowingDepthcue()
True if depthcue is enabled. No depthcue for non-perspective projections. Depthcue is always switched off for non-perspective projections since they usually show planar geometries where depthcue makes not too much sense.

Specified by:
isShowingDepthcue in interface PvDisplayIf

showDepthcue

public void showDepthcue(boolean aFlag)
Enable and disable depthcue drawing.

Specified by:
showDepthcue in interface PvDisplayIf

getLightingModel

public int getLightingModel()
Get currently active lighting model.

Specified by:
getLightingModel in interface PvDisplayIf
Returns:
lighting model as determined by PvLightIf.MODEL_LIGHT etc.

setLightingModel

public void setLightingModel(int model)
Set current lighting model, and thereby enable or disable usage of light. If lighting model is PvLightIf.MODEL_SURFACE then the surface color is used and explicit lighting is disabled. Lighting model must be set after the lights are known to the display.

Specified by:
setLightingModel in interface PvDisplayIf
Parameters:
model - lighting model as determined by PvLightIf.MODEL_LIGHT etc.

isShowingEdgesOnce

public boolean isShowingEdgesOnce()
Check flag of drawing of edges by one or both elements adjacent to an edge.

Specified by:
isShowingEdgesOnce in interface PvDisplayIf

showEdgesOnce

public void showEdgesOnce(boolean aFlag)
Enable and disable drawing of edges by one or both elements adjacent to an edge.

Specified by:
showEdgesOnce in interface PvDisplayIf

isShowingEdgeAura

public boolean isShowingEdgeAura()
Check flag of drawing of edges by one or both elements adjacent to an edge.

Specified by:
isShowingEdgeAura in interface PvDisplayIf

showEdgeAura

public void showEdgeAura(boolean aFlag)
Enable and disable drawing of edges by one or both elements adjacent to an edge.

Specified by:
showEdgeAura in interface PvDisplayIf

setDrawingOrder

public void setDrawingOrder(int order,
                            PgGeometryIf aGeom)
Choose z-order of geometry when drawn in display. For possible values see e.g. PvGeometryIf#DRAW_ORDER_STANDARD.

Specified by:
setDrawingOrder in interface PvDisplayIf
See Also:
PvGeometryIf

isShowingGrid

public boolean isShowingGrid()
Check whether grid is currently showing.

Specified by:
isShowingGrid in interface PvDisplayIf

showGrid

public void showGrid(boolean flag)
Set visibility of grid, and create grid if not available.

Specified by:
showGrid in interface PvDisplayIf

isShowingFrame

public boolean isShowingFrame()
Check whether coordinate frame is currently showing.

Specified by:
isShowingFrame in interface PvDisplayIf

getFrameLabel

public java.lang.String getFrameLabel(int index)
Get one of the labels of the coordinate frame.

Parameters:
index - 0 for x-Axis, 1 for y-Axis and so on
Since:
JavaView 2.48.005
See Also:
showFrame(boolean)

setFrameLabel

public void setFrameLabel(int index,
                          java.lang.String label)
Sets one of the labels of the coordinate frame.

Parameters:
index - 0 for x-Axis, 1 for y-Axis and so on
Since:
JavaView 2.48.005
See Also:
showFrame(boolean)

showFrame

public void showFrame(boolean aFlag)
Set visibility of coordinate frame is shown, and create frame if not available.

Specified by:
showFrame in interface PvDisplayIf

isShowingBndBox

public boolean isShowingBndBox()
Check whether bounding box of active geometry is currently showing.

Specified by:
isShowingBndBox in interface PvDisplayIf

showBndBox

public void showBndBox(boolean aFlag)
Set visibility of bounding box of active geometry, and create bounding box if not available.

Specified by:
showBndBox in interface PvDisplayIf

getBndBoxColor

public java.awt.Color getBndBoxColor()
Get color of bounding box.

Specified by:
getBndBoxColor in interface PvDisplayIf
Returns:
color of bounding box
Since:
JavaView 2.49.005

setBndBoxColor

public void setBndBoxColor(java.awt.Color color)
Set color of bounding box.

Specified by:
setBndBoxColor in interface PvDisplayIf
Parameters:
color - color of bounding box
Since:
JavaView 2.49.005

getBndBoxSize

public double getBndBoxSize()
Get thickness of edges of bounding box.

Specified by:
getBndBoxSize in interface PvDisplayIf
Returns:
thickness of edges bounding box
Since:
JavaView 2.49.005

setBndBoxSize

public void setBndBoxSize(double size)
Set thickness of edges of bounding box.

Specified by:
setBndBoxSize in interface PvDisplayIf
Parameters:
size - thickness of edges bounding box
Since:
JavaView 2.49.005

isShowingInterest

public boolean isShowingInterest()
Check whether interest of active camera is visible.


showInterest

public void showInterest(boolean aFlag)
Set visibility of interest of active camera, and create interest geometry if not available.
BETA: Currently only used in fly mode.


isShowingCamera

public boolean isShowingCamera()
Check whether active camera of this display is visible.


showCamera

public void showCamera(boolean aFlag)
Set visibility of active camera in this display, and create camera geometry if not available.


isEnabledClearScreen

public boolean isEnabledClearScreen()
Check whether screen is cleared after each repaint.


setEnabledClearScreen

public void setEnabledClearScreen(boolean aFlag)
Enable clearing of screen after each repaint.


addLight

public boolean addLight(PvLightIf light)
Add a light to the current scene. Light is registered using its name.

Specified by:
addLight in interface PvDisplayIf
Parameters:
light - new light added to scene

getNumLights

public int getNumLights()
Get number of light objects.

Specified by:
getNumLights in interface PvDisplayIf
Returns:
number of light objects

getLight

public PvLightIf getLight()
Get current light object.

Specified by:
getLight in interface PvDisplayIf
Returns:
current light object

getLights

public PvLightIf[] getLights()
Get registered lights as array.

Specified by:
getLights in interface PvDisplayIf
Returns:
array of registered lights

hasLight

public boolean hasLight(PvLightIf light)
Determine whether a light is registered in display.

Specified by:
hasLight in interface PvDisplayIf
Parameters:
light - a light object
Returns:
true if light is registered.

removeLights

public void removeLights()
Remove all lights from list of registered lights in this scene.

Specified by:
removeLights in interface PvDisplayIf

removeLight

public boolean removeLight(PvLightIf light)
Remove light from list of registered lights in this scene.

Specified by:
removeLight in interface PvDisplayIf
Parameters:
light - a registered light object to be removed
Returns:
true if light was found and successfully removed.

getSelectedLight

public PvLightIf getSelectedLight()
Select light from the list of registered lights in this scene.

Specified by:
getSelectedLight in interface PvDisplayIf
Returns:
light object if it was found and successfully selected, else null.

hasAxes

public boolean hasAxes()
Check existence of axes geometry.


recomputeAxes

public void recomputeAxes()
Recalculate length of axes depending on bounding box of scene or current geometry depending on current transformation mode.


getAxes

public PgAxes getAxes()
Get axes geometry with individual rulers for each coordinate axis. If axes were never visible and never assigned from outside then no axes exist and null is returned.

Before v2.00 of this method, axes were created if they did not exist.


setAxes

public void setAxes(PgAxes axes)
Register axes geometry in this display. By default, the axes is not visible. Switching off the visib


isShowingAxes

public boolean isShowingAxes()
Check whether axes of active geometry is currently showing.

Specified by:
isShowingAxes in interface PvDisplayIf

showAxes

public void showAxes(boolean aFlag)
Set visibility of axes active geometry, and create axes if not available. If visibility is set to false, then axes are removed from the display but not deleted.

Specified by:
showAxes in interface PvDisplayIf

isEnabledIntegerPick

public boolean isEnabledIntegerPick()
Check whether picking is constrained to an integer grid.

Specified by:
isEnabledIntegerPick in interface PvDisplayIf
Since:
JavaView 3.63.002

setEnabledIntegerPick

public void setEnabledIntegerPick(boolean flag)
Restrict picking to an integer grid.

Specified by:
setEnabledIntegerPick in interface PvDisplayIf
Since:
JavaView 3.63.002

isShowingMagnet

public boolean isShowingMagnet()
Check whether cursor attached to vertices if nearby.

Specified by:
isShowingMagnet in interface PvDisplayIf

showMagnet

public void showMagnet(boolean aFlag)
Attach cursor to vertices if nearby.

Specified by:
showMagnet in interface PvDisplayIf

isEnabledDirectSelect

public boolean isEnabledDirectSelect()
Check whether selecting is enabled during mouse pick.

Specified by:
isEnabledDirectSelect in interface PvDisplayIf

setEnabledDirectSelect

public void setEnabledDirectSelect(boolean flag)
Enable and disable clipping with front and back plane.

Specified by:
setEnabledDirectSelect in interface PvDisplayIf

isEnabledFastZBuffer

public boolean isEnabledFastZBuffer()
Check whether z-buffered is disabled during drawing. Note, z-buffered drawing must be enabled using method setEnabledZBuffer.

See Also:
setEnabledZBuffer(boolean), setEnabledFastZBuffer(boolean)

setEnabledFastZBuffer

public void setEnabledFastZBuffer(boolean aFlag)
Enable and disable z-buffered drawing of scene. Note, z-buffered drawing must be enabled using method setEnabledZBuffer..

See Also:
setEnabledZBuffer(boolean), isEnabledFastZBuffer()

isEnabledZBuffer

public boolean isEnabledZBuffer()
Check whether z-buffered drawing is enabled.

Specified by:
isEnabledZBuffer in interface PvDisplayIf

setEnabledZBuffer

public void setEnabledZBuffer(boolean flag)
Enable and disable z-buffered drawing of scene. Note, z-buffered drawing may be automatically disabled during dragging of mouse using setEnabledFastZBuffer.

Specified by:
setEnabledZBuffer in interface PvDisplayIf
See Also:
isEnabledZBuffer(), setEnabledFastZBuffer(boolean)

isEnabledTags

public boolean isEnabledTags()
Determine whether tag mode is enabled to move marked elements.


setEnabledTags

public void setEnabledTags(boolean flag)
Enable and disable tag mode to move marked elements.


isEnabledPainters

public boolean isEnabledPainters()
Check whether painter's algorithm during drawing is enabled.

Specified by:
isEnabledPainters in interface PvDisplayIf

setEnabledPainters

public void setEnabledPainters(boolean flag)
Enable and disable painter's algorithm during drawing, i.e. a z-sort of drawing items.

Specified by:
setEnabledPainters in interface PvDisplayIf

isEnabledClip

public boolean isEnabledClip()
Check whether clipping with front and back plane is enabled.

Specified by:
isEnabledClip in interface PvDisplayIf

setEnabledClip

public void setEnabledClip(boolean flag)
Enable and disable clipping with front and back plane in camera viewing direction.

Specified by:
setEnabledClip in interface PvDisplayIf

isEnabledClipAutoBounds

public boolean isEnabledClipAutoBounds()
Check whether automatic recalculation of clip range is enabled when clipRange is switched on.

Specified by:
isEnabledClipAutoBounds in interface PvDisplayIf

setEnabledClipAutoBounds

public void setEnabledClipAutoBounds(boolean flag)
Enable automatic recalculation of clip range when clipRange is switched on.

Specified by:
setEnabledClipAutoBounds in interface PvDisplayIf

isEnabledClipBounds

public boolean isEnabledClipBounds()
Check whether clipping with scene in direction of coordinate axis is enabled.

Specified by:
isEnabledClipBounds in interface PvDisplayIf

setEnabledClipBounds

public void setEnabledClipBounds(boolean flag)
Enable and disable clipping of scene along coordinate axes.

Specified by:
setEnabledClipBounds in interface PvDisplayIf

isEnabledBoxRatio

public boolean isEnabledBoxRatio()
Check whether individual scaling factors of coordinate axes is enabled.

Specified by:
isEnabledBoxRatio in interface PvDisplayIf

setEnabledBoxRatio

public void setEnabledBoxRatio(boolean flag)
Enable and disable individual scaling factors of coordinate axes.

Specified by:
setEnabledBoxRatio in interface PvDisplayIf

getBoxRatio

public PdVector getBoxRatio()
Get individual scaling factors of coordinate axes.

Specified by:
getBoxRatio in interface PvDisplayIf
Returns:
scaling factors of coordinate axes
Since:
JavaView 2.60.002

setBoxRatio

public void setBoxRatio(PdVector ratio)
Set individual scaling factors of coordinate axes.

Specified by:
setBoxRatio in interface PvDisplayIf
Parameters:
ratio - scaling factors of coordinate axes
Since:
JavaView 2.60.002

isClip

public boolean isClip()
Deprecated. use #isEnabledClip

Check whether clipping with front and back plane is enabled.

Specified by:
isClip in interface PvDisplayIf

enableClip

public void enableClip(boolean aFlag)
Deprecated. use #setEnabledClip

Enable and disable clipping with front and back plane.

Specified by:
enableClip in interface PvDisplayIf

getNearClip

public double getNearClip()
Get near clip distance of current camera. Returns a value even if clipping is disabled.

Specified by:
getNearClip in interface PvDisplayIf

setNearClip

public void setNearClip(double dist)
Set near clip distance of current camera, works even if clipping is disabled.

Specified by:
setNearClip in interface PvDisplayIf

getFarClip

public double getFarClip()
Get far clip distance of current camera. Returns a value even if clipping is disabled.

Specified by:
getFarClip in interface PvDisplayIf

setFarClip

public void setFarClip(double dist)
Set far clip distance of current camera, works even if clipping is disabled.

Specified by:
setFarClip in interface PvDisplayIf

getClipBoundsType

public int getClipBoundsType()
Get index of axis which is selected when scene clip bounds is active of becomes active.

Specified by:
getClipBoundsType in interface PvDisplayIf
Since:
JavaView 2.99.012

setClipBoundsType

public void setClipBoundsType(int type)
Set index of axis which is selected when scene clip bounds is active of becomes active.

Specified by:
setClipBoundsType in interface PvDisplayIf
Since:
JavaView 2.99.012

getClipBounds

public double[] getClipBounds(int ind)
Get minimum and maximum in one dimension of the clipping box.

Specified by:
getClipBounds in interface PvDisplayIf
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

setClipBounds

public void setClipBounds(int ind,
                          double[] range)
Set minimum and maximum in one dimension of the clipping box.

Specified by:
setClipBounds in interface PvDisplayIf
Parameters:
ind - index of ruler of axes in which direction is clipped
range - minimum and maximum of visible range in axis direction
Since:
JavaView 2.49.005

isEnabled3DLook

public boolean isEnabled3DLook()
Check whether thick vertices and edges are drawn as 3d shapes in z-buffer mode.

Specified by:
isEnabled3DLook in interface PvDisplayIf
Since:
JavaView 3.20.004

setEnabled3DLook

public void setEnabled3DLook(boolean flag)
Enable drawing of thick vertices and edges as 3d shapes in z-buffer mode.

Specified by:
setEnabled3DLook in interface PvDisplayIf
Since:
JavaView 3.20.004

isEnabledAdaptiveSize

public boolean isEnabledAdaptiveSize()
Check whether adaptive thickness of vertices and edges is enabled.

Specified by:
isEnabledAdaptiveSize in interface PvDisplayIf
Since:
JavaView 3.22.000

setEnabledAdaptiveSize

public void setEnabledAdaptiveSize(boolean flag)
Enabled adaptive thickness of vertices and edges.

Specified by:
setEnabledAdaptiveSize in interface PvDisplayIf
Since:
JavaView 3.22.000

getTransMatrix

public 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.

Specified by:
getTransMatrix in interface PvDisplayIf
Parameters:
type - Any matrix type jv.project.PvDisplayIf#MATRIX_...

setTransMatrix

public void setTransMatrix(int type,
                           PdMatrix mat)
Set transformation matrices PV, P, V and their inverses in current camera and display. Allows to transform world coordinates into screen coordinates [0,0]*[width-1,height-1] of display.

Modeling matrix should be set in original geometry model.

Specified by:
setTransMatrix in interface PvDisplayIf
Parameters:
type - Any matrix type jv.project.PvDisplayIf#MATRIX_...

isShowingAllViews

public boolean isShowingAllViews()
Check drawing of copyright information in the display window.


addCamera

public int addCamera(java.lang.String aName,
                     PvCamera aCamera)
Add new camera and make it accessible under the given name. Most applications use the built-in cameras. TODO: Method currently does not allow to add user defined cameras.

Returns:
unique key of camera which allows to select camera, or -1 if error.

getCamera

public PvCameraIf getCamera()
Get current camera object.

Specified by:
getCamera in interface PvDisplayIf
Returns:
current camera object

getCameras

public PvCameraIf[] getCameras()
Get current camera object.

Specified by:
getCameras in interface PvDisplayIf
Returns:
current camera object

getCamera

public PvCameraIf getCamera(int type)
Get a camera object by type. Type is among PvCameraIf#CAMERA_PERSPECTIVE, PvCameraIf#CAMERA_ORTHO_XY, PvCameraIf#CAMERA_ORTHO_XZ, PvCameraIf#CAMERA_ORTHO_YZ, For a list of possible types see PvDisplayIf.

Specified by:
getCamera in interface PvDisplayIf
Parameters:
type - of camera
Returns:
null if argument out of bounds or camera not found.

hasCamera

public boolean hasCamera(int type)
Determine whether a camera object of given type is registered in display. Type is among PvCameraIf#CAMERA_PERSPECTIVE, PvCameraIf#CAMERA_ORTHO_XY, PvCameraIf#CAMERA_ORTHO_XZ, PvCameraIf#CAMERA_ORTHO_YZ, For a list of possible types see PvDisplayIf.

Specified by:
hasCamera in interface PvDisplayIf
Parameters:
type - of camera
Returns:
null if argument out of bounds or camera not found.
See Also:
selectCamera(int)

removeCamera

public boolean removeCamera(int type)
Remove camera from list of registered cameras. Type is among PvCameraIf#CAMERA_PERSPECTIVE, PvCameraIf#CAMERA_ORTHO_XY, PvCameraIf#CAMERA_ORTHO_XZ, PvCameraIf#CAMERA_ORTHO_YZ, For a list of possible types see PvDisplayIf.

Specified by:
removeCamera in interface PvDisplayIf
Parameters:
type - of camera
Returns:
true if camera was found and successfully removed.

getPosition

public java.awt.Point getPosition(int xPos,
                                  int yPos)
Get upper left corner of frame, or null if no parent frame available.


setPosition

public void setPosition(int xPos,
                        int yPos)
Set position of upper left corner of frame from outside.


getSize

public java.awt.Dimension getSize()
Get height of drawing canvas.

Specified by:
getSize in interface PvDisplayIf

setSizeWithinFrame

public void setSizeWithinFrame(int width,
                               int height)
Set dimension of display which is included in a parent frame. This call should be used instead of a direct call of #setSize(Dimension) resp. #setSize(int, int). Size of parent frame is the size of the display plus the its border margins.

Specified by:
setSizeWithinFrame in interface PvDisplayIf
Parameters:
width - width of display area, not of parent frame
height - height of display area, not of parent frame

setDefaultSize

public static void setDefaultSize(java.awt.Dimension size)
Set default dimension of drawing canvas from outside. TODO: since v3.63.002, should use setPreferredSize(Dimension) but problem with static/non-static.


setPreferredSize

public void setPreferredSize(java.awt.Dimension size)
Set default dimension of drawing canvas from outside.

Since:
since JavaView v3.63.002.

setExternalRenderSize

public void setExternalRenderSize(int width,
                                  int height)
Set dimension of the external render image. Currently this modifies the size of the offscreen image. When external rendering is switched off in setEnabledExternalRendering(boolean) then the offscreen image is automatically resized to the required size of this display canvas.

Parameters:
width - width of external render image
height - height of external render image

isEnabledExternalRendering

public boolean isEnabledExternalRendering()
Check if rendering into an external image is enabled.


setEnabledExternalRendering

public void setEnabledExternalRendering(boolean flag)
Enable rendering into an external image.

Drawing into an external image currently blocks rendering into the AWT drawing canvas of this display. Currently, the external image is the offscreen image which may be obtained from this display using getImage() but future versions will allow to set the external image into which rendering is done.


getFather

public PsUpdateIf getFather()
Get father of display. Method must be defined since PvDisplay does not derive from PsObject.

Specified by:
getFather in interface PsUpdateIf
See Also:
PsUpdateIf.setParent(PsUpdateIf), PsUpdateIf.update(Object)

setParent

public void setParent(PsUpdateIf father)
Set father of display which receives update events when current class has changed. Method must be defined since PvDisplay does not derive from PsObject.

Specified by:
setParent in interface PsUpdateIf
Parameters:
father - will receive events which this does not handle
See Also:
PsUpdateIf.getFather(), PsUpdateIf.update(Object)

isEnabledRepaint

public boolean isEnabledRepaint()
Determine whether painting is enabled.

Specified by:
isEnabledRepaint in interface PvDisplayIf
Since:
JavaView 3.62.000

setEnabledRepaint

public 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.

Specified by:
setEnabledRepaint in interface PvDisplayIf
Since:
JavaView 3.62.000

isEnabledUpdate

public boolean isEnabledUpdate()
Determine whether update mechanism is enabled.

Specified by:
isEnabledUpdate in interface PvDisplayIf

setEnabledUpdate

public void setEnabledUpdate(boolean flag)
Set flag which determines whether update mechanism is enabled.

Specified by:
setEnabledUpdate in interface PvDisplayIf

update

public boolean update(java.lang.Object event)
Handle update events sent to display by JavaView. Notice, Java itself sends update(Graphics) calls to display too.

Specified by:
update in interface PvDisplayIf

hasPaintTag

public boolean hasPaintTag(long flags)
Check whether either if the bits in parameter has been set.

Specified by:
hasPaintTag in interface PvDisplayIf
See Also:
setPaintTag(long, boolean)

setPaintTag

public void setPaintTag(long flags,
                        boolean val)
Set all bits which are set in parameter. See jv.project.PvDisplayIf for a list of possible flags.

Special flag for internal purpose is PAINT_ZOOM: Scale transformation matrix to simulate floating point accuracy in pixel integers. Required for PostScript printing to increase pixel accurracy.

HACK: This PostScript Driver temporarily scales all integer valued quantities during display by a factor of PS_ZOOM to increase accuracy. The variable PS_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 proneous.

Setting flag PvDisplayIf#PAINT_ALL invokes a repaint() of the display, just for convience.

Specified by:
setPaintTag in interface PvDisplayIf
See Also:
hasPaintTag(long)

isEnabledAntiAlias

public boolean isEnabledAntiAlias()
Check if antialiased drawing is enabled.

Specified by:
isEnabledAntiAlias in interface PvDisplayIf

setEnabledAntiAlias

public void setEnabledAntiAlias(boolean flag)
Enable antialiased drawing. Antialiased drawing will slow down the rendering speed.

Specified by:
setEnabledAntiAlias in interface PvDisplayIf

isEnabledDoubleBuffer

public boolean isEnabledDoubleBuffer()
Check if double buffered drawing is enabled.

Specified by:
isEnabledDoubleBuffer in interface PvDisplayIf

setEnabledDoubleBuffer

public void setEnabledDoubleBuffer(boolean flag)
Enable double buffered drawing.

Specified by:
setEnabledDoubleBuffer in interface PvDisplayIf

paint

public void paint(java.awt.Graphics g)
Override Canvas.paint(g) to initiate redrawing of geometries.


update

public void update(java.awt.Graphics g)
Override Component.update(g) to initiate redrawing of geometries.


repaint

public void repaint()
For debug only.


render

public void render()
Initiate the rendering process when using this display as a batch renderer.


setAutoCenter

public void setAutoCenter(boolean flag)
Set flag which determines whether camera will automatically center on geometry. An argument false will prevent automatic centering.

Specified by:
setAutoCenter in interface PvDisplayIf

getImage

public java.awt.Image getImage()
Make image of display available to outside world.

Specified by:
getImage in interface PvDisplayIf

getBackgroundImage

public java.awt.Image getBackgroundImage()
Make background image of display available to outside world.

Specified by:
getBackgroundImage in interface PvDisplayIf

setBackgroundImage

public void setBackgroundImage(java.awt.Image anImage)
Set background image of display canvas. Use showForegroundImage(boolean) to set visibility of foreground image.

Specified by:
setBackgroundImage in interface PvDisplayIf

getBackgroundImageFile

public java.lang.String getBackgroundImageFile()
Get filename of background image of display canvas.

Specified by:
getBackgroundImageFile in interface PvDisplayIf
Returns:
relative file name of image.

setBackgroundImageFile

public void setBackgroundImageFile(java.lang.String fileName)
Set filename of background image of display canvas. Method tries to load file immediately if showing of image is enabled.

Specified by:
setBackgroundImageFile in interface PvDisplayIf
Parameters:
fileName - relative file name of image.
Since:
JavaView 2.31

setBackgroundImage

public void setBackgroundImage(java.lang.String fileName)
Deprecated. use setBackgroundImageFile(String)

Load an image from file and set it as background image of display canvas. Method tries to load the image from file immediately.

Parameters:
fileName - relative file name of image.

getForegroundImage

public java.awt.Image getForegroundImage()
Get foreground image of display canvas.

Specified by:
getForegroundImage in interface PvDisplayIf
Since:
JavaView 2.31

setForegroundImage

public void setForegroundImage(java.awt.Image image)
Set foreground image of display canvas. Use showForegroundImage(boolean) to set visibility of foreground image.

Specified by:
setForegroundImage in interface PvDisplayIf
Since:
JavaView 2.31

getForegroundImageFile

public java.lang.String getForegroundImageFile()
Get filename of foreground image of display canvas.

Specified by:
getForegroundImageFile in interface PvDisplayIf
Returns:
relative file name of image.
Since:
JavaView 2.31

setForegroundImageFile

public void setForegroundImageFile(java.lang.String fileName)
Load an image from file and set it as foreground image of display canvas. Method tries to load file immediately if showing of image is enabled.

Specified by:
setForegroundImageFile in interface PvDisplayIf
Parameters:
fileName - relative file name of image.
Since:
JavaView 2.31

mousePressed

public void mousePressed(java.awt.event.MouseEvent event)
Do not react on popup events or other than left mouse clicks.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent event)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent event)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

getPickEvent

public PvPickEvent getPickEvent(int x,
                                int y)
Find intersection of ray through pick locus on registered geometries. First, intersection of ray with active geometry is tested, then intersection with all other visible geometries in the order they appear in the display panel. Non visible geometries are ignored.


mouseMoved

public void mouseMoved(java.awt.event.MouseEvent event)
Updates mouse position and invokes temporary information like magnet and info.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent event)
This display requests the focus when the mouse enters the canvas unless request of focus is disabled by external calls. Disable the requestFocus since this would bring the display to front.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent event)
Sets a flag that mouse is outside.

Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent event)
Shows popup menu if event is a popup trigger.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

getMajorMode

public 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

Specified by:
getMajorMode in interface PvDisplayIf
Returns:
aMode any of the modes available in PvDisplayIf.
See Also:
setMajorMode(int)

setMajorMode

public void setMajorMode(int mode)
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

Specified by:
setMajorMode in interface PvDisplayIf
Parameters:
mode - any of the modes available in PvDisplayIf.
See Also:
getMajorMode()

keyTyped

public void keyTyped(java.awt.event.KeyEvent event)
Specified by:
keyTyped in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent event)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent event)
Specified by:
keyPressed in interface java.awt.event.KeyListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getInfoPanel

public PsPanel getInfoPanel()
Get info panel of display. Display allocates panel if it does not exist.

Specified by:
getInfoPanel in interface PvDisplayIf

getCameraPanel

public PsPanel getCameraPanel()
Get info panel of current camera. Camera allocates panel if it does not exist.

Specified by:
getCameraPanel in interface PvDisplayIf

getAxisPanel

public PsPanel getAxisPanel()
Get info panel of axes object to control all rulers uniformly.


getAxisPanel

public PsPanel getAxisPanel(int ind)
Get info panel of individual ruler.

Parameters:
ind - identifies requested ruler, for example, PsViewerIf.AXIS_X.
Since:
JavaView 3.62.011

getLightPanel

public PsPanel getLightPanel()
Get info panel of lights.

Specified by:
getLightPanel in interface PvDisplayIf

getMinimumSize

public java.awt.Dimension getMinimumSize()
Assure correct horizontal size of all project panels. TODO: locate preferred horizontal size in PsConfig. This method was necessary since especially PaParmSurface_IP tends to shrink.


getPreferredSize

public java.awt.Dimension getPreferredSize()
Assure correct horizontal size of all project panels. TODO: locate preferred horizontal size in PsConfig. This method was necessary since especially PaParmSurface_IP tends to shrink.


start

public void start()
Start animation by creating a new thread

Specified by:
start in interface PvDisplayIf

stop

public void stop()
Stop animation by stopping the thread. Netscape does not like to suspend a thread.

Specified by:
stop in interface PvDisplayIf

setAutoRotation

public void setAutoRotation(PdVector axis,
                            double angle)
Set axis and angle for auto-rotation.

Specified by:
setAutoRotation in interface PvDisplayIf

incrementAutoRotation

public boolean incrementAutoRotation()
Do a single increment of auto-rotation animaton. Method is invoked from PvViewer to generate Gif animations.

Specified by:
incrementAutoRotation in interface PvDisplayIf

run

public void run()
Do the animation by incrementing the transformation matrix with the last action.

Specified by:
run in interface java.lang.Runnable

burn

public void burn()
Burn the current status as texture on each surface.


selectLight

public boolean selectLight(PvLightIf light)
Select light from the list of registered lights in this scene.

Specified by:
selectLight in interface PvDisplayIf
Parameters:
light - a registered light object
Returns:
true if light was found and successfully selected.

showAllViews

public void showAllViews(boolean flag)
Enable and disable drawing of copyright information in the display window.

Parameters:
flag - enable or disable 4-camera-view
Since:
JavaView 2.46

selectCamera

public boolean selectCamera(int type)
Select current camera used in dispay by id. If a requested system camera has not been instantiated yet, then it is created now. Type is among PvCameraIf#CAMERA_PERSPECTIVE, PvCameraIf#CAMERA_ORTHO_XY, PvCameraIf#CAMERA_ORTHO_XZ, PvCameraIf#CAMERA_ORTHO_YZ, For a list of possible types see PvDisplayIf.

Specified by:
selectCamera in interface PvDisplayIf
Parameters:
type - of camera
Returns:
false if type is outOfBounds.

JavaView© v3.95.000

The software JavaView© is copyright protected. All Rights Reserved.