Package com.vaadin.client
Class ExistingElementMap
java.lang.Object
com.vaadin.client.ExistingElementMap
Mapping between a server side node identifier which has been requested to
attach existing client side element.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int id, elemental.dom.Element element) Adds theidand theelementto the mapping.elemental.dom.ElementgetElement(int id) Gets the element stored via theadd(int, Element)method by the givenid.getId(elemental.dom.Element element) Gets the id stored via theadd(int, Element)method by the givenelement.voidremove(int id) Remove the identifier and the associated element from the mapping.
-
Constructor Details
-
ExistingElementMap
public ExistingElementMap()
-
-
Method Details
-
getElement
public elemental.dom.Element getElement(int id) Gets the element stored via theadd(int, Element)method by the givenid.- Parameters:
id- identifier associated with an element- Returns:
- the element associated with the
idor null if it doesn't exist
-
getId
Gets the id stored via theadd(int, Element)method by the givenelement.- Parameters:
element- element associated with an identifier- Returns:
- the identifier associated with the
elementor null if it doesn't exist
-
remove
public void remove(int id) Remove the identifier and the associated element from the mapping.- Parameters:
id- identifier to remove
-
add
public void add(int id, elemental.dom.Element element) Adds theidand theelementto the mapping.- Parameters:
id- identifier of the server side nodeelement- element associated with the identifier
-