else
delta = camera.getGraphDimension() * 0.01f;
delta *= camera.getViewPercent();
Point3 p = camera.getViewCenter();
camera.setViewCenter(p.x - delta, p.y, 0);
}
} else if (event.getKeyCode() == KeyEvent.VK_RIGHT) {
if ((event.getModifiers() & KeyEvent.ALT_MASK) != 0) {
double r = camera.getViewRotation();
camera.setViewRotation(r + 5);
} else {
double delta = 0;
if ((event.getModifiers() & KeyEvent.SHIFT_MASK) != 0)
delta = camera.getGraphDimension() * 0.1f;
else
delta = camera.getGraphDimension() * 0.01f;
delta *= camera.getViewPercent();
Point3 p = camera.getViewCenter();
camera.setViewCenter(p.x + delta, p.y, 0);
}
} else if (event.getKeyCode() == KeyEvent.VK_UP) {
double delta = 0;
if ((event.getModifiers() & KeyEvent.SHIFT_MASK) != 0)
delta = camera.getGraphDimension() * 0.1f;
else
delta = camera.getGraphDimension() * 0.01f;
delta *= camera.getViewPercent();
Point3 p = camera.getViewCenter();
camera.setViewCenter(p.x, p.y + delta, 0);
} else if (event.getKeyCode() == KeyEvent.VK_DOWN) {
double delta = 0;
if ((event.getModifiers() & KeyEvent.SHIFT_MASK) != 0)
delta = camera.getGraphDimension() * 0.1f;
else
delta = camera.getGraphDimension() * 0.01f;
delta *= camera.getViewPercent();
Point3 p = camera.getViewCenter();
camera.setViewCenter(p.x, p.y - delta, 0);
}
}