scrollPane.getHorizontalScrollBar().setUnitIncrement(SCROLL_UNIT_INCREMENT);
scrollPane.getHorizontalScrollBar().setBlockIncrement(SCROLL_BLOCK_INCREMENT);
scrollPane.getViewport().addChangeListener(scrollChangeListener);
hoverAction = this.createWidgetHoverAction();
blockLayer = new LayerWidget(this);
this.addChild(blockLayer);
startLayer = new LayerWidget(this);
this.addChild(startLayer);
// TODO: String startLabelString = "Loading graph with " + originalDiagram.getFigures().size() + " figures and " + originalDiagram.getConnections().size() + " connections...";
String startLabelString = "";
LabelWidget w = new LabelWidget(this, startLabelString);
scrollChangeListener.register(w, new Point(10, 10));
w.setAlignment(LabelWidget.Alignment.CENTER);
startLabel = w;
startLayer.addChild(w);
mainLayer = new LayerWidget(this);
this.addChild(mainLayer);
topLeft = new Widget(this);
topLeft.setPreferredLocation(new Point(-BORDER_SIZE, -BORDER_SIZE));
this.addChild(topLeft);
bottomRight = new Widget(this);
bottomRight.setPreferredLocation(new Point(-BORDER_SIZE, -BORDER_SIZE));
this.addChild(bottomRight);
slotLayer = new LayerWidget(this);
this.addChild(slotLayer);
connectionLayer = new LayerWidget(this);
this.addChild(connectionLayer);
LayerWidget selectionLayer = new LayerWidget(this);
this.addChild(selectionLayer);
this.setLayout(LayoutFactory.createAbsoluteLayout());
this.getActions().addAction(hoverAction);
zoomAction = new BoundedZoomAction(1.1, false);
zoomAction.setMaxFactor(ZOOM_MAX_FACTOR);
zoomAction.setMinFactor(ZOOM_MIN_FACTOR);
this.getActions().addAction(ActionFactory.createMouseCenteredZoomAction(1.1));
panAction = new ExtendedPanAction();
this.getActions().addAction(panAction);
this.getActions().addAction(ActionFactory.createPopupMenuAction(popupMenuProvider));
LayerWidget selectLayer = new LayerWidget(this);
this.addChild(selectLayer);
this.getActions().addAction(ActionFactory.createRectangularSelectAction(rectangularSelectDecorator, selectLayer, rectangularSelectProvider));
blockWidgets = new HashMap<InputBlock, BlockWidget>();