public void instantiateWidget(SourcePrinter out, WidgetCreatorContext context) throws CruxGeneratorException
{
String className = getWidgetClassName();
String textLocationStr = context.readWidgetProperty("textlocation");
TextLocation textLocation = TextLocation.CENTER;
if (!StringUtils.isEmpty(textLocationStr))
{
textLocation = TextLocation.valueOf(textLocationStr);
}
out.println("final "+className + " " + context.getWidget()+" = new "+className+"("+TextLocation.class.getCanonicalName()+"."+textLocation.toString()+");");
}