diff options
author | Artur Signell <artur@vaadin.com> | 2014-12-15 23:07:42 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2014-12-15 23:12:14 +0200 |
commit | 10b30728e94ecfc19208dc387f5dbd7b9b6f71b1 (patch) | |
tree | 9c20e5ba80e57143ddbcbaa20a87cbb259f89b3c /server/src | |
parent | 353206974a542d0aadc278dea4adeff226fb3a9e (diff) | |
download | vaadin-framework-10b30728e94ecfc19208dc387f5dbd7b9b6f71b1.tar.gz vaadin-framework-10b30728e94ecfc19208dc387f5dbd7b9b6f71b1.zip |
createNode -> createElement
Change-Id: Ifb7342a860fa73d51dc462b788a4530abb0bb52f
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/com/vaadin/ui/AbsoluteLayout.java | 19 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/AbstractOrderedLayout.java | 16 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/AbstractSingleComponentContainer.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/AbstractSplitPanel.java | 4 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/CssLayout.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/TabSheet.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/declarative/Design.java | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/declarative/DesignContext.java | 2 |
8 files changed, 25 insertions, 24 deletions
diff --git a/server/src/com/vaadin/ui/AbsoluteLayout.java b/server/src/com/vaadin/ui/AbsoluteLayout.java index 3e1e7bfbdb..47ebdd12cd 100644 --- a/server/src/com/vaadin/ui/AbsoluteLayout.java +++ b/server/src/com/vaadin/ui/AbsoluteLayout.java @@ -723,22 +723,23 @@ public class AbsoluteLayout extends AbstractLayout implements // handle children Element designElement = design; for (Component child : this) { - Element childNode = designContext.createNode(child); - designElement.appendChild(childNode); - child.writeDesign(childNode, designContext); + Element childElement = designContext.createElement(child); + designElement.appendChild(childElement); + child.writeDesign(childElement, designContext); // handle position ComponentPosition position = getPosition(child); - writePositionAttribute(childNode, ATTR_TOP, position.getTopUnits() - .getSymbol(), position.getTopValue()); - writePositionAttribute(childNode, ATTR_RIGHT, position + writePositionAttribute(childElement, ATTR_TOP, position + .getTopUnits().getSymbol(), position.getTopValue()); + writePositionAttribute(childElement, ATTR_RIGHT, position .getRightUnits().getSymbol(), position.getRightValue()); - writePositionAttribute(childNode, ATTR_BOTTOM, position + writePositionAttribute(childElement, ATTR_BOTTOM, position .getBottomUnits().getSymbol(), position.getBottomValue()); - writePositionAttribute(childNode, ATTR_LEFT, position + writePositionAttribute(childElement, ATTR_LEFT, position .getLeftUnits().getSymbol(), position.getLeftValue()); // handle z-index if (position.getZIndex() >= 0) { - childNode.attr(ATTR_Z_INDEX, String.valueOf(position.zIndex)); + childElement + .attr(ATTR_Z_INDEX, String.valueOf(position.zIndex)); } } } diff --git a/server/src/com/vaadin/ui/AbstractOrderedLayout.java b/server/src/com/vaadin/ui/AbstractOrderedLayout.java index b105d53fce..c347449ab8 100644 --- a/server/src/com/vaadin/ui/AbstractOrderedLayout.java +++ b/server/src/com/vaadin/ui/AbstractOrderedLayout.java @@ -545,26 +545,26 @@ public abstract class AbstractOrderedLayout extends AbstractLayout implements } for (Component child : this) { - Element childNode = designContext.createNode(child); - designElement.appendChild(childNode); + Element childElement = designContext.createElement(child); + designElement.appendChild(childElement); // handle alignment Alignment alignment = getComponentAlignment(child); if (alignment.isMiddle()) { - childNode.attr(":middle", ""); + childElement.attr(":middle", ""); } else if (alignment.isBottom()) { - childNode.attr(":bottom", ""); + childElement.attr(":bottom", ""); } if (alignment.isCenter()) { - childNode.attr(":center", ""); + childElement.attr(":center", ""); } else if (alignment.isRight()) { - childNode.attr(":right", ""); + childElement.attr(":right", ""); } // handle expand ratio float expandRatio = getExpandRatio(child); if (expandRatio == 1.0f) { - childNode.attr(":expand", ""); + childElement.attr(":expand", ""); } else if (expandRatio > 0) { - childNode.attr(":expand", + childElement.attr(":expand", DesignAttributeHandler.formatFloat(expandRatio)); } } diff --git a/server/src/com/vaadin/ui/AbstractSingleComponentContainer.java b/server/src/com/vaadin/ui/AbstractSingleComponentContainer.java index 330fcfeae1..23fa8a78c7 100644 --- a/server/src/com/vaadin/ui/AbstractSingleComponentContainer.java +++ b/server/src/com/vaadin/ui/AbstractSingleComponentContainer.java @@ -317,7 +317,7 @@ public abstract class AbstractSingleComponentContainer extends // handle child component Component child = getContent(); if (child != null) { - Element childNode = designContext.createNode(child); + Element childNode = designContext.createElement(child); design.appendChild(childNode); } } diff --git a/server/src/com/vaadin/ui/AbstractSplitPanel.java b/server/src/com/vaadin/ui/AbstractSplitPanel.java index 4c85311075..8d1db549a9 100644 --- a/server/src/com/vaadin/ui/AbstractSplitPanel.java +++ b/server/src/com/vaadin/ui/AbstractSplitPanel.java @@ -654,11 +654,11 @@ public abstract class AbstractSplitPanel extends AbstractComponentContainer { Component firstComponent = getFirstComponent(); Component secondComponent = getSecondComponent(); if (firstComponent != null) { - Element childElement = designContext.createNode(firstComponent); + Element childElement = designContext.createElement(firstComponent); design.appendChild(childElement); } if (secondComponent != null) { - Element childElement = designContext.createNode(secondComponent); + Element childElement = designContext.createElement(secondComponent); if (firstComponent == null) { childElement.attr(":second", ""); } diff --git a/server/src/com/vaadin/ui/CssLayout.java b/server/src/com/vaadin/ui/CssLayout.java index 5c7471522d..1042947f21 100644 --- a/server/src/com/vaadin/ui/CssLayout.java +++ b/server/src/com/vaadin/ui/CssLayout.java @@ -393,7 +393,7 @@ public class CssLayout extends AbstractLayout implements LayoutClickNotifier { // handle children Element designElement = design; for (Component child : this) { - Element childNode = designContext.createNode(child); + Element childNode = designContext.createElement(child); designElement.appendChild(childNode); } } diff --git a/server/src/com/vaadin/ui/TabSheet.java b/server/src/com/vaadin/ui/TabSheet.java index a264692acb..442be21825 100644 --- a/server/src/com/vaadin/ui/TabSheet.java +++ b/server/src/com/vaadin/ui/TabSheet.java @@ -1571,7 +1571,7 @@ public class TabSheet extends AbstractComponentContainer implements Focusable, // create element for tab Element tabElement = design.appendElement("tab"); // add tab content - tabElement.appendChild(designContext.createNode(tab.getComponent())); + tabElement.appendChild(designContext.createElement(tab.getComponent())); Attributes attr = tabElement.attributes(); // write attributes DesignAttributeHandler.writeAttribute("visible", attr, tab.isVisible(), diff --git a/server/src/com/vaadin/ui/declarative/Design.java b/server/src/com/vaadin/ui/declarative/Design.java index db656937ef..138214af6b 100644 --- a/server/src/com/vaadin/ui/declarative/Design.java +++ b/server/src/com/vaadin/ui/declarative/Design.java @@ -243,7 +243,7 @@ public class Design implements Serializable { // creates the entire component hierarchy rooted at the // given root node. Component root = designContext.getRootComponent(); - Node rootNode = designContext.createNode(root); + Node rootNode = designContext.createElement(root); body.appendChild(rootNode); return doc; } diff --git a/server/src/com/vaadin/ui/declarative/DesignContext.java b/server/src/com/vaadin/ui/declarative/DesignContext.java index 214040b54d..c5094d7927 100644 --- a/server/src/com/vaadin/ui/declarative/DesignContext.java +++ b/server/src/com/vaadin/ui/declarative/DesignContext.java @@ -360,7 +360,7 @@ public class DesignContext implements Serializable { * name of the created node is derived from the class name of * childComponent. */ - public Element createNode(Component childComponent) { + public Element createElement(Component childComponent) { Class<?> componentClass = childComponent.getClass(); String packageName = componentClass.getPackage().getName(); String prefix = packageToPrefix.get(packageName); |