use of com.jogamp.newt.event.MouseAdapter in project gephi by gephi.
the class GLAbstractListener method initArchitecture.
@Override
public void initArchitecture() {
this.engine = VizController.getInstance().getEngine();
this.scheduler = VizController.getInstance().getScheduler();
this.graphIO = VizController.getInstance().getGraphIO();
cameraLocation = vizController.getVizConfig().getDefaultCameraPosition();
cameraTarget = vizController.getVizConfig().getDefaultCameraTarget();
// Mouse events
if (vizController.getVizConfig().isReduceFpsWhenMouseOut() || vizController.getVizConfig().isPauseLoopWhenMouseOut()) {
graphMouseAdapter = new GraphMouseAdapter();
if (window != null) {
graphMouseAdapterNewt = new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {
graphMouseAdapter.mouseEntered();
}
@Override
public void mouseExited(MouseEvent e) {
graphMouseAdapter.mouseExited();
}
};
window.addMouseListener(graphMouseAdapterNewt);
} else {
graphMouseAdapterCanvas = new java.awt.event.MouseAdapter() {
@Override
public void mouseEntered(java.awt.event.MouseEvent e) {
graphMouseAdapter.mouseEntered();
}
@Override
public void mouseExited(java.awt.event.MouseEvent e) {
graphMouseAdapter.mouseExited();
}
};
graphComponent.addMouseListener(graphMouseAdapterCanvas);
}
}
}
Aggregations