// This is used both when loading a model and when the user is making
// new widgets in the UI. For most widget types, the same type string
// is used in both places. - ST 3/17/04
public Widget makeWidget(String type, boolean loading) {
type = "DUMMY " + type.toUpperCase();
Widget fromRegistry = org.nlogo.window.WidgetRegistry.apply(type);
if (fromRegistry != null) {
return fromRegistry;
} else if (type.equals("DUMMY SLIDER")) {
return new org.nlogo.window.DummySliderWidget();
} else if (type.equals("DUMMY CHOOSER") || // current name