|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This interface must be implemented by all displays to be registered in JavaView, and
which want to display any of the geometries implementing the interface PgGeometryIf.
Each geometry instance may be registered in a set of displays. If a
geometry is modified then it must notify the associated displays via a call
display.update(geometry) to invoke a repaint(). In response to
this update the display calls the geometries paint(PvGeometryIf cont) method
in which a container is filled with the modified data of the geometry.
Note: the get and set methods are currently replaced with isShowing... and show... methods. The state of this interface is therefore temporary.
PgGeometryIf,
PsUpdateIf,
PgGeometryIf.paint(PvGeometryIf)| Field Summary | |
static int |
CAMERA_MODEL
Misused camera type in display, simulates transformation of modeling matrix of geometry. |
static int |
CAMERA_ORTHO_XY
Camera type and projection mode projecting orthogonally onto xy-plane. |
static int |
CAMERA_ORTHO_XZ
Camera type and projection mode projecting orthogonally onto xz-plane. |
static int |
CAMERA_ORTHO_YZ
Camera type and projection mode projecting orthogonally onto yz-plane. |
static int |
CAMERA_PERSPECTIVE
Camera type and projection mode allowing to arbitrary rotate camera. |
static int |
IMAGE_CENTER
Determines that a background image is positioned in the center of a display. |
static int |
IMAGE_RESIZE
Determines that a background image is resized to fill the display. |
static int |
IMAGE_TESSELATE
Determines that a background image is duplicated to fill the display. |
static int |
MATRIX_INV_MODEL
Type of inverse geometry modeling matrix used by cameras and display. |
static int |
MATRIX_INV_PROJECT
Type of inverse projection matrix used by cameras and display. |
static int |
MATRIX_INV_PROJVIEW
Type of inverse transformation matrix PV^-1 used by cameras and display. |
static int |
MATRIX_INV_TRANS
Type of inverse full transformation matrix PVM^-1 used by cameras and display. |
static int |
MATRIX_INV_VIEW
Type of inverse camera viewing matrix used by cameras and display. |
static int |
MATRIX_MODEL
Type of geometry modeling matrix used by cameras and display. |
static int |
MATRIX_PROJECT
Type of projection matrix used by cameras and display. |
static int |
MATRIX_PROJVIEW
Type of transformation matrix PV used by cameras and display. |
static int |
MATRIX_TRANS
Type of full transformation matrix PVM used by cameras and display. |
static int |
MATRIX_VIEW
Type of camera viewing matrix used by cameras and display. |
static int |
MODE_ADD
Major mode in display to add new points of geometries. |
static int |
MODE_DELETE
Major mode in display to delete items or geometries. |
static int |
MODE_DISPLAY_PICK
Major mode in display to select initial points in display without picking geometries. |
static int |
MODE_DUPLICATE
Major mode in display to duplicate geometries. |
static int |
MODE_HIGHLIGHT
Major mode in display to highlight items on geometries if they receive focus. |
static int |
MODE_INITIAL_PICK
Major mode in display to select initial points on geometries. |
static int |
MODE_MARK
Major mode in display to mark a set of points on geometries. |
static int |
MODE_MARK_ELEMENTS
Major mode in display to mark a set of elements on geometries. |
static int |
MODE_ORBIT
Major mode in display to rotate geometry. |
static int |
MODE_PICK
Major mode in display to pick and modify vertices. |
static int |
MODE_SCALE
Major mode in display to scale geometry by zooming. |
static int |
MODE_SCALE_RECT
Major mode in display to scale geometry by zooming into a specified rectangle. |
static int |
MODE_TRANS
Major mode in display to (x,y)-translate geometry. |
static int |
MODE_TRANS_Z
Major mode in display to z-translate geometry. |
static int |
MODE_UNMARK
Major mode in display to unmark a set of points on surfaces. |
static int |
PAINT_ALL
Enable drawing in display canvas, default enabled, otherwise no repaint of the display happens, and nothing is visible nor changes. |
static int |
PAINT_ANTIALIAS
Enable antialiasing of display. |
static int |
PAINT_AXES
Enable drawing of a coordinate axes around scene in the display. |
static int |
PAINT_BACKGROUND
Enable drawing of colored background. |
static int |
PAINT_BACKIMAGE
Enable drawing of background image. |
static int |
PAINT_BNDBOX
Enable drawing of bounding box of current geometry. |
static int |
PAINT_BORDER
Enable drawing of sunk border around display canvas. |
static int |
PAINT_CLEAR_SCREEN
Enable clearing of screen after each repaint. |
static int |
PAINT_CROSS
Enable drawing of cross at current cursor position. |
static int |
PAINT_FRAME
Enable drawing of a small coordinate frame in the lower left corner of the display. |
static int |
PAINT_INFO
Enable drawing of additional information close to cursor in overlay window. |
static int |
PAINT_MAGNET
Attach cursor to vertices of nearby. |
static int |
PAINT_SINGLE
Restrict drawing to a single geometry at the same time. |
static int |
PAINT_ZOOM
Scale transformation matrix to simulate floating point accuracy in pixel integers. |
| Method Summary | |
void |
addCameraListener(PvCameraListenerIf listener)
Add camera listener to receive camera events PvCameraEvent. |
boolean |
addGeometry(PgGeometryIf anObject)
Register geometry in display. |
void |
addKeyListener(java.awt.event.KeyListener listener)
Register a keyListener to receive keyboard events of JavaView. |
void |
addPickListener(PvPickListenerIf listener)
Add pick listener to receive pick events PvPickEvent. |
boolean |
containsGeometry(PgGeometryIf anObject)
Check whether geometry is registered in display. |
void |
enableClip(boolean aFlag)
Deprecated. use #setEnabledClip |
void |
fit()
Scale camera such that current geometries fit into display. |
java.awt.Color |
getBackgroundColor()
Get color of background of display. |
java.awt.Image |
getBackgroundImage()
Get background image of display canvas. |
PvCameraIf |
getCamera()
Get current camera. |
PsPanel |
getCameraPanel()
Get info panel of current camera. |
double |
getFarClip()
Get far clip distance of current camera. |
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 all registered geometry in display. |
java.awt.Graphics |
getGraphics()
General AWT getGraphics(Graphics) method included in interface to allow invocation from outside the display. |
java.awt.Image |
getImage()
Get the rendered image of the scene. |
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.lang.String |
getName()
Get name of dispay, e.g. used as title in info panel and hashtable of PvViewer. |
double |
getNearClip()
Get near clip distance of current camera. |
PgGeometryIf |
getSelectedGeometry()
Get selected geometry in display. |
java.awt.Dimension |
getSize()
Get dimension with height and width of drawing canvas. |
PdMatrix |
getTransMatrix(int type)
Get 4*4 transformation matrix or components from current camera and display. |
boolean |
hasCameraListener(PvCameraListenerIf listener)
Check for a registered listener. |
boolean |
hasPaintTag(int flags)
Deprecated. use individual isShowing...() methods. |
boolean |
hasPickListener(PvPickListenerIf listener)
Check for a registered listener. |
boolean |
incrementAutoRotation()
Do an increment of the auto-rotation animation. |
void |
init()
Initialize and reset dispay. |
boolean |
isClip()
Deprecated. use #isEnabledClip |
boolean |
isEnabledAnimation()
Check whether auto-rotation is enabled. |
boolean |
isEnabledClip()
Check whether clipping with front and back plane is enabled. |
boolean |
isEnabledPainters()
Check whether painter's algorithm during drawing is enabled. |
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 |
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 |
releasePickFocus()
Release pick focus, i.e. to be the unique listener who receives pick events. |
boolean |
removeCameraListener(PvCameraListenerIf listener)
Remove a registered listener from list of registered listeners. |
void |
removeGeometries()
Remove all geometries from display and remove any registered pick listener. |
boolean |
removeGeometry(PgGeometryIf anObject)
Remove geometry from display. |
void |
removeKeyListener(java.awt.event.KeyListener listener)
Remove a keyListener to receive keyboard events of JavaView. |
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. |
boolean |
selectCamera(int type)
Select camera from the list of installed camera to be current camera in the display. |
boolean |
selectGeometry(PgGeometryIf anObject)
Select geometry in display to receive pick events. |
void |
setAutoRotation(PdVector axis,
double angle)
Set axis and angle for auto-rotation. |
void |
setBackgroundColor(java.awt.Color aColor)
Set color of background of display. |
void |
setBackgroundImage(java.awt.Image image)
Set background image of display canvas. |
void |
setBackgroundImage(java.lang.String fileName)
Set background image of display canvas. |
void |
setDrawingOrder(int order,
PgGeometryIf geom)
Choose z-order of geometry when drawn in display. |
void |
setEnabledAnimation(boolean aFlag)
Enable and disable auto-rotation of scene. |
void |
setEnabledClip(boolean aFlag)
Enable and disable clipping with front and back plane. |
void |
setEnabledPainters(boolean aFlag)
Enable and disable painter's algorithm during drawing, i.e. a z-sort of drawing items. |
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 aMode)
Switch between interaction modes like rotating or scaling, usually done interactively. |
void |
setName(java.lang.String name)
Set name of dispay, e.g. used as title in info panel and hashtable of PvViewer. |
void |
setNearClip(double dist)
Set near clip distance of current camera, works even if clipping is disabled. |
void |
setPaintTag(int flags,
boolean val)
Deprecated. use individual show...(boolean) methods. |
void |
setSizeWithinFrame(int width,
int height)
Set height and width of drawing canvas if canvas is inside a frame. |
void |
setTransMatrix(int type,
PdMatrix mat)
Set transformation matrix or components 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 active geometry, and create bounding box if not available. |
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 auto-rotation in viewer where a matrix is constantly multiplied to transformation matrix. |
void |
stop()
Stop auto-rotation in viewer. |
boolean |
update(java.lang.Object event)
Update mechanism of JavaView. |
| Methods inherited from interface jv.object.PsUpdateIf |
getFather, setParent |
| Methods inherited from interface java.awt.event.KeyListener |
keyPressed, keyReleased, keyTyped |
| Methods inherited from interface java.awt.event.MouseListener |
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased |
| Methods inherited from interface java.awt.event.MouseMotionListener |
mouseDragged, mouseMoved |
| Field Detail |
public static final int MODE_ORBIT
public static final int MODE_SCALE
public static final int MODE_SCALE_RECT
public static final int MODE_TRANS
public static final int MODE_TRANS_Z
public static final int MODE_PICK
public static final int MODE_INITIAL_PICK
public static final int MODE_HIGHLIGHT
public static final int MODE_DISPLAY_PICK
public static final int MODE_MARK
public static final int MODE_MARK_ELEMENTS
public static final int MODE_UNMARK
public static final int MODE_ADD
public static final int MODE_DELETE
public static final int MODE_DUPLICATE
public static final int CAMERA_PERSPECTIVE
public static final int CAMERA_ORTHO_XY
public static final int CAMERA_ORTHO_XZ
public static final int CAMERA_ORTHO_YZ
public static final int CAMERA_MODEL
public static final int IMAGE_CENTER
public static final int IMAGE_TESSELATE
public static final int IMAGE_RESIZE
public static final int MATRIX_TRANS
public static final int MATRIX_PROJVIEW
public static final int MATRIX_PROJECT
public static final int MATRIX_VIEW
public static final int MATRIX_MODEL
public static final int MATRIX_INV_TRANS
public static final int MATRIX_INV_PROJVIEW
public static final int MATRIX_INV_PROJECT
public static final int MATRIX_INV_VIEW
public static final int MATRIX_INV_MODEL
public static final int PAINT_ALL
public static final int PAINT_BACKGROUND
public static final int PAINT_BORDER
public static final int PAINT_ZOOM
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.
public static final int PAINT_CROSS
public static final int PAINT_BACKIMAGE
public static final int PAINT_ANTIALIAS
public static final int PAINT_BNDBOX
public static final int PAINT_INFO
Note, drawing of additional information can cause the display refreshrate to slow down since after each mouse movement a complex pick event is generated by intersecting all geometries with a ray.
public static final int PAINT_FRAME
public static final int PAINT_AXES
public static final int PAINT_SINGLE
This flag only determines the number of visible geometries. Independent of this flag there may only be a single geometry active.
public static final int PAINT_MAGNET
public static final int PAINT_CLEAR_SCREEN
| Method Detail |
public java.lang.String getName()
getName in interface PsUpdateIfpublic void setName(java.lang.String name)
public void init()
public boolean update(java.lang.Object event)
update in interface PsUpdateIfjv.object.PsUpdateIfevent - carries a lot of informationPsObject,
PsUpdateIf.getFather(),
PsUpdateIf.setParent(PsUpdateIf)public boolean isEnabledUpdate()
public void setEnabledUpdate(boolean flag)
public java.awt.Graphics getGraphics()
public boolean addGeometry(PgGeometryIf anObject)
public boolean containsGeometry(PgGeometryIf anObject)
public boolean removeGeometry(PgGeometryIf anObject)
public void removeGeometries()
public boolean selectGeometry(PgGeometryIf anObject)
public PgGeometryIf getSelectedGeometry()
public PgGeometryIf[] getGeometries()
public void fit()
public PdMatrix getTransMatrix(int type)
type - Any matrix type jv.project.PvDisplayIf#MATRIX_...
public void setTransMatrix(int type,
PdMatrix mat)
Currently, not supported.
type - Any matrix type jv.project.PvDisplayIf#MATRIX_...
public void setDrawingOrder(int order,
PgGeometryIf geom)
PvGeometryIfpublic void addCameraListener(PvCameraListenerIf listener)
PvCameraEvent.CameraListenerIf - false if same instance already registered.hasCameraListener(PvCameraListenerIf),
removeCameraListener(PvCameraListenerIf)public boolean hasCameraListener(PvCameraListenerIf listener)
CameraListenerIf - true if registered listener found.addCameraListener(PvCameraListenerIf),
removeCameraListener(PvCameraListenerIf)public boolean removeCameraListener(PvCameraListenerIf listener)
CameraListenerIf - false if listener does not exists.addCameraListener(PvCameraListenerIf),
hasCameraListener(PvCameraListenerIf)public void addPickListener(PvPickListenerIf listener)
PvPickEvent.false if same instance already registered.#hasPickListeners(PvPickListener),
#removePickListeners(PvPickListener)public boolean hasPickListener(PvPickListenerIf listener)
true if registered listener found.addPickListener(PvPickListenerIf),
#removePickListeners(PvPickListener)public boolean removePickListener(PvPickListenerIf listener)
PickListener - false if listener does not exists.addPickListener(PvPickListenerIf),
#hasPickListeners(PvPickListener)public void requestPickFocus(PvPickListenerIf listener)
PickListenerIf - releasePickFocus()public void releasePickFocus()
PickListenerIf - requestPickFocus(PvPickListenerIf)public void setMajorMode(int aMode)
public int getMajorMode()
public void addKeyListener(java.awt.event.KeyListener listener)
public void removeKeyListener(java.awt.event.KeyListener listener)
public boolean hasPaintTag(int flags)
public void setPaintTag(int flags,
boolean val)
public boolean isEnabledAnimation()
public void setEnabledAnimation(boolean aFlag)
public void setAutoRotation(PdVector axis,
double angle)
public boolean incrementAutoRotation()
public void start()
#setAutoRotation to specify a rotation axis.
Auto-rotation spawns a new thread.public void stop()
#start() to
continue the animation.public boolean isEnabledZBuffer()
public void setEnabledZBuffer(boolean aFlag)
public boolean isShowingBackImage()
public void showBackImage(boolean aFlag)
public int getImageFitMode()
public void setImageFitMode(int mode)
public boolean isShowingAxes()
public void showAxes(boolean aFlag)
public boolean isShowingBndBox()
public void showBndBox(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.public void showDepthcue(boolean aFlag)
public boolean isShowingEdgeAura()
public void showEdgeAura(boolean aFlag)
public boolean isShowingEdgesOnce()
public void showEdgesOnce(boolean aFlag)
public boolean isShowingFrame()
public void showFrame(boolean aFlag)
public boolean isShowingGrid()
public void showGrid(boolean aFlag)
public boolean isShowingMagnet()
public void showMagnet(boolean aFlag)
public boolean isEnabledPainters()
public void setEnabledPainters(boolean aFlag)
public boolean isEnabledClip()
public void setEnabledClip(boolean aFlag)
public boolean isClip()
#isEnabledClip
public void enableClip(boolean aFlag)
#setEnabledClip
public double getNearClip()
public void setNearClip(double dist)
public double getFarClip()
public void setFarClip(double dist)
public java.awt.Color getBackgroundColor()
public void setBackgroundColor(java.awt.Color aColor)
public java.awt.Color getForegroundColor()
public void setForegroundColor(java.awt.Color aColor)
public java.awt.Image getBackgroundImage()
public void setBackgroundImage(java.awt.Image image)
public void setBackgroundImage(java.lang.String fileName)
image - relative file name of image.public PvCameraIf getCamera()
public PsPanel getCameraPanel()
public boolean selectCamera(int type)
public PsPanel getInfoPanel()
public java.awt.Frame getFrame()
public void setFrame(java.awt.Frame frame)
public java.awt.Image getImage()
public java.awt.Dimension getSize()
public void setSizeWithinFrame(int width,
int height)
|
JavaView® v2.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||