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.
This commit is contained in:
Lucas Rocha
2015-10-21 10:45:33 +01:00
parent eb1d1726b9
commit d3b702e1ad

View File

@@ -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.
*/