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:
@@ -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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user