|
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.ImageButtonOverlay
An overlay with a clickable image that acts like a button.
The overlay will take up to four images. These images are supplied in an array in the order:
| Field Summary | |
static int |
ACTIVE_IMAGE
Index of the active image |
static int |
CLICKED_IMAGE
Index of the mouse clicked image |
static int |
INACTIVE_IMAGE
Index of the inactive image |
static int |
MOUSEOVER_IMAGE
Index of the mouse over image |
| 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 | |
ImageButtonOverlay(javax.media.j3d.Canvas3D canvas,
java.awt.Dimension size,
boolean clipAlpha,
boolean blendAlpha,
java.awt.image.BufferedImage[] images)
Create a new button overlay where you get to control the alpha setting with the images. |
|
ImageButtonOverlay(javax.media.j3d.Canvas3D canvas,
java.awt.Dimension size,
java.awt.image.BufferedImage[] images)
Create a new overlay that uses the given images placed in the space. |
|
| Method Summary | |
void |
initialize()
Initialise the overlay to build mouse input support |
void |
mouseClicked(java.awt.event.MouseEvent evt)
Process a mouse click event. |
void |
mouseEntered(java.awt.event.MouseEvent evt)
Process a mouse enter event. |
void |
mouseExited(java.awt.event.MouseEvent evt)
Process a mouse exited event. |
void |
mousePressed(java.awt.event.MouseEvent evt)
Process a mouse press event. |
void |
mouseReleased(java.awt.event.MouseEvent evt)
Process a mouse release event. |
void |
repaint()
This is called to trigger a repaint of the overlay. |
| Methods inherited from class org.j3d.renderer.java3d.overlay.MouseOverlay |
mouseDragged, 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, paint, 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 |
| Field Detail |
public static final int INACTIVE_IMAGE
public static final int ACTIVE_IMAGE
public static final int CLICKED_IMAGE
public static final int MOUSEOVER_IMAGE
| Constructor Detail |
public ImageButtonOverlay(javax.media.j3d.Canvas3D canvas,
java.awt.Dimension size,
java.awt.image.BufferedImage[] images)
canvas - The canvas to put the overlay onsize - The size of the overlay in pixelsimages - The array of images to use (non-null)
public ImageButtonOverlay(javax.media.j3d.Canvas3D canvas,
java.awt.Dimension size,
boolean clipAlpha,
boolean blendAlpha,
java.awt.image.BufferedImage[] images)
canvas - The canvas to put the overlay onsize - The size of the overlay in pixelsclipAlpha - true if the image contains alphablendAlpha - true if you want to blend the image with the
background of the overlay (ie let the color show through)images - The array of images to use (non-null)| Method Detail |
public void initialize()
initialize in interface Overlayinitialize in class OverlayBasepublic 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 mouseClicked(java.awt.event.MouseEvent evt)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class MouseOverlayevt - The event that caused this method to be calledpublic void mouseEntered(java.awt.event.MouseEvent evt)
mouseEntered in interface java.awt.event.MouseListenermouseEntered in class MouseOverlayevt - The event that caused this method to be calledpublic void mouseExited(java.awt.event.MouseEvent evt)
mouseExited in interface java.awt.event.MouseListenermouseExited in class MouseOverlayevt - The event that caused this method to be calledpublic void repaint()
OverlayBase
repaint in class OverlayBase
|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||