Modifier and Type | Field and Description |
---|---|
protected Map<Sprite,XElement> |
elements |
protected Map<Sprite,String> |
spriteIds |
backgroundSprite, component, container, height, sprites, surfaceElement, width
Constructor and Description |
---|
DomSurface() |
Modifier and Type | Method and Description |
---|---|
void |
deleteSprite(Sprite sprite)
Deletes the given sprite from the surface.
|
protected XElement |
getElement(Sprite sprite)
Returns the DOM element associated with the given sprite.
|
protected void |
setElement(Sprite sprite,
XElement element)
Associates the given sprite with the given dom element.
|
void |
setId(Sprite sprite,
String id)
Assigns an ID to be set in the sprite's dom element once it has been created.
|
add, addGradient, clear, create, create, draw, getBBox, getBBoxText, getComponent, getHeight, getSprites, getSurfaceElement, getWidth, renderAll, renderSprite, setBackground, setCursor, setHeight, setViewBox, setWidth
public void setId(Sprite sprite, String id)
sprite
- the spriteid
- the id to set.Element#setId(String)
protected XElement getElement(Sprite sprite)
sprite
- the spriteprotected void setElement(Sprite sprite, XElement element)
sprite
- the spriteelement
- the dom elementpublic void deleteSprite(Sprite sprite)
Surface
deleteSprite
in class Surface
sprite
- the sprite to be deletedCopyright © 2018. All rights reserved.