Adds an element to the layer at the given position, removes it from it's old layer @param x x coordinate @param y y coordinate @param element new element @throws java.lang.Exception
(final LayerElement element, final int x, final int y)
| 200 | * @throws java.lang.Exception |
| 201 | */ |
| 202 | public void put(final LayerElement element, final int x, final int y) throws Exception { |
| 203 | // remove element from other layer if one is set |
| 204 | if(element.getLayer() != null){ |
| 205 | element.getLayer().remove(element); |
| 206 | } |
| 207 | element.setPosition(x, y, this); |
| 208 | put(element); |
| 209 | } |
| 210 | |
| 211 | /** |
| 212 | * Adds an element to the layer, removes it from it's old layer |