GraphPane pane = null;
// FIXME: Temporary hack so we can view FSMs properly.
// This should be replaced with a proper tableau mechanism.
if (_toplevel instanceof FSMActor) {
FSMGraphController controller = new FSMGraphController();
FSMGraphModel graphModel = new FSMGraphModel((FSMActor) _toplevel);
// FIXME: To get things like open documentation to work, have
// to specify a configuration. But currently, there isn't one.
if (_configuration != null) {
controller.setConfiguration(_configuration);
}
pane = new GraphPane(controller, graphModel);
} else {
// top level is not an FSM actor.
ActorViewerGraphController controller = new ActorViewerGraphController();
controller.setConfiguration(_configuration);
GraphModel model = new ActorGraphModel(_toplevel);
pane = new GraphPane(controller, model);
}