return heightString;
}
private String computeImgString (Map bindingsHashtable)
{
AWBinding filenameBinding = (AWBinding)bindingsHashtable.remove(BindingNames.filename);
if (!filenameBinding.isConstantValue()) {
throw new AWGenericException(getClass().getName() + ": \"filename\" binding must be constant.");
}
String filename = filenameBinding.stringValue(null);
AWMultiLocaleResourceManager resourceManager = AWConcreteApplication.SharedInstance.resourceManager();
AWImageInfo imageInfo = resourceManager.imageInfoForName(filename);
String imageUrl = imageUrl(imageInfo, filename);
AWEncodedString width = widthString(bindingsHashtable, imageInfo);
AWEncodedString height = heightString(bindingsHashtable, imageInfo);
String widthString = width.string();
String heightString = height.string();
AWFastStringBuffer fastStringBuffer = new AWFastStringBuffer();
fastStringBuffer.append("<img src=\"");
fastStringBuffer.append(imageUrl);
fastStringBuffer.append("\"");
if (widthString != null) {
fastStringBuffer.append(" width=\"");
fastStringBuffer.append(widthString);
fastStringBuffer.append("\"");
}
if (heightString != null) {
fastStringBuffer.append(" height=\"");
fastStringBuffer.append(heightString);
fastStringBuffer.append("\"");
}
AWBinding borderBinding = (AWBinding)bindingsHashtable.remove(BindingNames.border);
String borderString = (borderBinding != null) ? borderBinding.stringValue(null) : "0";
if (borderString != null) {
fastStringBuffer.append(" border=\"");
fastStringBuffer.append(borderString);
fastStringBuffer.append("\"");
}