if (axis != null && axis.getVisibleOrientation() != null) {
ControllableAxis a = new ControllableAxis(newPlot, axis);
observableAxes.add(a);
newPlot.attachLocalControl(new PanControls(a));
newPlot.attachLocalControl(new ZoomControls(a));
newPlot.attachLocalControl(new CornerResetButton(a));
for (AbstractAxisBoundManager mgr : newPlot.getBoundManagers(a.getVisibleOrientation())) {
newPlot.attachLocalControl(new BoundaryArrow(mgr));
}
}
}
newPlot.attachLocalControl(new CornerResetButton(observableAxes.toArray(new ControllableAxis[observableAxes.size()])));
}