|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttwaver.core.network.BaseUI<T>
twaver.network.ElementUI<Node>
twaver.network.NodeUI
twaver.network.ShapeNodeUI
public class ShapeNodeUI
用于呈现ShapeNode
网元类型,可以填充呈现多边形,或者不填充呈现线条样式
IPathUI
Field Summary |
---|
Fields inherited from class twaver.network.NodeUI |
---|
imageUI, shapeUI |
Fields inherited from class twaver.network.ElementUI |
---|
alarm, body, isLayouting, label, network |
Fields inherited from class twaver.core.network.BaseUI |
---|
anchorPoint, bodyOffsetX, bodyOffsetY, bounds, data, invalidateAnchorPointFlag, invalidateLocationFlag, invalidateRenderFlag, invalidateSizeFlag, location, stateOutline, stateOutlineColor, visible |
Constructor Summary | |
---|---|
ShapeNodeUI(ShapeNode data,
Network network)
|
Method Summary | |
---|---|
protected boolean |
byShape()
是否使用shapeUI作为网元主体,如果网元是ShapeNode类型,或者contentType属性为Consts.CONTENT_TYPE_SHAPE,则返回true |
protected boolean |
doValidate()
执行生效动作,比如孩子元素的位置布局,范围大小的确定等等 |
float |
getLength()
路径长度 |
float |
getLineWidth()
路径线条宽度 |
java.util.List<PathSegment> |
getPathSegments()
获取路径 |
void |
invalidatePoints()
无效多边形路径数据 |
boolean |
isInvalidatePoints()
路径是否无效 |
boolean |
isLayoutByAnchorPoint()
|
boolean |
isLayoutByPath()
是否沿线布局 |
protected boolean |
onElementPropertyChange(java.lang.String propertyName,
PropertyChangeEvent evt)
网元属性变化时,调用此函数 |
protected void |
resetShapeData()
重新设置图形类型,默认取样式Styles.SHAPE_TYPE属性,只在网元主体为shapeUI是起作用 |
protected void |
resetStyles()
重新加载网元UI的所有样式 |
boolean |
setLayoutByPath(boolean layoutByPath)
设置孩子是否沿路径布局,设置true时,网元上挂载的元素将沿线分布 |
protected void |
validatePoints()
生成多边形路径数据 |
Methods inherited from class twaver.network.NodeUI |
---|
checkBody, checkNodeStyle, createChildren, invalidateLinks, invalidateLocation, onBodyChange, resetNodeProperties |
Methods inherited from class twaver.core.network.BaseUI |
---|
checkBackground, checkOutline, draw, drawBackgroundAndBorder, drawBody, drawStateOutline, drawStateOutline, getAnchorPoint, getAnchorPosition, getAngle, getBackgroundColor, getBounds, getCornerRadius, getData, getLocation, getMeasuredHeight, getMeasuredWidth, getOffset, getOutlineColor, getOutlineWidth, getRenderColor, getSelectionBorder, getSelectionBorderColor, getStateOutline, getStateOutlineColor, intersect, intersectPointer, invalidateAnchorPoint, invalidatePointer, invalidateRender, invalidateSize, isDrawBackground, isDrawOutline, isDrawStateOutline, isInvalidate, isInvalidateAnchorPoint, isInvalidateLocation, isInvalidateSize, isRelativeLocation, isRotatable, isSelected, isShowOnTop, measureAnchorPosition, onDrawBackgroundAndBorder, perLocation, resetPaint, resetShape, setAnchorPosition, setBackgroundColor, setBackgroundShader, setBounds, setBounds, setCornerRadius, setData, setLocation, setLocation, setMeasuredSize, setOffset, setOutline, setOutlineColor, setPadding, setPointerVisible, setPointerWidth, setRotatable, setShowOnTop, setStateOutline, setStateOutlineColor, setVisible, styleSelectionPaint, toAbsoluteRect, toLocalPoint, toLocalRect, validateLocation, validatePointer, validateRender |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShapeNodeUI(ShapeNode data, Network network)
Method Detail |
---|
protected boolean byShape()
NodeUI
byShape
in class NodeUI
Node.setContentType(int)
protected void resetStyles()
ElementUI
resetStyles
in class NodeUI
protected void resetShapeData()
NodeUI
resetShapeData
in class NodeUI
Styles.SHAPE_TYPE
public boolean isLayoutByAnchorPoint()
isLayoutByAnchorPoint
in class twaver.core.network.BaseUI<Node>
protected void validatePoints()
invalidatePoints()
protected boolean onElementPropertyChange(java.lang.String propertyName, PropertyChangeEvent evt)
ElementUI
onElementPropertyChange
in class NodeUI
propertyName
- 属性名evt
- 属性变化事件
ElementUI.onElementPropertyChange(PropertyChangeEvent)
protected boolean doValidate()
ElementUI
doValidate
in class NodeUI
ElementUI.layout()
,
ElementUI.measure()
public void invalidatePoints()
validatePoints()
public boolean isInvalidatePoints()
public java.util.List<PathSegment> getPathSegments()
IPathUI
getPathSegments
in interface IPathUI
public boolean isLayoutByPath()
IPathUI
isLayoutByPath
in interface IPathUI
public boolean setLayoutByPath(boolean layoutByPath)
layoutByPath
- 孩子是否沿路径布局
public float getLength()
IPathUI
getLength
in interface IPathUI
public float getLineWidth()
IPathUI
getLineWidth
in interface IPathUI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |