@Override public void applyStyle(final ElementMap item, final DocumentParser doc, final Widget widget) { this.doc = doc; this.elementMaps.push(item); final ElementMap elementMap = this.elementMaps.peek(); final DecoratorAppearance appearance = widget.getAppearance(); appearance.setElementMap(elementMap); ((ImageAppearance) appearance).setScaled(false); widget.addBasicElement(appearance); appearance.onAttributesInitialized(); final String id = "pmLeftHandCell"; final PixmapElement checkOut = PixmapElement.checkOut(); checkOut.setElementMap(elementMap); if (elementMap != null && id != null) { elementMap.add(id, checkOut); } checkOut.setHeight(31); checkOut.setPosition(Alignment17.CENTER); checkOut.setTexture(this.doc.getTexture("default_1.tga")); checkOut.setWidth(31); checkOut.setX(412); checkOut.setY(480); appearance.addBasicElement(checkOut); checkOut.onAttributesInitialized(); checkOut.onChildrenAdded(); appearance.onChildrenAdded(); }
@Override public void applyStyle(final ElementMap item, final DocumentParser doc, final Widget widget) { this.doc = doc; this.elementMaps.push(item); final ElementMap elementMap = this.elementMaps.peek(); final DecoratorAppearance appearance = widget.getAppearance(); appearance.setElementMap(elementMap); ((ImageAppearance) appearance).setScaled(false); widget.addBasicElement(appearance); appearance.onAttributesInitialized(); final PixmapElement checkOut = PixmapElement.checkOut(); checkOut.setElementMap(elementMap); checkOut.setHeight(12); checkOut.setPosition(Alignment17.CENTER); checkOut.setTexture(this.doc.getTexture("default_0.tga")); checkOut.setWidth(16); checkOut.setX(1002); checkOut.setY(353); appearance.addBasicElement(checkOut); checkOut.onAttributesInitialized(); checkOut.onChildrenAdded(); appearance.onChildrenAdded(); }