Java Code Examples for com.google.gwt.dom.client.Element#getPropertyObject()
The following examples show how to use
com.google.gwt.dom.client.Element#getPropertyObject() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BlipMetaDomImpl.java From swellrt with Apache License 2.0 | 6 votes |
public StringSequence getInlineLocators() { if (inlineLocators == null) { Element content = getContentContainer().getFirstChildElement(); if (content != null) { inlineLocators = (StringSequence) content.getPropertyObject(INLINE_LOCATOR_PROPERTY); if (inlineLocators == null) { // Note: getAttribute() of a missing attribute does not return null on // all browsers. if (content.hasAttribute(INLINE_LOCATOR_ATTRIBUTE)) { String serial = content.getAttribute(INLINE_LOCATOR_ATTRIBUTE); inlineLocators = StringSequence.create(serial); } else { inlineLocators = StringSequence.create(); } content.setPropertyObject(INLINE_LOCATOR_PROPERTY, inlineLocators); } } else { // Leave inlineLocators as null, since the document is not here yet. } } return inlineLocators; }
Example 2
Source File: BlipMetaDomImpl.java From incubator-retired-wave with Apache License 2.0 | 6 votes |
public StringSequence getInlineLocators() { if (inlineLocators == null) { Element content = getContentContainer().getFirstChildElement(); if (content != null) { inlineLocators = (StringSequence) content.getPropertyObject(INLINE_LOCATOR_PROPERTY); if (inlineLocators == null) { // Note: getAttribute() of a missing attribute does not return null on // all browsers. if (content.hasAttribute(INLINE_LOCATOR_ATTRIBUTE)) { String serial = content.getAttribute(INLINE_LOCATOR_ATTRIBUTE); inlineLocators = StringSequence.create(serial); } else { inlineLocators = StringSequence.create(); } content.setPropertyObject(INLINE_LOCATOR_PROPERTY, inlineLocators); } } else { // Leave inlineLocators as null, since the document is not here yet. } } return inlineLocators; }
Example 3
Source File: DiffManager.java From swellrt with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} */ public Element needToSplit(Element transparentNode) { DiffType type = (DiffType) transparentNode.getPropertyObject(DIFF_KEY); String author = (String) transparentNode.getPropertyObject(AUTHOR_KEY); if (type == null) { throw new IllegalArgumentException("No diff type known for given node"); } return createElement(type, author); }
Example 4
Source File: DiffManager.java From incubator-retired-wave with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} */ public Element needToSplit(Element transparentNode) { DiffType type = (DiffType) transparentNode.getPropertyObject(DIFF_KEY); if (type == null) { throw new IllegalArgumentException("No diff type known for given node"); } return createElement(type); }
Example 5
Source File: EditorWebDriverUtil.java From incubator-retired-wave with Apache License 2.0 | 4 votes |
/** * @param editorDiv * @return Editor owning given doc div */ private static Editor getByEditorDiv(Element editorDiv) { return (editorDiv == null) ? null : (Editor) editorDiv.getPropertyObject(EDITOR_WEBDRIVER_PROPERTY); }
Example 6
Source File: DiffManager.java From swellrt with Apache License 2.0 | 4 votes |
public String getAuthor(Element element) { return element == null || NodeManager.getTransparentManager(element) != this ? null : (String) element.getPropertyObject(AUTHOR_KEY); }
Example 7
Source File: EditorWebDriverUtil.java From swellrt with Apache License 2.0 | 4 votes |
/** * @param editorDiv * @return Editor owning given doc div */ private static Editor getByEditorDiv(Element editorDiv) { return (editorDiv == null) ? null : (Editor) editorDiv.getPropertyObject(EDITOR_WEBDRIVER_PROPERTY); }
Example 8
Source File: NodeManager.java From swellrt with Apache License 2.0 | 2 votes |
/** * @param nodelet Gets the ContentElement reference stored in this node. * @return null if no back reference. */ public static ContentElement getBackReference(Element nodelet) { return nodelet == null ? null : (ContentElement) nodelet.getPropertyObject(BACKREF_NAME); }
Example 9
Source File: NodeManager.java From swellrt with Apache License 2.0 | 2 votes |
/** * Check if an element has a back reference. No smartness or searching upwards. * @param nodelet * @return true if the given element has a back reference */ public static boolean hasBackReference(Element nodelet) { return nodelet == null ? false : nodelet.getPropertyObject(BACKREF_NAME) != null; }
Example 10
Source File: NodeManager.java From swellrt with Apache License 2.0 | 2 votes |
/** * @param element * @return The transparent node manager for the given element, or null if * none. */ @SuppressWarnings("unchecked") public static TransparentManager<Element> getTransparentManager(Element element) { return (TransparentManager<Element>)element.getPropertyObject(TRANSPARENT_BACKREF); }
Example 11
Source File: NodeManager.java From swellrt with Apache License 2.0 | 2 votes |
/** * @param element * @return the transparency level of the given element, or null if it is not * a transparent node */ public static Skip getTransparency(Element element) { return (Skip) element.getPropertyObject(TRANSPARENCY); }
Example 12
Source File: DiffManager.java From incubator-retired-wave with Apache License 2.0 | 2 votes |
/** * @param element * @return The annotation type of the given element, or null if it is not * an element managed by this instance */ public DiffType getDiffType(Element element) { return element == null || NodeManager.getTransparentManager(element) != this ? null : (DiffType) element.getPropertyObject(DIFF_KEY); }
Example 13
Source File: NodeManager.java From swellrt with Apache License 2.0 | 2 votes |
/** * NOTE(danilatos): This is preliminary * @param element Element * @return True if it is an intentional transparent node */ public static boolean isTransparent(Element element) { return element.getPropertyObject(TRANSPARENCY) != null; }
Example 14
Source File: NodeManager.java From incubator-retired-wave with Apache License 2.0 | 2 votes |
/** * NOTE(danilatos): This is preliminary * @param element Element * @return True if it is an intentional transparent node */ public static boolean isTransparent(Element element) { return element.getPropertyObject(TRANSPARENCY) != null; }
Example 15
Source File: NodeManager.java From incubator-retired-wave with Apache License 2.0 | 2 votes |
/** * @param element * @return the transparency level of the given element, or null if it is not * a transparent node */ public static Skip getTransparency(Element element) { return (Skip) element.getPropertyObject(TRANSPARENCY); }
Example 16
Source File: NodeManager.java From incubator-retired-wave with Apache License 2.0 | 2 votes |
/** * @param element * @return The transparent node manager for the given element, or null if * none. */ @SuppressWarnings("unchecked") public static TransparentManager<Element> getTransparentManager(Element element) { return (TransparentManager<Element>)element.getPropertyObject(TRANSPARENT_BACKREF); }
Example 17
Source File: NodeManager.java From incubator-retired-wave with Apache License 2.0 | 2 votes |
/** * @param nodelet Gets the ContentElement reference stored in this node. * @return null if no back reference. */ public static ContentElement getBackReference(Element nodelet) { return nodelet == null ? null : (ContentElement) nodelet.getPropertyObject(BACKREF_NAME); }
Example 18
Source File: NodeManager.java From incubator-retired-wave with Apache License 2.0 | 2 votes |
/** * Check if an element has a back reference. No smartness or searching upwards. * @param nodelet * @return true if the given element has a back reference */ public static boolean hasBackReference(Element nodelet) { return nodelet == null ? false : nodelet.getPropertyObject(BACKREF_NAME) != null; }
Example 19
Source File: DiffManager.java From swellrt with Apache License 2.0 | 2 votes |
/** * @param element * @return The annotation type of the given element, or null if it is not * an element managed by this instance */ public DiffType getDiffType(Element element) { return element == null || NodeManager.getTransparentManager(element) != this ? null : (DiffType) element.getPropertyObject(DIFF_KEY); }