public class PickNDragManager
extends java.lang.Object
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.KeyListener
| Constructor and Description |
|---|
PickNDragManager(javax.media.j3d.Canvas3D canvas,
IntersectManager intersector,
CameraMode cameraMode,
com.sun.j3d.utils.picking.PickCanvas myPick,
javax.media.j3d.PointLight light1,
javax.media.j3d.PointLight light2,
javax.media.j3d.PointLight light3,
Hud hud)
Constructs the PND manager and registers all required references
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMembraneViewListener(MembraneViewListener listener) |
void |
allowDragging(boolean b)
En-or disables dragging
|
javax.vecmath.Point3f |
calculateLocation(int mouseX,
int mouseY,
float Yobject)
Converts the mouselocation on canvas to a location in the universe.
|
java.util.Vector<Molecule_3D> |
getSelected()
Returns the currently selected proteins
|
void |
keyPressed(java.awt.event.KeyEvent arg0) |
void |
keyReleased(java.awt.event.KeyEvent arg0) |
void |
keyTyped(java.awt.event.KeyEvent arg0) |
void |
mouseClicked(java.awt.event.MouseEvent arg0) |
void |
mouseDragged(java.awt.event.MouseEvent arg0) |
void |
mouseEntered(java.awt.event.MouseEvent arg0) |
void |
mouseExited(java.awt.event.MouseEvent arg0) |
void |
mouseMoved(java.awt.event.MouseEvent arg0) |
void |
mousePressed(java.awt.event.MouseEvent arg0) |
void |
mouseReleased(java.awt.event.MouseEvent arg0) |
void |
moveDNDObject(Molecule_3D current,
java.awt.Point loc)
Moves the passed Object to the passed mouse location on canvas (this time
while Drag and drop is active)
|
void |
selectByCode(java.lang.String code,
int domainID)
Selects all proteins instances that have the passed code
|
void |
setActive(boolean b)
En-or disables the picking
|
void |
setPickedMolecules(Molecule_3D[] proPicked) |
void |
updateLights()
Recalculates the pointlight positions regarding to the current camera
position
|
public PickNDragManager(javax.media.j3d.Canvas3D canvas,
IntersectManager intersector,
CameraMode cameraMode,
com.sun.j3d.utils.picking.PickCanvas myPick,
javax.media.j3d.PointLight light1,
javax.media.j3d.PointLight light2,
javax.media.j3d.PointLight light3,
Hud hud)
canvas - intersector - cameraMode - hash4All - myPick - light1 - light2 - light3 - public java.util.Vector<Molecule_3D> getSelected()
public void selectByCode(java.lang.String code,
int domainID)
code - domainID - public void addMembraneViewListener(MembraneViewListener listener)
public void mouseClicked(java.awt.event.MouseEvent arg0)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent arg0)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent arg0)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent arg0)
mouseReleased in interface java.awt.event.MouseListenerpublic javax.vecmath.Point3f calculateLocation(int mouseX,
int mouseY,
float Yobject)
mouseX - mouseY - Yobject - public void mousePressed(java.awt.event.MouseEvent arg0)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent arg0)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseDragged(java.awt.event.MouseEvent arg0)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void updateLights()
public void keyPressed(java.awt.event.KeyEvent arg0)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent arg0)
keyReleased in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent arg0)
keyTyped in interface java.awt.event.KeyListenerpublic void moveDNDObject(Molecule_3D current, java.awt.Point loc)
current - loc - public void setActive(boolean b)
b - public void allowDragging(boolean b)
b - public void setPickedMolecules(Molecule_3D[] proPicked)