|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Canvas
|
+--jv.viewer.PvDisplay
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:
PvViewer#getDisplay().
This mechanism avoids any need to connect the geometry of the current project or
viewer to the display.
Each class fulfilling the interface PvDisplayIf
can serve as a display in JavaView, e.g. the VRML export filter is an implementation
of this interface.
| Field Summary | |
java.lang.String |
m_backgroundImage
Background image for display. |
java.lang.String |
m_defBackgroundImage
Default 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
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| 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 |
addPickListener(PvPickListenerIf listener)
Add pick listener to receive pick events PvPickEvent. |
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 |
void |
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()
Create a new axes geometry and a supervising axes project. |
java.awt.Color |
getBackgroundColor()
Get color of background of display. |
java.awt.Image |
getBackgroundImage()
Make image of display available to outside world. |
java.lang.String |
getBackgroundImageFile()
Get filename of background image of display canvas. |
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 |
getFarClip()
Get far clip distance of current camera. |
PsUpdateIf |
getFather()
Get father of display. |
java.awt.Color |
getForegroundColor()
Get foreground color. |
java.awt.Frame |
getFrame()
Get reference to container frame of display, e.g. to allow display to hide/show frame. |
PgGeometryIf[] |
getGeometries()
Get array with registered geometries where the first geometry is the currently active geometry. |
java.awt.Image |
getImage()
Make image of display available to outside world. |
int |
getImageFitMode()
Get the mode determining how a background image is scaled w.r.t. the display canvas. |
PsPanel |
getInfoPanel()
Get info panel of display. |
int |
getMajorMode()
Get 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. |
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. |
java.awt.Dimension |
getPreferredSize()
Assure correct horizontal size of all project panels. |
PgGeometryIf |
getSelectedGeometry()
Get currently selected geometry. |
java.awt.Dimension |
getSize()
Get height of drawing canvas. |
PdMatrix |
getTransMatrix(int type)
Get 4*4 transformation matrix or components from current camera and display. |
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 |
hasPaintTag(int 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 |
isEnabledAnimation()
Check whether auto-rotation 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 |
isEnabledFastZBuffer()
Check whether z-buffered is disabled during drawing. |
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 |
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 |
isShowingAxes()
Check whether axes of active geometry is currently showing. |
boolean |
isShowingBackImage()
Check drawing of background image of display window. |
boolean |
isShowingBndBox()
Check whether bounding box of active geometry is currently showing. |
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 |
isShowingFrame()
Check whether coordinate frame is currently showing. |
boolean |
isShowingGrid()
Check whether grid is currently showing. |
boolean |
isShowingMagnet()
Check whether cursor attached to vertices if nearby. |
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)
|
void |
mouseDragged(java.awt.event.MouseEvent event)
|
void |
mouseEntered(java.awt.event.MouseEvent event)
|
void |
mouseExited(java.awt.event.MouseEvent event)
|
void |
mouseMoved(java.awt.event.MouseEvent event)
|
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 |
processMouseEvent(java.awt.event.MouseEvent event)
|
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 |
removePickListener(PvPickListenerIf listener)
Remove a registered listener from list of registered listeners. |
void |
requestPickFocus(PvPickListenerIf listener)
Request pick focus, i.e. to be the unique listener who receives pick events. |
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. |
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. |
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 aColor)
Set color of background of display. |
void |
setBackgroundImage(java.awt.Image anImage)
Set background image of display canvas. |
void |
setBackgroundImage(java.lang.String fileName)
Set filename of background image of display canvas. |
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 |
setEnabledAnimation(boolean aFlag)
Enable and disable auto-rotation of scene. |
void |
setEnabledClearScreen(boolean aFlag)
Enable clearing of screen after each repaint. |
void |
setEnabledClip(boolean aFlag)
Enable and disable clipping with front and back plane. |
void |
setEnabledFastZBuffer(boolean aFlag)
Enable and disable z-buffered drawing of scene. |
void |
setEnabledLocalTransform(boolean flag)
Set flag whether local coordinate system is used in camera transformations. |
void |
setEnabledPainters(boolean aFlag)
Enable and disable painter's algorithm during drawing, i.e. a z-sort of drawing items. |
void |
setEnabledTags(boolean aFlag)
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 aFlag)
Enable and disable z-buffered drawing of scene. |
void |
setFarClip(double dist)
Set far clip distance of current camera, works even if clipping is disabled. |
void |
setForegroundColor(java.awt.Color aColor)
Set foreground color. |
void |
setFrame(java.awt.Frame frame)
Set reference to container frame of display, e.g. to allow display to hide/show frame. |
void |
setImageFitMode(int mode)
Set the mode determining how a background image is scaled w.r.t. the display canvas. |
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(int 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 |
setSizeWithinFrame(int width,
int height)
Set dimension of display which is included in a parent frame. |
void |
setTransMatrix(int type,
PdMatrix mat)
Set transformation matrices PV, P, V and their inverses in current camera and display. |
void |
showAxes(boolean aFlag)
Set visibility of axes active geometry, and create axes if not available. |
void |
showBackImage(boolean aFlag)
Enable and disable drawing of background image of display window. |
void |
showBndBox(boolean aFlag)
Set visibility of bounding box of active geometry, and create bounding box 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 |
showFrame(boolean aFlag)
Set visibility of coordinate frame is shown, and create frame if not available. |
void |
showGrid(boolean aFlag)
Set visibility of grid, and create grid if not available. |
void |
showMagnet(boolean aFlag)
Attach cursor to vertices if nearby. |
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, getAccessibleContext |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getParent, getPeer, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, 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, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setSize, setSize, setVisible, show, show, size, toString, transferFocus, 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 |
public static final int M_MODE_ORBIT
public static final int M_MODE_SCALE
public static final int M_MODE_SCALE_RECT
public static final int M_MODE_TRANS
public static final int M_MODE_TRANS_Z
public static final int M_MODE_PICK
public static final int M_MODE_INITIAL_PICK
public static final int M_MODE_HIGHLIGHT
public static final int M_MODE_DISPLAY_PICK
public static final int M_MODE_MARK
public static final int M_MODE_MARK_ELEMENTS
public static final int M_MODE_UNMARK
public static final int M_MODE_ADD
public static final int M_MODE_DELETE
public static final int M_MODE_DUPLICATE
public java.lang.String m_defBackgroundImage
public java.lang.String m_backgroundImage
| Constructor Detail |
public PvDisplay()
public PvDisplay(PvViewerIf viewer)
viewer - parent of display to handle certain events like export.
public PvDisplay(java.applet.Applet applet,
java.awt.Frame frame)
applet - which is container of displayframe - which contains applet, or is container of display| Method Detail |
public void init()
PvDisplayIfinit in interface PvDisplayIfpublic java.lang.String getName()
getName in interface PvDisplayIfgetName in class java.awt.Componentpublic void setName(java.lang.String aName)
setName in interface PvDisplayIfsetName in class java.awt.Componentpublic java.awt.Frame getFrame()
getFrame in interface PvDisplayIfpublic void setFrame(java.awt.Frame frame)
setFrame in interface PvDisplayIfpublic void addPickListener(PvPickListenerIf listener)
PvPickEvent.addPickListener in interface PvDisplayIfPickListenerIf - hasPickListener(PvPickListenerIf),
removePickListener(PvPickListenerIf)public boolean hasPickListener(PvPickListenerIf listener)
hasPickListener in interface PvDisplayIfPickListenerIf - true if registered listener found.addPickListener(PvPickListenerIf),
removePickListener(PvPickListenerIf)public boolean removePickListener(PvPickListenerIf listener)
removePickListener in interface PvDisplayIfPickListenerIf - false if listener does not exists.addPickListener(PvPickListenerIf),
hasPickListener(PvPickListenerIf)public void addCameraListener(PvCameraListenerIf listener)
PvCameraEvent.addCameraListener in interface PvDisplayIfCameraListenerIf - false if same instance already registered.hasCameraListener(PvCameraListenerIf),
removeCameraListener(PvCameraListenerIf)public boolean hasCameraListener(PvCameraListenerIf listener)
hasCameraListener in interface PvDisplayIfCameraListenerIf - true if registered listener found.addCameraListener(PvCameraListenerIf),
removeCameraListener(PvCameraListenerIf)public boolean removeCameraListener(PvCameraListenerIf listener)
removeCameraListener in interface PvDisplayIfCameraListenerIf - false if listener does not exists.addCameraListener(PvCameraListenerIf),
hasCameraListener(PvCameraListenerIf)public void requestPickFocus(PvPickListenerIf listener)
requestPickFocus in interface PvDisplayIfPickListenerIf - releasePickFocus()public void releasePickFocus()
releasePickFocus in interface PvDisplayIfPickListenerIf - requestPickFocus(PvPickListenerIf)public boolean addGeometry(PgGeometryIf aGeom)
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.
addGeometry in interface PvDisplayIfpublic void removeGeometries()
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).
removeGeometries in interface PvDisplayIfpublic boolean removeGeometry(PgGeometryIf aGeom)
If the currently active geometry is removed, then the first geometry becomes active.
removeGeometry in interface PvDisplayIfpublic boolean selectGeometry(PgGeometryIf aGeom)
selectGeometry in interface PvDisplayIfpublic boolean containsGeometry(PgGeometryIf aGeom)
containsGeometry in interface PvDisplayIfpublic int getNumGeometries()
getNumGeometries in interface PvDisplayIfpublic PgGeometryIf[] getGeometries()
getGeometries in interface PvDisplayIfpublic PgGeometryIf getSelectedGeometry()
getSelectedGeometry in interface PvDisplayIfpublic void center()
public void fit()
fit in interface PvDisplayIfpublic java.awt.Color getBackgroundColor()
getBackgroundColor in interface PvDisplayIfpublic void setBackgroundColor(java.awt.Color aColor)
setBackgroundColor in interface PvDisplayIfpublic java.awt.Color getForegroundColor()
getForegroundColor in interface PvDisplayIfpublic void setForegroundColor(java.awt.Color aColor)
setForegroundColor in interface PvDisplayIfpublic boolean isEnabledAnimation()
isEnabledAnimation in interface PvDisplayIfpublic void setEnabledAnimation(boolean aFlag)
setEnabledAnimation in interface PvDisplayIfpublic int getAmbientSpace()
public void setAmbientSpace(int mode)
public int getAmbientProjection()
public void setAmbientProjection(int mode)
public boolean isEnabledLocalTransform()
public void setEnabledLocalTransform(boolean flag)
public void resetTransformModel()
public int getImageFitMode()
getImageFitMode in interface PvDisplayIfpublic void setImageFitMode(int mode)
setImageFitMode in interface PvDisplayIfpublic boolean isShowingBackImage()
isShowingBackImage in interface PvDisplayIfpublic void showBackImage(boolean aFlag)
showBackImage in interface PvDisplayIfpublic boolean isShowingCopyright()
public void showCopyright(boolean aFlag)
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.isShowingDepthcue in interface PvDisplayIfpublic void showDepthcue(boolean aFlag)
showDepthcue in interface PvDisplayIfpublic boolean isShowingEdgesOnce()
isShowingEdgesOnce in interface PvDisplayIfpublic void showEdgesOnce(boolean aFlag)
showEdgesOnce in interface PvDisplayIfpublic boolean isShowingEdgeAura()
isShowingEdgeAura in interface PvDisplayIfpublic void showEdgeAura(boolean aFlag)
showEdgeAura in interface PvDisplayIf
public void setDrawingOrder(int order,
PgGeometryIf aGeom)
PvGeometryIf#DRAW_ORDER_STANDARD.setDrawingOrder in interface PvDisplayIfPvGeometryIfpublic boolean isShowingGrid()
isShowingGrid in interface PvDisplayIfpublic void showGrid(boolean aFlag)
showGrid in interface PvDisplayIfpublic boolean isShowingFrame()
isShowingFrame in interface PvDisplayIfpublic void showFrame(boolean aFlag)
showFrame in interface PvDisplayIfpublic boolean isShowingBndBox()
isShowingBndBox in interface PvDisplayIfpublic void showBndBox(boolean aFlag)
showBndBox in interface PvDisplayIfpublic boolean isEnabledClearScreen()
public void setEnabledClearScreen(boolean aFlag)
public boolean hasAxes()
public PgAxes getAxes()
public void setAxes(PgAxes axes)
public boolean isShowingAxes()
isShowingAxes in interface PvDisplayIfpublic void showAxes(boolean aFlag)
showAxes in interface PvDisplayIfpublic boolean isShowingMagnet()
isShowingMagnet in interface PvDisplayIfpublic void showMagnet(boolean aFlag)
showMagnet in interface PvDisplayIfpublic boolean isEnabledFastZBuffer()
setEnabledZBuffer.setEnabledZBuffer(boolean),
setEnabledFastZBuffer(boolean)public void setEnabledFastZBuffer(boolean aFlag)
setEnabledZBuffer..setEnabledZBuffer(boolean),
isEnabledFastZBuffer()public boolean isEnabledZBuffer()
isEnabledZBuffer in interface PvDisplayIfpublic void setEnabledZBuffer(boolean aFlag)
setEnabledFastZBuffer.setEnabledZBuffer in interface PvDisplayIfisEnabledZBuffer(),
setEnabledFastZBuffer(boolean),
#setEnabledNewZBufferpublic boolean isEnabledTags()
public void setEnabledTags(boolean aFlag)
public boolean isEnabledPainters()
isEnabledPainters in interface PvDisplayIfpublic void setEnabledPainters(boolean aFlag)
setEnabledPainters in interface PvDisplayIfpublic boolean isEnabledClip()
isEnabledClip in interface PvDisplayIfpublic void setEnabledClip(boolean aFlag)
setEnabledClip in interface PvDisplayIfpublic boolean isClip()
#isEnabledClip
isClip in interface PvDisplayIfpublic void enableClip(boolean aFlag)
#setEnabledClip
enableClip in interface PvDisplayIfpublic double getNearClip()
getNearClip in interface PvDisplayIfpublic void setNearClip(double dist)
setNearClip in interface PvDisplayIfpublic double getFarClip()
getFarClip in interface PvDisplayIfpublic void setFarClip(double dist)
setFarClip in interface PvDisplayIfpublic PdMatrix getTransMatrix(int type)
getTransMatrix in interface PvDisplayIfjv.project.PvDisplayIftype - Any matrix type jv.project.PvDisplayIf#MATRIX_...
public void setTransMatrix(int type,
PdMatrix mat)
Modeling matrix should be set in original geometry model.
setTransMatrix in interface PvDisplayIfjv.project.PvDisplayIftype - Any matrix type jv.project.PvDisplayIf#MATRIX_...
public int addCamera(java.lang.String aName,
PvCamera aCamera)
public PvCameraIf getCamera()
getCamera in interface PvDisplayIfpublic PvCameraIf[] getCameras()
getCameras in interface PvDisplayIfpublic PvCameraIf getCamera(int type)
PvDisplayIf#CAMERA_PERSPECTIVE,
PvDisplayIf#CAMERA_ORTHO_XY,
PvDisplayIf#CAMERA_ORTHO_XZ,
PvDisplayIf#CAMERA_ORTHO_YZ,
For a list of possible types see PvDisplayIf.getCamera in interface PvDisplayIftype - of cameranull if argument out of bounds or camera not found.public boolean hasCamera(int type)
PvDisplayIf#CAMERA_PERSPECTIVE,
PvDisplayIf#CAMERA_ORTHO_XY,
PvDisplayIf#CAMERA_ORTHO_XZ,
PvDisplayIf#CAMERA_ORTHO_YZ,
For a list of possible types see PvDisplayIf.hasCamera in interface PvDisplayIftype - of cameranull if argument out of bounds or camera not found.selectCamera(int)public boolean selectCamera(int type)
PvDisplayIf#CAMERA_PERSPECTIVE,
PvDisplayIf#CAMERA_ORTHO_XY,
PvDisplayIf#CAMERA_ORTHO_XZ,
PvDisplayIf#CAMERA_ORTHO_YZ,
For a list of possible types see PvDisplayIf.selectCamera in interface PvDisplayIftype - of camerafalse if type is outOfBounds.public boolean removeCamera(int type)
PvDisplayIf#CAMERA_PERSPECTIVE,
PvDisplayIf#CAMERA_ORTHO_XY,
PvDisplayIf#CAMERA_ORTHO_XZ,
PvDisplayIf#CAMERA_ORTHO_YZ,
For a list of possible types see PvDisplayIf.removeCamera in interface PvDisplayIftype - of cameratrue if camera was found and successfully removed.
public java.awt.Point getPosition(int xPos,
int yPos)
public void setPosition(int xPos,
int yPos)
public java.awt.Dimension getSize()
getSize in interface PvDisplayIfgetSize in class java.awt.Component
public void setSizeWithinFrame(int width,
int height)
#setSize(Dimension)
resp. #setSize(int, int).
Size of parent frame is the size of the display plus the its border margins.setSizeWithinFrame in interface PvDisplayIfwidth - width of display area, not of parent frameheight - height of display area, not of parent framepublic static void setDefaultSize(java.awt.Dimension size)
public PsUpdateIf getFather()
getFather in interface PsUpdateIfjv.object.PsUpdateIfPsUpdateIf.setParent(PsUpdateIf),
PsUpdateIf.update(Object)public void setParent(PsUpdateIf father)
setParent in interface PsUpdateIfjv.object.PsUpdateIfaParent - will receive events which this does not handlePsUpdateIf.getFather(),
PsUpdateIf.update(Object)public boolean isEnabledUpdate()
isEnabledUpdate in interface PvDisplayIfpublic void setEnabledUpdate(boolean flag)
setEnabledUpdate in interface PvDisplayIfpublic boolean update(java.lang.Object event)
update in interface PvDisplayIfjv.object.PsUpdateIfevent - carries a lot of informationPsObject,
PsUpdateIf.getFather(),
PsUpdateIf.setParent(PsUpdateIf)public boolean hasPaintTag(int flags)
hasPaintTag in interface PvDisplayIfsetPaintTag(int, boolean)
public void setPaintTag(int flags,
boolean val)
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 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 proneous.
Setting flag PvDisplayIf#PAINT_ALL
invokes a repaint() of the display, just for convience.
setPaintTag in interface PvDisplayIfhasPaintTag(int)public void paint(java.awt.Graphics g)
Canvas.paint(g) to initiate redrawing of geometries.paint in class java.awt.Canvaspublic void update(java.awt.Graphics g)
Component.update(g) to initiate redrawing of geometries.update in class java.awt.Componentpublic void setAutoCenter(boolean flag)
false will prevent automatic centering.setAutoCenter in interface PvDisplayIfpublic java.awt.Image getImage()
getImage in interface PvDisplayIfpublic java.awt.Image getBackgroundImage()
getBackgroundImage in interface PvDisplayIfpublic void setBackgroundImage(java.awt.Image anImage)
setBackgroundImage in interface PvDisplayIfpublic java.lang.String getBackgroundImageFile()
public void setBackgroundImage(java.lang.String fileName)
setBackgroundImage in interface PvDisplayIffileName - relative file name of image.public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed in interface java.awt.event.ActionListenerpublic void processMouseEvent(java.awt.event.MouseEvent event)
public void mousePressed(java.awt.event.MouseEvent event)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseReleased(java.awt.event.MouseEvent event)
mouseReleased in interface java.awt.event.MouseListener
public PvPickEvent getPickEvent(int x,
int y)
public void mouseMoved(java.awt.event.MouseEvent event)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseEntered(java.awt.event.MouseEvent event)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent event)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked in interface java.awt.event.MouseListenerpublic int getMajorMode()
PvDisplayIfgetMajorMode in interface PvDisplayIfpublic void setMajorMode(int mode)
PvDisplayIfsetMajorMode in interface PvDisplayIfpublic void keyTyped(java.awt.event.KeyEvent event)
keyTyped in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent event)
keyReleased in interface java.awt.event.KeyListenerpublic void keyPressed(java.awt.event.KeyEvent event)
keyPressed in interface java.awt.event.KeyListenerpublic PsPanel getInfoPanel()
getInfoPanel in interface PvDisplayIfpublic PsPanel getCameraPanel()
getCameraPanel in interface PvDisplayIfpublic java.awt.Dimension getMinimumSize()
getMinimumSize in class java.awt.Componentpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Componentpublic void start()
start in interface PvDisplayIfpublic void stop()
stop in interface PvDisplayIf
public void setAutoRotation(PdVector axis,
double angle)
setAutoRotation in interface PvDisplayIfpublic boolean incrementAutoRotation()
incrementAutoRotation in interface PvDisplayIfpublic void run()
run in interface java.lang.Runnable
|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||