if (v.isLoadView()) {
viewName = v.getName();
loadMap = true;
dontSend = true;
VisualizationViewer vv = _graphManager.getVV(viewName);
double scale = v.getScale();
if (!Double.isNaN(scale) && vv != null) {
Point2D p = vv.getCenter();
double crossover = 1.0;
MutableTransformer modelTransformer = vv.getLayoutTransformer();
MutableTransformer viewTransformer = vv.getViewTransformer();
if(scale < crossover) {
viewTransformer.setScale(scale, scale, p);
modelTransformer.setScale(crossover, crossover, p);
} else {
modelTransformer.setScale(scale, scale, p);
viewTransformer.setScale(crossover, crossover, p);
}
dontSend = true;
}
if (! (Double.isNaN(v.getLayoutTranslateX()) &&
Double.isNaN(v.getLayoutTranslateX())) ) {
translateX = v.getLayoutTranslateX();
translateY = v.getLayoutTranslateY();
dontSend = true;
if (vv != null) {
vv.getLayoutTransformer().setTranslate(translateX, translateY);
}
}
if (! (Double.isNaN(v.getViewTranslateX()) &&
Double.isNaN(v.getViewTranslateX())) ) {
translateX = v.getViewTranslateX();
translateY = v.getViewTranslateY();
dontSend = true;
if (vv != null) {
vv.getViewTransformer().setTranslate(translateX, translateY);
}
}
if (v.getBackgroundImage().length() > 0) {
_graphManager.putBackground(viewName, v.getBackgroundImage());
_graphManager.addImagePreRenderer(viewName, _graphManager.getBackground(viewName));