From d3b702e1ad0925f8683ce3039be8e493abbf179b Mon Sep 17 00:00:00 2001 From: Lucas Rocha Date: Wed, 21 Oct 2015 10:45:33 +0100 Subject: [PATCH] Rename getStylePadding() to getPadding() for consistency So that we're consistent with other style-only methods. Move existing getters to be close to their matching setters in CSSNode. --- .../src/com/facebook/csslayout/CSSNode.java | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/java/src/com/facebook/csslayout/CSSNode.java b/src/java/src/com/facebook/csslayout/CSSNode.java index cc74884f..d6377205 100644 --- a/src/java/src/com/facebook/csslayout/CSSNode.java +++ b/src/java/src/com/facebook/csslayout/CSSNode.java @@ -221,6 +221,13 @@ public class CSSNode { return FloatUtil.floatsEqual(f1, f2); } + /** + * Get this node's direction, as defined in the style. + */ + public CSSDirection getStyleDirection() { + return style.direction; + } + public void setDirection(CSSDirection direction) { if (style.direction != direction) { style.direction = direction; @@ -332,6 +339,13 @@ public class CSSNode { } } + /** + * Get this node's padding, as defined by style + default padding. + */ + public Spacing getPadding() { + return style.padding; + } + public void setPadding(int spacingType, float padding) { if (style.padding.set(spacingType, padding)) { dirty(); @@ -407,6 +421,13 @@ public class CSSNode { } } + /** + * Get this node's width, as defined in the style. + */ + public float getStyleWidth() { + return style.dimensions[DIMENSION_WIDTH]; + } + public void setStyleWidth(float width) { if (!valuesEqual(style.dimensions[DIMENSION_WIDTH], width)) { style.dimensions[DIMENSION_WIDTH] = width; @@ -414,6 +435,13 @@ public class CSSNode { } } + /** + * Get this node's height, as defined in the style. + */ + public float getStyleHeight() { + return style.dimensions[DIMENSION_HEIGHT]; + } + public void setStyleHeight(float height) { if (!valuesEqual(style.dimensions[DIMENSION_HEIGHT], height)) { style.dimensions[DIMENSION_HEIGHT] = height; @@ -441,34 +469,6 @@ public class CSSNode { return layout.direction; } - /** - * Get this node's padding, as defined by style + default padding. - */ - public Spacing getStylePadding() { - return style.padding; - } - - /** - * Get this node's width, as defined in the style. - */ - public float getStyleWidth() { - return style.dimensions[DIMENSION_WIDTH]; - } - - /** - * Get this node's height, as defined in the style. - */ - public float getStyleHeight() { - return style.dimensions[DIMENSION_HEIGHT]; - } - - /** - * Get this node's direction, as defined in the style. - */ - public CSSDirection getStyleDirection() { - return style.direction; - } - /** * Set a default padding (left/top/right/bottom) for this node. */