The class does not automatically register itself for mouse input. That is up to the derived class to make sure it properly registers itself for the right events.
Note: This class does not call the repaint()
method after each mouse event. It is the responsibility of the derived class to make sure the screen gets updated with any information regarding the mouse event.
Constructor Detail |
protected MouseOverlay(javax.media.j3d.Canvas3D canvas3D, java.awt.Dimension size)
canvas3D
- Canvas being drawn ontosize
- The size of the overlay in pixelsprotected MouseOverlay(javax.media.j3d.Canvas3D canvas3D, java.awt.Dimension size, org.j3d.geom.overlay.UpdateManager updateManager)
canvas3D
- The canvas the overlay is drawn onsize
- The size of the overlay in pixelsupdateManager
- Responsible for allowing the Overlay to update between renders. If this is null a default manager is createdprotected MouseOverlay(javax.media.j3d.Canvas3D canvas3D, java.awt.Dimension size, boolean clipAlpha, boolean blendAlpha)
canvas3D
- The canvas the overlay is drawn onsize
- The size of the overlay in pixelsclipAlpha
- Should the polygon clip where alpha is zeroblendAlpha
- Should we blend to background where alpha is < hasButtonEvents
- true to recieve mouse button eventshasMotionEvents
- true to recieve mouse motion eventsprocessAll
- true to process all events from the behaviour, or false to use just the last oneprotected MouseOverlay(javax.media.j3d.Canvas3D canvas3D, java.awt.Dimension size, boolean clipAlpha, boolean blendAlpha, org.j3d.geom.overlay.UpdateManager updateManager, boolean hasButtonEvents)
canvas3D
- The canvas the overlay is drawn onsize
- The size of the overlay in pixelsclipAlpha
- Should the polygon clip where alpha is zeroblendAlpha
- Should we blend to background where alpha is < updateManager
- Responsible for allowing the Overlay to update between renders. If this is null a default manager is createdprotected MouseOverlay(javax.media.j3d.Canvas3D canvas3D, java.awt.Dimension size, boolean clipAlpha, boolean blendAlpha, org.j3d.geom.overlay.UpdateManager updateManager, int numBuffers)
canvas3D
- The canvas the overlay is drawn onsize
- The size of the overlay in pixelsclipAlpha
- Should the polygon clip where alpha is zeroblendAlpha
- Should we blend to background where alpha is < updateManager
- Responsible for allowing the Overlay to update between renders. If this is null a default manager is creatednumBuffers
- The number of buffers to generate, the default is twoMethod Detail |
public void mousePressed(java.awt.event.MouseEvent evt)
evt
- The event that caused this method to be calledpublic void mouseReleased(java.awt.event.MouseEvent evt)
evt
- The event that caused this method to be calledpublic void mouseClicked(java.awt.event.MouseEvent evt)
evt
- The event that caused this method to be calledpublic void mouseEntered(java.awt.event.MouseEvent evt)
evt
- The event that caused this method to be calledpublic void mouseExited(java.awt.event.MouseEvent evt)
evt
- The event that caused this method to be calledpublic void mouseDragged(java.awt.event.MouseEvent evt)
evt
- The event that caused this method to be calledpublic void mouseMoved(java.awt.event.MouseEvent evt)
evt
- The event that caused this method to be called