public void toggleOrtho() {
ortho = !ortho;
// Get first view, should be the cell view
Iterator<View2D> it = getViews();
View2DEntity view = (View2DEntity) it.next();
if (ortho) {
// In this test, the view in the ortho plane is at a fixed location.
view.setLocationOrtho(new Vector2f(500f, 300f), false);
// Test
//view.setPixelScaleOrtho(2.0f, 2.0f);
//view.setPixelScaleOrtho(0.5f, 0.5f);
// Move the window view into the ortho plane
logger.warning("Move view into ortho " + view);
view.setOrtho(true, false);
} else {
// Move the window view into the cell
logger.warning("Move view out of ortho " + view);
view.setOrtho(false, false);
}
// Now make it all happen
view.update();
view.updateFrame();
}