|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttwaver.Size
twaver.Rect
twaver.network.UIBounds
public class UIBounds
UI元素范围,继承于矩形,为UI主体部分的范围大小,主体之外还可设置padding, selection border和outline,共同构成UI的范围信息 UI范围分四种,从小到大分别为:body,fill bounds, content bounds, view bounds fill bounds = body + padding content bounds = fill bounds + outline view bounds = content bounds + selection border
---------------------- | selectionBorder | | ------------------ | | | outline | | | | -------------- | | | | | padding | | | | | | -------- | | | | | | | body | | | | | | | -------- | | | | | |fill bounds | | | | | -------------- | | | | content bounds | | | |----------------| | | view bounds | ---------------------|
Field Summary |
---|
Fields inherited from class twaver.Rect |
---|
x, y |
Fields inherited from class twaver.Size |
---|
height, width |
Constructor Summary | |
---|---|
UIBounds()
|
Method Summary | |
---|---|
UIBounds |
clone()
拷贝一份新的数据,避免对原始数据的更改 |
Rect |
getContentBounds()
content bounds = fill bounds + outline |
Rect |
getFillBounds()
fill bounds = body + padding |
Rect |
getLayoutBounds()
布局范围,与content bounds相同 |
float |
getOutline()
selectionBorder ------------------ | outline | | ------------ | | | padding | | | | -------- | | | | | body | | | | | -------- | | | ------------ | |----------------| |
Insets |
getPadding()
selectionBorder ------------------ | outline | | ------------ | | | padding | | | | -------- | | | | | body | | | | | -------- | | | ------------ | |----------------| |
float |
getSelectionBorder()
selectionBorder ------------------ | outline | | ------------ | | | padding | | | | -------- | | | | | body | | | | | -------- | | | ------------ | |----------------| |
Rect |
getViewBounds()
UI总计范围 view bounds = content bounds + selection border |
boolean |
setOutline(float outline)
边框宽度 |
void |
setPadding(Insets padding)
填充间隙 |
boolean |
setSelectionBorder(float selectionBorder)
选中边框宽度 |
Methods inherited from class twaver.Rect |
---|
add, add, add, contains, deserialize, equals, equals, getBottom, getCenter, getCenterX, getCenterY, getLeft, getLocation, getRight, getTop, getX, getY, grow, grow, grow, intersection, intersects, intersects, intersects, intersects, intersects, isEmpty, offset, offset, reset, serialize, set, set, set, toGraphicRect, toGraphicRectF, toString, translate, union |
Methods inherited from class twaver.Size |
---|
setHeight, setWidth |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UIBounds()
Method Detail |
---|
public void setPadding(Insets padding)
selectionBorder ------------------ | outline | | ------------ | | | padding | | | | -------- | | | | | body | | | | | -------- | | | ------------ | |----------------|
padding
- 填充间距getPadding()
,
getFillBounds()
,
getContentBounds()
,
getViewBounds()
public Insets getPadding()
selectionBorder ------------------ | outline | | ------------ | | | padding | | | | -------- | | | | | body | | | | | -------- | | | ------------ | |----------------|
setPadding(Insets)
,
getFillBounds()
,
getContentBounds()
,
getViewBounds()
public boolean setSelectionBorder(float selectionBorder)
selectionBorder ------------------ | outline | | ------------ | | | padding | | | | -------- | | | | | body | | | | | -------- | | | ------------ | |----------------|
selectionBorder
- 选中边框宽度
getViewBounds()
public float getSelectionBorder()
selectionBorder ------------------ | outline | | ------------ | | | padding | | | | -------- | | | | | body | | | | | -------- | | | ------------ | |----------------|
setSelectionBorder(float)
,
getViewBounds()
public boolean setOutline(float outline)
selectionBorder ------------------ | outline | | ------------ | | | padding | | | | -------- | | | | | body | | | | | -------- | | | ------------ | |----------------|
outline
- 边框宽度
getContentBounds()
,
getViewBounds()
public float getOutline()
selectionBorder ------------------ | outline | | ------------ | | | padding | | | | -------- | | | | | body | | | | | -------- | | | ------------ | |----------------|
public Rect getFillBounds()
setPadding(Insets)
,
getPadding()
public Rect getContentBounds()
getFillBounds()
,
getOutline()
,
setOutline(float)
,
getPadding()
,
setPadding(Insets)
public Rect getLayoutBounds()
getContentBounds()
public Rect getViewBounds()
getContentBounds()
,
getSelectionBorder()
,
setSelectionBorder(float)
public UIBounds clone()
IStruct
clone
in interface IStruct
clone
in class Rect
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |