double y;
if ((getSourceType() == TOOLBAR_TYPE)
|| (getSourceType() == MENUBAR_TYPE)) {
// No location in the action, so put it in the middle.
BasicGraphFrame frame = FSMGraphController.this.getFrame();
Point2D center;
if (frame != null) {
// Put in the middle of the visible part.
center = frame.getCenter();
x = center.getX();
y = center.getY();
} else {
// Put in the middle of the pane.
GraphPane pane = getGraphPane();