currentNet.getToolspecificArray(j)
.getBounds().getPosition().getY()
.intValue());
if (editor[i] instanceof EditorVC) {
// Pass read layout information on to the editor
EditorLayoutInfo layout = new EditorLayoutInfo();
layout.setSavedSize(dim);
layout.setSavedLocation(location);
// try to import the type of Layout (false if vertical)
((EditorVC) editor[i]).setRotateSelected(currentNet
.getToolspecificArray(j)
.getVerticalLayout());
//for importing a vertical net to change the rotate-button
if (currentNet
.getToolspecificArray(j)
.getVerticalLayout()== true){
//EditorVC.setRotateSelected(true);
VisualController.getInstance().propertyChange(new PropertyChangeEvent(this, "Import", null, null));
// Update the UI representation
//EditorVC.getGraph().updateUI();
}
if (currentNet.getToolspecificArray(j).isSetScale()) {
// try to import the saved scale
((EditorVC) editor[i]).getGraph().setScale(currentNet
.getToolspecificArray(j).getScale()/100.0);
}
// Only if also the remaining information is
// available,
// try to import the width of the tree view and the height of the overview panel
if (currentNet.getToolspecificArray(j).isSetTreeWidth()){
GraphicsSimpleType bounds = currentNet.getToolspecificArray(j).getBounds();
DimensionType dimension = bounds.getDimension();
int x =(int) (dimension.getX()).doubleValue();
x = x - currentNet.getToolspecificArray(j).getTreeWidth();
layout.setTreeViewWidthRight(x);
} else if (currentNet.getToolspecificArray(j).isSetTreeWidthRight()){
layout.setTreeViewWidthRight(currentNet.getToolspecificArray(j).getTreeWidthRight());
}
else {
layout.setTreeViewWidthRight(currentNet
.getToolspecificArray(j).getBounds()
.getDimension().getX().intValue() - 100);
}
if(currentNet.getToolspecificArray(j).isSetOverviewPanelVisible()){
layout.setOverviewPanelVisible(currentNet.getToolspecificArray(j).getOverviewPanelVisible());
}else{
layout.setOverviewPanelVisible(true);
}
if (currentNet.getToolspecificArray(j).isSetTreeHeightOverview()){
if(currentNet.getToolspecificArray(j).getTreeHeightOverview() < 1){
layout.setTreeHeightOverview(100);
}else{
layout.setTreeHeightOverview(currentNet.getToolspecificArray(j).getTreeHeightOverview());
}
}else{
layout.setTreeHeightOverview(100);
}
if(currentNet.getToolspecificArray(j).isSetTreePanelVisible()){
layout.setTreePanelVisible(currentNet.getToolspecificArray(j).getTreePanelVisible());
}else{
layout.setTreePanelVisible(true);
}
((EditorVC) editor[i]).getEditorPanel().setSavedLayoutInfo(layout);
}
}