Uses of Class
twaver.Rect

Packages that use Rect
twaver   
twaver.model   
twaver.network   
 

Uses of Rect in twaver
 

Subclasses of Rect in twaver
 class RoundRect
          圆角矩形,继承于Rect,增加了radius参数,用来表示圆角半径
 

Methods in twaver that return Rect
 Rect Rect.add(float newx, float newy)
          添加点,扩大矩形范围
 Rect Rect.clone()
           
 Rect Rect.grow(float h, float v)
          扩大矩形范围
 Rect Rect.grow(float l, float r, float t, float b)
          扩大矩形范围,指定间距
 Rect Rect.grow(Insets insets)
          扩大矩形范围,指定间距
 Rect Rect.intersection(Rect r)
          相交区域
 Rect Rect.offset(float offsetX, float offsetY)
          偏移矩形
 Rect Rect.offset(Point p)
          偏移矩形
 Rect Rect.translate(float tx, float ty)
          平移矩形位置
 Rect Rect.union(Rect r)
          合并矩形
 

Methods in twaver with parameters of type Rect
 boolean Rect.equals(Rect rect, float precision)
          是否相等
 Rect Rect.intersection(Rect r)
          相交区域
 boolean Rect.intersects(Rect rect)
          矩形是否相交
 void Rect.set(Rect rect)
          从指定矩形中获取参数数值
 Rect Rect.union(Rect r)
          合并矩形
 

Uses of Rect in twaver.model
 

Methods in twaver.model that return Rect
 Rect Node.calculateBounds()
          计算网元范围,网元计算范围与实际显示范围不一定相同,网元实际显示范围与呈现样式有关 Node.calculateSize
 

Uses of Rect in twaver.network
 

Subclasses of Rect in twaver.network
 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
 

Methods in twaver.network that return Rect
 Rect ElementUI.getBodyBounds()
          获取网元主体范围
 Rect Network.getBodyBounds(Element element)
          获取网元组件的主体尺寸和位置
 Rect UIBounds.getContentBounds()
          content bounds = fill bounds + outline
 Rect Network.getElementsBounds()
          网元显示范围,使用逻辑坐标
 Rect UIBounds.getFillBounds()
          fill bounds = body + padding
 Rect UIBounds.getLayoutBounds()
          布局范围,与content bounds相同
 Rect ElementUI.getUIBounds()
          UI的整体范围,包括所有文本,告警以及挂载UI所占的空间
 Rect Network.getUIBounds(Element element)
          获取网元在拓扑图中所占的范围
 Rect UIBounds.getViewBounds()
          UI总计范围 view bounds = content bounds + selection border
 Rect Network.getViewportBounds()
          拓扑图当前可见范围,使用逻辑坐标
 Rect Network.toLogicalRect(Rect screenRect)
          屏幕矩形转换成拓扑逻辑坐标,会根据缩放比例和偏移量作转换
 Rect Network.toScreenRect(Rect logicalRect)
          逻辑坐标转换成屏幕坐标,比如网元节点逻辑范围为:(100, 100, 32, 32),通过这个方法可以获取该节点位于屏幕的坐标范围
 

Methods in twaver.network with parameters of type Rect
protected  void LinkUI.drawLink(Rect fromBounds, Rect toBounds, java.util.List<PathSegment> pathSegments)
          绘制连线,仅用于非自环的情况,计算连线的路径,存放在pathSegments参数中
protected  void LinkUI.drawLoopedLink(Rect agentBounds, java.util.List<PathSegment> pathSegments)
          计算自环时连线的走向,结果存放在参数pathSegments中
 boolean UI.intersect(Rect rect)
          矩形相交
 boolean ShapeUI.intersect(Rect rect)
           
 Rect Network.toLogicalRect(Rect screenRect)
          屏幕矩形转换成拓扑逻辑坐标,会根据缩放比例和偏移量作转换
 Rect Network.toScreenRect(Rect logicalRect)
          逻辑坐标转换成屏幕坐标,比如网元节点逻辑范围为:(100, 100, 32, 32),通过这个方法可以获取该节点位于屏幕的坐标范围