it.polito.elite.visualization.ontoviewer.behaviors
Class MyPickBehaviour
java.lang.Object
javax.media.j3d.SceneGraphObject
javax.media.j3d.Node
javax.media.j3d.Leaf
javax.media.j3d.Behavior
it.polito.elite.visualization.ontoviewer.behaviors.MyPickBehaviour
public class MyPickBehaviour
- extends javax.media.j3d.Behavior
Listener click mouse
Fields inherited from class javax.media.j3d.Node |
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING |
Methods inherited from class javax.media.j3d.Behavior |
getEnable, getNumSchedulingIntervals, getSchedulingBoundingLeaf, getSchedulingBounds, getSchedulingInterval, getView, getWakeupCondition, postId, setEnable, setSchedulingBoundingLeaf, setSchedulingBounds, setSchedulingInterval, updateNodeReferences, wakeupOn |
Methods inherited from class javax.media.j3d.Node |
cloneNode, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable |
Methods inherited from class javax.media.j3d.SceneGraphObject |
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
conditions
protected javax.media.j3d.WakeupCriterion[] conditions
mevent
protected java.awt.event.MouseEvent mevent
pickCanvas
protected com.sun.j3d.utils.picking.PickCanvas pickCanvas
scene
private Scene3D scene
wakeupCondition
protected javax.media.j3d.WakeupOr wakeupCondition
MyPickBehaviour
public MyPickBehaviour(javax.media.j3d.Canvas3D canvas,
Scene3D scene)
getMevent
public java.awt.event.MouseEvent getMevent()
handlePickedObject
private void handlePickedObject(java.lang.String uri)
handlePickedRelationCone
private void handlePickedRelationCone(java.util.HashSet<RelationData> set,
int xpos,
int ypos)
initialize
public void initialize()
- Specified by:
initialize
in class javax.media.j3d.Behavior
processMouseEvent
private void processMouseEvent(java.awt.event.MouseEvent evt)
processStimulus
public void processStimulus(java.util.Enumeration criteria)
- Specified by:
processStimulus
in class javax.media.j3d.Behavior
showContextMenu
private void showContextMenu(java.lang.String uri,
int xpos,
int ypos)
updateScene
public void updateScene(int xpos,
int ypos)
- Where the processing is carried out. This checks if an object has been
picked and if it has prints out the user data for that shape.
- Parameters:
xpos
- int that stores the x-position of the mouseypos
- int that stores the y-position of the mouse