|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.j3d.renderer.java3d.overlay.OverlayBase
org.j3d.renderer.java3d.overlay.InteractiveOverlayBase
org.j3d.renderer.java3d.overlay.MouseOverlay
org.j3d.renderer.java3d.overlay.ScribbleOverlay
An overlay allows the user to scribble on the screen, over the top of the 3D display.
| Field Summary |
| Fields inherited from class org.j3d.renderer.java3d.overlay.OverlayBase |
activeBuffer, backgroundColor, backgroundMode, bottomInset, canvas, componentSize, consoleBG, consoleTG, DEFAULT_INSET, DIRTY_ACTIVE_BUFFER, DIRTY_POSITION, DIRTY_SIZE, DIRTY_VISIBLE, fieldOfView, fixedSize, leftInset, overlayBounds, overlayTexGrp, rightInset, subOverlay, topInset |
| Fields inherited from interface org.j3d.renderer.java3d.overlay.Overlay |
BACKGROUND_COPY, BACKGROUND_NONE |
| Constructor Summary | |
ScribbleOverlay(javax.media.j3d.Canvas3D canvas,
java.awt.Dimension size)
Create a new scribble overlay that bases its size on the canvas it overlays. |
|
ScribbleOverlay(javax.media.j3d.Canvas3D canvas,
java.awt.Dimension size,
java.awt.Color lineColor)
Create a new scribble overlay using the given line color. |
|
| Method Summary | |
void |
clear()
Clear the current screen. |
void |
initialize()
Initialise the overlay to build mouse input support |
void |
mouseDragged(java.awt.event.MouseEvent evt)
Process a mouse drag event. |
void |
mousePressed(java.awt.event.MouseEvent evt)
Process a mouse press event to start a new line in the given color. |
void |
mouseReleased(java.awt.event.MouseEvent evt)
Process a mouse release event. |
void |
paint(java.awt.Graphics2D g)
Paint the overlay with the given graphics context. |
void |
setLineColor(java.awt.Color color)
Set the line colour that any new lines will be drawn in. |
| Methods inherited from class org.j3d.renderer.java3d.overlay.MouseOverlay |
mouseClicked, mouseEntered, mouseExited, mouseMoved |
| Methods inherited from class org.j3d.renderer.java3d.overlay.InteractiveOverlayBase |
addKeyListener, addMouseListener, addMouseMotionListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, requestFocus, setInputRequester |
| Methods inherited from class org.j3d.renderer.java3d.overlay.OverlayBase |
componentHidden, componentMoved, componentResized, componentShown, contains, dirty, getBackgroundImage, getBounds, getGraphics, getRoot, getUpdateManager, isAntialiased, isVisible, repaint, setActiveBuffer, setAntialiased, setBackgroundColor, setBackgroundImage, setBackgroundMode, setComponentDetails, setInsets, setInsets, setLocation, setSize, setUpdateManager, setVisible, update, updateBuffer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.j3d.renderer.java3d.overlay.Overlay |
contains, getBounds, getRoot, getUpdateManager, isAntialiased, isVisible, setAntialiased, setComponentDetails, setLocation, setSize, setUpdateManager, setVisible |
| Methods inherited from interface org.j3d.renderer.java3d.overlay.UpdatableEntity |
update |
| Constructor Detail |
public ScribbleOverlay(javax.media.j3d.Canvas3D canvas,
java.awt.Dimension size)
canvas - The canvas that is scribbled onsize - The size of the overlay in pixels
public ScribbleOverlay(javax.media.j3d.Canvas3D canvas,
java.awt.Dimension size,
java.awt.Color lineColor)
canvas - The canvas that is scribbled onsize - The size of the overlay in pixelslineColor - The colour to start the first line with| Method Detail |
public void initialize()
initialize in interface Overlayinitialize in class OverlayBasepublic void paint(java.awt.Graphics2D g)
paint in class OverlayBaseg - The graphics context to paint withpublic void mousePressed(java.awt.event.MouseEvent evt)
mousePressed in interface java.awt.event.MouseListenermousePressed in class MouseOverlayevt - The event that caused this method to be calledpublic void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class MouseOverlayevt - The event that caused this method to be calledpublic void mouseDragged(java.awt.event.MouseEvent evt)
mouseDragged in interface java.awt.event.MouseMotionListenermouseDragged in class MouseOverlayevt - The event that caused this method to be calledpublic void setLineColor(java.awt.Color color)
color - The new color to usepublic void clear()
|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||