Example usage for javax.media.j3d Canvas3D addMouseListener

List of usage examples for javax.media.j3d Canvas3D addMouseListener

Introduction

In this page you can find the example usage for javax.media.j3d Canvas3D addMouseListener.

Prototype

public synchronized void addMouseListener(MouseListener l) 

Source Link

Document

Adds the specified mouse listener to receive mouse events from this component.

Usage

From source file:VrmlPickingTest.java

protected void addCanvas3D(Canvas3D c3d) {
    setLayout(new BorderLayout());
    add(c3d, BorderLayout.CENTER);
    doLayout();// ww  w.  j  av a  2s  .c  o m

    if (m_SceneBranchGroup != null) {
        c3d.addMouseListener(this);

        pickCanvas = new PickCanvas(c3d, m_SceneBranchGroup);
        pickCanvas.setMode(PickTool.GEOMETRY_INTERSECT_INFO);
        pickCanvas.setTolerance(4.0f);
    }

    c3d.setCursor(new Cursor(Cursor.HAND_CURSOR));
}