Skip to main content

SUIRect

class SUIRect

A 2D Rectangle that controls the position("X" and "Y"), and the following options, "Size"(the size of the SUIRect, ie, its width and height), "Margin"(external spacing of the SUIRect), "Padding"(SUIRect internal spacing), "Anchors"(Anchors that are used to attach one or more SUIRect axes to the parent object that has a ConstraintLayout or LinearLayout), "Rotation"(SUIRect axis rotation) and "Layers" "(SUIRect layers).

See the SUIRect component topic to learn more about SUIRect.


public class SUIRect extends Component

— Constructors (1) —

ConstructorDescription
SUIRect()Creates a new SUIRect.

— Methods (20) —

NameDescription
Quaternion getRotation()Returns the current rotation of SUIRect.
void setRotation(Quaternion value)Sets the current rotation of SUIRect to be "value" argument.
int getScreenX()Returns the current position in pixels of the SUIRect X axis.
int getScreenY()Returns the current position in pixels of the SUIRect Y axis.
int getScreenW()Returns the current width of the SUIRect in pixels.
int getScreenH()Returns the current height of SUIRect in pixels.
int getLayer()Returns the current SUIRect layer.
void setLayer(int value)Sets the current SUIRect layer to be "value" argument.
int getInt(String entry)Returns the current value(int) of the SUIRect property to be "entry" argument.
void setInt(String entry, int value)Sets the current value(int) to be "value" argument of the SUIRect property to be "entry" argument.
float getFloat(String entry)Returns the current value(float) of the SUIRect property to be "entry" argument.
void setFloat(String entry, float value)Sets the current value(float) to be "value" argument of the SUIRect property to be "entry" argument.
SUnitType getUnit(String entry)Returns the current type("Pixel", "DIP", "MatchParent" or "WrapContent") of the SUIRect property to be "entry" argument.
void setUnit(String entry, SUnitType value)Sets the current type("Pixel", "DIP", "MatchParent" or "WrapContent") to be "value" argument of the SUIRect property to be "entry" argument.
SpatialObject getAnchorObject(String entry)Returns the SpatialObject anchored to the SUIRect property to be "entry" argument.
void setAnchorObject(String entry, SpatialObject value)Sets the SpatialObject anchored to be "value" argument to the SUIRect property to be "entry" argument.
SVerticalConstraintTarget getVerticalAnchorType(String entry)Returns the current type("Unfixed", "ToTopOf" or "ToBottomOf") of the SUIRect property to be "entry" argument to which end the SUIRect is anchored to the parent object.
void setVerticalAnchorType(String entry, SVerticalConstraintTarget value)Sets the current type("Unfixed", "ToTopOf" or "ToBottomOf") to be "value" argument of the SUIRect property to be "entry" argument to which end the SUIRect is anchored to the parent object.
SHorizontalConstraintTarget getHorizontalAnchorType(String entry)Returns the current type("Unfixed", "ToLeftOf" or "ToRightOf") of the SUIRect property to be "entry" argument to which end the SUIRect is anchored to the parent object.
void setHorizontalAnchorType(String entry, SHorizontalConstraintTarget value)Sets the current type("Unfixed", "ToLeftOf" or "ToRightOf") to be "value" argument of the SUIRect property to be "entry" argument to which end the SUIRect is anchored to the parent object.