protected XElement createShim(Element element, int left, int top, int width, int height) {
Layer l = new Layer(DOM.createDiv().<XElement> cast());
l.enableShim();
XElement e = l.getElement();
e.hide();
e.addClassName(CommonStyles.get().shim());
e.setSize(width, height);
e.setLeftTop(left, top);
e.setInnerHTML(" ");
Element parent = null;
if (element != null) {
parent = element.getParentElement();
}
if (parent != null) {
parent.appendChild(e);
} else {
Document.get().getBody().appendChild(e);
}
e.getStyle().setDisplay(Display.BLOCK);
if (element != null) {
e.setZIndex(element.<XElement> cast().getZIndex() + 1);
} else {
e.setZIndex(XDOM.getTopZIndex());
}
return e;
}