// Need an effigy and a tableau so that menu ops work properly.
if (_tableau == null) {
Effigy containerEffigy = Configuration.findEffigy(toplevel());
if (containerEffigy == null) {
throw new IllegalActionException(this,
"Cannot find effigy for top level: "
+ toplevel().getFullName());
}
try {
_effigy = new TokenEffigy(containerEffigy, containerEffigy
.uniqueName("tokenEffigy"));
// The default identifier is "Unnamed", which is
// no good for two reasons: Wrong title bar label,
// and it causes a save-as to destroy the original window.
_effigy.identifier.setExpression(getFullName());
// The second argument prevents a status bar.
_frame = new TableauFrame(null, null, this);
_tableau = new MatrixTokenTableau(_effigy, "tokenTableau",
(TableauFrame) _frame);
((TableauFrame) _frame).setTableau(_tableau);
setFrame(_frame);
_tableau.show();
} catch (Exception ex) {
throw new IllegalActionException(this, null, ex,
"Error creating effigy and tableau");
}
} else {
// Erase previous text.
_effigy.clear();